hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yin Huai <huaiyin....@gmail.com>
Subject Re: cannot invoke coprocessor in trunk
Date Tue, 24 Jul 2012 21:45:51 GMT
have a question regarding loading endpoint from hdfs.

I used table descriptor to load my endpoint from hdfs and it seems that the
region server successfully loaded the jar (i can see the name of my
endpoint through "status 'detailed'"). However, when I tried to invoke the
coprocessor (I used $HADOOP jar myjar.jar to launch my code), I still got
class not found exception. Is there any thing I also need to do? Do I need
to set classpath if I load coprocessors from hdfs?

Thanks,

Yin


On Wed, Jul 18, 2012 at 9:09 PM, Yin Huai <huaiyin.thu@gmail.com> wrote:

> I load it through table attribute.
>
> Here is what I did...
>
> htd.setValue("COPROCESSOR$1", path.toString() + "|" +
> RowCountTrunkEndpoint.*class*.getCanonicalName() + "|" + Coprocessor.
> PRIORITY_USER);
> Just found the reason... I forgot to add my jar to classpath...
>
> Thanks,
>
> Yin
>
>
> On Wed, Jul 18, 2012 at 6:08 PM, Ted Yu <yuzhihong@gmail.com> wrote:
>
>> ClassNotFoundException ...
>>
>> How did you load your coprocessor jar ?
>>
>> On Wed, Jul 18, 2012 at 3:05 PM, Yin Huai <huaiyin.thu@gmail.com> wrote:
>>
>> > Hello All,
>> >
>> > When I was trying to invoke coprocessor against trunk, I got the
>> following
>> > error...
>> >
>> > 12/07/18 13:43:49 WARN
>> client.HConnectionManager$HConnectionImplementation:
>> > Error executing for row
>> > java.util.concurrent.ExecutionException:
>> > org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after
>> > attempts=10, exceptions:
>> > Wed Jul 18 13:43:10 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > org.apache.hadoop.hbase.NotServingRegionException:
>> > org.apache.hadoop.hbase.NotServingRegionException: Region is not online:
>> > f9cd8c5c4e0c3bd4bab9ea57580bdb60
>> > Wed Jul 18 13:43:11 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:12 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:13 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:15 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:17 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:21 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:25 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:33 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> > Wed Jul 18 13:43:49 EDT 2012,
>> > org.apache.hadoop.hbase.ipc.ExecRPCInvoker$1@141dddba,
>> > java.io.IOException:
>> > java.io.IOException: java.lang.ClassNotFoundException:
>> > coprocessor.simple.workload.RowCountTrunkProtocol
>> >
>> > at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>> > at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>> >  at
>> >
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.processExecs(HConnectionManager.java:2183)
>> > at
>> org.apache.hadoop.hbase.client.HTable.coprocessorExec(HTable.java:1382)
>> >  at
>> org.apache.hadoop.hbase.client.HTable.coprocessorExec(HTable.java:1362)
>> > at
>> >
>> coprocessor.simple.workload.EndpointExample.main(EndpointExample.java:93)
>> >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > at
>> >
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >  at
>> >
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> > at java.lang.reflect.Method.invoke(Method.java:597)
>> >  at
>> >
>> >
>> org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
>> > at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
>> >  at driver.Driver.main(Driver.java:19)
>> >
>> > The first error (NotServingRegionException) is caused by table
>> splitting.
>> > But I do not know the reason of following errors. Seems that the client
>> > side has some issues on recognizing my coprocessor protocol.
>> >
>> > btw, I can run the same code against 0.94.
>> >
>> > Thanks,
>> >
>> > Yin
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message