Please help me fix the error.
I’m trying to do a simple left join two sets on a java client, And I get the result I expect when I query a single node cluster. But when I run the same application with 2(or more) nodes cluster I get server error… (Error Code 1: Server error)
and the server log looks like this…
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::844) scan job received
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::895) scan_option 0x0 0x64
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::986) scan option: Fail if cluster change False
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::987) scan option: Background Job False
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::988) scan option: priority is 0 n_threads 3 job_type 1
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::989) scan option: scan_pct is 100
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::1419) tid 1292795995097594: scan send response error returned -1 errno 32 fd 85
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::386) SCAN JOB DONE [id =1292795995097594: ns= test set=Student_Set scanned=3 expired=0 set_diff=1 elapsed=17 (ms)]
Jun 19 2015 05:51:44 GMT: INFO (scan): (thr_tscan.c::1464) tid 1292795995097594: no more fh. Probably client closed up connection
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4744) system memory: free 16008524kb ( 98 percent free )
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4752) migrates in progress ( 0 , 0 ) ::: ClusterSize 2 ::: objects 10 ::: sub_objects 0
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4760) rec refs 10 ::: rec locks 0 ::: trees 0 ::: wr reqs 0 ::: mig tx 0 ::: mig rx 0
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4766) replica errs :: null 0 non-null 0 ::: sync copy errs :: node 0 :: master 0
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4776) trans_in_progress: wr 0 prox 0 wait 0 ::: q 0 ::: bq 0 ::: iq 0 ::: dq 0 : fds - proto (3, 12, 9) : hb (2, 2, 0) : fab (20, 20, 0)
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4778) heartbeat_received: self 0 : foreign 661
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4779) heartbeat_stats: bt 0 bf 509 nt 0 ni 0 nn 0 nnir 0 nal 0 sf1 0 sf2 0 sf3 0 sf4 0 sf5 0 sf6 0 mrf 0 eh 0 efd 0 efa 0 um 0 mcf 0 rc 0
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4792) tree_counts: nsup 0 scan 0 batch 0 dup 0 wprocess 0 migrx 0 migtx 0 ssdr 0 ssdw 0 rw 0
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4808) namespace test: disk inuse: 0 memory inuse: 1181 (bytes) sindex memory inuse: 56118 (bytes) avail pct 100
Jun 19 2015 05:51:45 GMT: INFO (info): (thr_info.c::4853) partitions: actual 2077 sync 2019 desync 0 zombie 0 wait 0 absent 0
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: reads (0 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: writes_master (10 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::163) (00: 0000000010)
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: proxy (0 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: writes_reply (10 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::163) (00: 0000000010)
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: udf (0 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: query (0 total) msec
Jun 19 2015 05:51:45 GMT: INFO (info): (hist.c::137) histogram dump: query_rec_count (0 total) count
And the code look like this…
public void join() {
Key key;
Record record1;
Record record2;
Record[] result;
/*
* Prepare a statement
*/
Statement stmt1 = new Statement();
stmt1.setNamespace(this.namespace);
stmt1.setSetName(STUDENT_SET);
stmt1.setBinNames(STUDENT_NAME, "Advisor_ID");
/*
* exxecute query
*/
try {
RecordSet rs1 = this.client.query(null, stmt1);
/*
* process results as they arrive from the cluster
*/
while (rs1.next()){
record1 = rs1.getRecord();
key = new Key(this.namespace, ADVISOR_SET, (String)record1.bins.get("Advisor_ID"));
record2 = this.client.get(null, key);
System.out.println(record1);
System.out.println(record2);
key=null;
}
} catch (AerospikeException e) {
System.out.println(e.getMessage());
}
}