On Mar 12, 2015, at 19:27, Shivanandan Gupta
wrote: Hi Martin,
Thanks for your prompt reply , I am using two different tables here but still I am getting "Exception in thread "main" java.sql.SQLException: COMMIT: failed" exception.
Hello Shivanandan, Concurrent insertion into two different tables should work. Do you have anymore information about why the COMMIT has failed? Maybe the problem lies somewhere else than concurrent insertions? - Have you tried the two COPY INTO separately? To know if the problem is indeed caused by concurrent insertions. - Does the problem occur one-time, or every time you repeatedly execute your code? Regards, Jennie
Message: 2 Date: Thu, 12 Mar 2015 08:32:31 +0100 From: Martin Kersten
To: users-list@monetdb.org Subject: Re: Multi threaded (2 threads) Java program for copy command commit fails for one thread Message-ID: <5501410F.1070508@monetdb.org> Content-Type: text/plain; charset=windows-1252; format=flowed Hi,
Yes. Insertion into the same table would be invalidated due to the transaction semantics. See https://www.monetdb.org/Documentation/Manuals/SQLreference/Transactions
On 12/03/15 08:18, Shivanandan Gupta wrote:
Hi All,
I am evaluating monetdb for our dwh and I am trying to load data from two different csv file to 2 different tables using multi-threaded java program in parallel, for one thread the load is successful and other one is failing with exception given below.
Exception in thread "main" java.sql.SQLException: COMMIT: failed at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2535) at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2284) at nl.cwi.monetdb.jdbc.MonetConnection.commit(MonetConnection.java:374) at connect_monetdb.runETL(connect_monetdb.java:78) at connect_monetdb.main(connect_monetdb.java:14)
command used is :
String csql = "copy into s_asset_"+filename+" from '"+filepath+""+ filename +".csv' using delimiters',';"; st.execute(csql); con.commit();
I am using monetdb jdbc driver and monetdb server is also on the same machine.
Any help will be really great.
Thank you.
Cheers, Shivanandan Gupta
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list