Dear Team
We are adding the 4gb xml file to the collection,while adding the file we are getting the out of main memory.My java application has the 4gb memory.Can you please help me on this.We are using the
LocalSession for creating the collection.
Thanks&Regards
ChandraSekhar
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
Dear Chandra,
We are adding the 4gb xml file to the collection,while adding the file we are getting the out of main memory.My java application has the 4gb memory.Can you please help me on this.We are using the LocalSession for creating the collection.
Please give me some more hints:
* How large is the database before you add the 4gb file? * Can you successfully create a database from this XML file? * Do you use LocalSession.execute() or LocalSession.add() for adding the file? Maybe you can send me your code.
Best, Christian
Dear Team
> How large is the database before you add the 4gb file? > Can you successfully create a database from this XML file? > Do you use LocalSession.execute() or LocalSession.add() for adding the file? Maybe you can send me your code.
* in this case my database size 2gb ,but in some cases i will create with large file * yes,If i increase the memory to my application,i am able to create database * i am using LocalSession.add() method,The reason for using this, i want to replace the existing xml from another with the xml name
My Code :
Context context = new Context(); LocalSession localSess = new LocalSession(context); if (DBNOTEXISTS) { localSess.execute("CREATE DB " + "DBNAME"); localSess.add("FILENAME", new FileInputStream(new File("FILEPATH"))); } else { localSess.execute("OPEN " + "DBNAME"); localSess.replace("FILENAME", new FileInputStream(new File("FILEPATH"))); }
Thanks&Regards Chandra Sekhar
________________________________________ From: Christian Grün christian.gruen@gmail.com Sent: Saturday, November 22, 2014 7:25 PM To: Chandrasekhar Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: Reg : Collection Creation For Huge XML
Dear Chandra,
We are adding the 4gb xml file to the collection,while adding the file we are getting the out of main memory.My java application has the 4gb memory.Can you please help me on this.We are using the LocalSession for creating the collection.
Please give me some more hints:
* How large is the database before you add the 4gb file? * Can you successfully create a database from this XML file? * Do you use LocalSession.execute() or LocalSession.add() for adding the file? Maybe you can send me your code.
Best, Christian The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
localSess.execute("CREATE DB " + "DBNAME"); localSess.add("FILENAME", new FileInputStream(new File("FILEPATH")));
Could you try the following alternatives?
localSess.create("DBNAME", new FileInputStream(new File("FILEPATH")));
or
localSess.execute("CREATE DB DBNAME FILEPATH");
Hope this helps, Christian
basex-talk@mailman.uni-konstanz.de