Hi 

I am trying to load data from CSV to ignite thru DataStreamer

To improve the efficiency, I have started a new thread for each CSV file I
am loading, 

Here is the code snippet I am using 

        Ignite ignite = Ignition.start("igniteDual-client.xml");
        try (IgniteCache<String, AssociatedParties> testEntCache =
ignite.cache(Constants.ASSOCIATED_PARTIES)) {
                
        try (IgniteDataStreamer<String, AssociatedParties> streamer =
ignite.dataStreamer(Constants.ASSOCIATED_PARTIES)) {
                streamer.allowOverwrite(Constants.allowOverwrite);

                FileInputStream inputStream = null;
                Scanner sc = null;
                inputStream = new FileInputStream(fileName);
                sc = new Scanner(inputStream, "UTF-8");
                while (sc.hasNextLine()) {
                        String line = sc.nextLine();
                        String[] tokens = line.split(Constants.Delimter, -1);
                        aAssociatedParties.setAssociatedPartyId(tokens[1]);
                        aAssociatedParties.setUpdatedby(tokens[3]);
                        aAssociatedParties.setUpdateddatetime(new
Timestamp(System.currentTimeMillis()));

                        streamer.perNodeBufferSize(Constants.perNodeBufferSize);
                        
streamer.perNodeParallelOperations(Constants.perNodeParallelOperations);

                        streamer.addData(tokens[0], aAssociatedParties);
                }
         } 

Basically i am using the same ignite config XML for loading. 
IN this case, there are 2 files I am trying to load and using the same
config file (attached the config xml as well.

This is the error I am getting
"class org.apache.ignite.IgniteException: Ignite instance with this name has
already been started: igniteDual"

How can i use unique name for every client, when I omit the instance name
also its throwing error saying the default instance is already connected. 

Thanks
Naveen
igniteDual-client.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/t1478/igniteDual-client.xml>
  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to