JDBC: executeQuery call does not return


#1

Hey,

I’ve written a small Java-Program to load data into SciDB. First I create a flat array, which works just fine.

Then I go on to load the data from a binary file, but that call to executeQuery() does not return and the program has to be aborted. Executing the exact same query with the iquery command line tool, works just fine.

AQL% LOAD test FROM '/home/scidb/scidb-example/minidataset.scidb' AS '(int64,int64,int64,int32)'; {i} time,lon,lat,temp {0} 1,0,0,28 {1} 0,1,0,36 {2} 1,1,0,38 {3} 0,2,0,12 {4} 1,2,0,42 {5} 0,0,1,30 {6} 1,0,1,25 {7} 0,1,1,16 {8} 1,1,1,6 {9} 0,2,1,35 {10} 1,2,1,24 {11} 0,0,2,23 {12} 1,0,2,30 {13} 0,1,2,8 {14} 1,1,2,40 {15} 0,2,2,11 {16} 1,2,2,33 {17} 0,0,0,32
I have uploaded the sample code so that you can have a look at it.

I’ve tried compiling the project with Java 1.6 as well as with Java 1.7. I’m using the SciDB version 14.7, but it also didn’t work with 14.3. I run my project as the scidb user with the necessary libraries in the classpath:

java -cp lib/scidb4j.jar:lib/protobuf-java.jar:target/scidb-example-0.0.1-SNAPSHOT.jar de.thevinci.scidb.Example $(readlink -f minidataset.scidb)
Here’s an extract of the logging output I get when running my program:

2014-08-16 15:03:24,179 [0x7f8a84d66700] [DEBUG]: Parsing query(1100926752129): LOAD test FROM '/home/scidb/scidb-example/minidataset.scidb' AS '(int64,int64,int64,int32)' 2014-08-16 15:03:24,180 [0x7f8a84d66700] [DEBUG]: Driver::process(1) Load(test,'/home/scidb/scidb-example/minidataset.scidb',-2,'(int64,int64,int64,int32)',0) 2014-08-16 15:03:24,180 [0x7f8a84d66700] [DEBUG]: Driver::process(2) Load(test,'/home/scidb/scidb-example/minidataset.scidb',-2,'(int64,int64,int64,int32)',0) 2014-08-16 15:03:24,182 [0x7f8a84d66700] [DEBUG]: Inferred schema for operator load: test<time:int64,lon:int64,lat:int64,temp:int32> [i=0:*,1000000,0]
And after aborting:

2014-08-16 15:05:34,846 [0x7f8a902987c0] [WARN ]: Client for query 1100926752128 disconnected 2014-08-16 15:05:34,846 [0x7f8a84a63700] [DEBUG]: Query (1100926752128) is being aborted 2014-08-16 15:05:34,846 [0x7f8a84a63700] [ERROR]: Query (1100926752128) error handlers (1) are being executed 2014-08-16 15:05:34,846 [0x7f8a84a63700] [DEBUG]: Broadcast ABORT message to all instances for query 1100926752128 2014-08-16 15:05:34,846 [0x7f8a84a63700] [DEBUG]: Deallocating query (1100926752128) 2014-08-16 15:05:34,846 [0x7f8a84a63700] [DEBUG]: Releasing locks for query 1100926752128 2014-08-16 15:05:34,846 [0x7f8a84a63700] [DEBUG]: SystemCatalog::deleteArrayLocks instanceId = 0 role = 0 queryId = 1100926752128 2014-08-16 15:05:34,846 [0x7f8a902987c0] [WARN ]: Client for query 1100926752129 disconnected 2014-08-16 15:05:34,846 [0x7f8a8455e700] [DEBUG]: Query (1100926752129) is being aborted 2014-08-16 15:05:34,846 [0x7f8a8455e700] [DEBUG]: Query (1100926752129) is still in progress

It appears that the execution of the query runs into some kind of infinite loop, as the debugging output suggests that the query is still running at the time of abortion.

Do you have any idea how to solve this problem or how I could circumvent it?

Thanks in advance,
luxcoder