Announcement Announcement Module
Collapse
No announcement yet.
[HELP]I got a Exception like this. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELP]I got a Exception like this.

    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 :
    Code:
    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;
    }
    I call it with a loop; 10 times
    Code:
    for(int i=0;i<10;i++) {
        Content content = new Content();
        content.setId(i);
        content.setName("testName");
        contentOp.save(content);
    }
    when i==0, save successful.
    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.

  • #2
    Make sure you're using the latest snapshot - there was a bug in 1.0.M2 that was fixed in trunk (and will be released in M3).
    See the homepage for more details on the maven repos to use (libs-snapshots).

    Comment

    Working...
    X