hi Costin!
when I call a method twice, I meet the following Exception.
java.util.concurrent.RejectedExecutionException: Task java.util.conrrent.FutureTask@3f6c10 rejected from java.util.concurrent.ThreadPoolExecutor@1cfa835 [Terminated, poolsize=0, active threads=0, queued tasks=0, completed tasks =1]
..
at java.util.concurrent.ThreadPoolExecutor$AbortPolic y.rejectedException
at java.util.concurrent.ThreadPoolExecutor.reject
at java.util.concurrent.ThreadPoolExecutor.execute
at java.util.concurrent.AbstractExecutorService.submi t
at org.apache.hadoop.hbase.client.HConnectionManager$ HConnectionImplementation.processBatch
at org.apache.hadoop.hbase.client.HConnectionManager$ HConnectionImplementation.processBatchOfPuts
at org.apache.hadoop.hbase.client.flushCommits
at org.apache.hadoop.hbase.client.doPut
at org.apache.hadoop.hbase.client.HTable.put
at com.myship.project.ContentOp$1.doInTable
at org.springframework.data.hadoop.hbase.HbaseTemplat e.execute
..
..
my test code :
I call it with a loop; 10 timesCode:public Content save(final Content p) { final byte[] rowKey = Bytes.toBytes(p.getId()); final byte[] name = Bytes.toBytes(p.getName()); hBaseTemplate.execute(TABLE_NAME, new TableCallback<Object>() { public object doInTable(HTable table) throws Throwable { Put p = new Put(rowKey); p.add(CF_NAME_BYTES, COLUMN_NAME_BYTES,name); table.put(p) return null; } }); return p; }
when i==0, save successful.Code:for(int i=0;i<10;i++) { Content content = new Content(); content.setId(i); content.setName("testName"); contentOp.save(content); }
when i==1 and after, contentOp.save throw the exception above.
I don't know why and how to fix it. plz help me.
thank you Costin, for the great framework, for your hard work. Looking for your reply.


Reply With Quote
