|
anil gupta
2012-05-07, 18:44
Himanshu Vashishtha
2012-05-07, 20:57
Gary Helmling
2012-05-07, 21:00
anil gupta
2012-05-07, 21:35
Gary Helmling
2012-05-07, 21:46
anil gupta
2012-05-07, 21:50
|
-
Unable to run aggregation using AggregationClient in HBase0.92anil gupta 2012-05-07, 18:44
Hi All,
I am using cdh4b1 which has HBase 0.92.0 in a standalone installation on CentOS6.0. My objective was to check out the feature of aggregation in HBase via coprocessors. So, i decided to test doing sum of column which store double value. I went through the https://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestAggregateProtocol.javaclass to develop my understanding. Here is the pastebin link for simple java code i wrote: http://pastebin.com/xE4UWWvN I keep on getting following error when i run the "* com.intuit.ihub.hbase.poc.aggregation.TransactionAmountSum.doAggregation("10047095","10047096","transactions") *" on hbase shell: org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: No matching handler for protocol org.apache.hadoop.hbase.coprocessor.AggregateProtocol in region transactions,,1335223974116.e9190687f8a74b5083b39b6e5bd55705. at org.apache.hadoop.hbase.regionserver.HRegion.exec(HRegion.java:4023) at org.apache.hadoop.hbase.regionserver.HRegionServer.execCoprocessor(HRegionServer.java:3116) 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.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364) at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1326) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException(RemoteExceptionHandler.java:96) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.translateException(HConnectionManager.java:1652) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionServerWithRetries(HConnectionManager.java:1328) at org.apache.hadoop.hbase.ipc.ExecRPCInvoker.invoke(ExecRPCInvoker.java:79) at $Proxy13.getRowNum(Unknown Source) at org.apache.hadoop.hbase.client.coprocessor.AggregationClient$3.call(AggregationClient.java:197) at org.apache.hadoop.hbase.client.coprocessor.AggregationClient$3.call(AggregationClient.java:194) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1454) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Similar to the hbase test case i am also setting the conf in my code but it doesn't seem to work. I am trying out coprocessor for the first time. Can anyone tell me what is missing/wrong over here? Thanks for your help ~Anil Gupta
-
Re: Unable to run aggregation using AggregationClient in HBase0.92Himanshu Vashishtha 2012-05-07, 20:57
org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: means
the coprocessor is not registered. You should read https://blogs.apache.org/hbase/entry/coprocessor_introduction, especially the deployment section. Thanks, Himanshu On Mon, May 7, 2012 at 12:44 PM, anil gupta <[EMAIL PROTECTED]> wrote: > Hi All, > > I am using cdh4b1 which has HBase 0.92.0 in a standalone installation on > CentOS6.0. My objective was to check out the feature of aggregation in > HBase via coprocessors. So, i decided to test doing sum of column which > store double value. > I went through the > https://svn.apache.org/repos/asf/hbase/trunk/src/test/java/org/apache/hadoop/hbase/coprocessor/TestAggregateProtocol.javaclass > to develop my understanding. > Here is the pastebin link for simple java code i wrote: > http://pastebin.com/xE4UWWvN > > I keep on getting following error when i run the "* > com.intuit.ihub.hbase.poc.aggregation.TransactionAmountSum.doAggregation("10047095","10047096","transactions") > *" on hbase shell: > > org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: > org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: No matching > handler for protocol org.apache.hadoop.hbase.coprocessor.AggregateProtocol > in region transactions,,1335223974116.e9190687f8a74b5083b39b6e5bd55705. > at org.apache.hadoop.hbase.regionserver.HRegion.exec(HRegion.java:4023) > at > org.apache.hadoop.hbase.regionserver.HRegionServer.execCoprocessor(HRegionServer.java:3116) > 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.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364) > at > org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1326) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteException(RemoteExceptionHandler.java:96) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.translateException(HConnectionManager.java:1652) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getRegionServerWithRetries(HConnectionManager.java:1328) > at > org.apache.hadoop.hbase.ipc.ExecRPCInvoker.invoke(ExecRPCInvoker.java:79) > at $Proxy13.getRowNum(Unknown Source) > at > org.apache.hadoop.hbase.client.coprocessor.AggregationClient$3.call(AggregationClient.java:197) > at > org.apache.hadoop.hbase.client.coprocessor.AggregationClient$3.call(AggregationClient.java:194) > at > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$4.call(HConnectionManager.java:1454) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > > > Similar to the hbase test case i am also setting the conf in my code but it > doesn't seem to work. I am trying out coprocessor for the first time. Can > anyone tell me what is missing/wrong over here? > > Thanks for your help > ~Anil Gupta
-
Re: Unable to run aggregation using AggregationClient in HBase0.92Gary Helmling 2012-05-07, 21:00
>
> org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: > org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: No matching > handler for protocol org.apache.hadoop.hbase.coprocessor.AggregateProtocol > in region transactions,,1335223974116.e9190687f8a74b5083b39b6e5bd55705. The exception indicates that the AggregateImplementation coprocessor is not loaded on your region servers. Setting "hbase.coprocessor.region.classes" in the client configuration that you use is not sufficient. You need to either set this in the hbase-site.xml file used by your region servers (and restart the region servers), or you can enable the coprocessor for a specific table by disabling the table, setting a property on the HTableDescriptor and re-enabling the table. For more details, see http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/package-summary.html#package_description
-
Re: Unable to run aggregation using AggregationClient in HBase0.92anil gupta 2012-05-07, 21:35
Thanks Himanshu and Gary for the quick reply.
After adding the coprocessor class in hbase-site.xml it worked fine. Actually, i was aware that my coprocessor is not being loaded into region; hence the exception. But i was expecting the co-processor to be loaded since i was setting the conf in my code. Does this mean that "hbase.coprocessor.region.classes" is not a client side configuration? I am just curious to know why it was not working when i was setting the conf through code. Thanks, Anil Gupta On Mon, May 7, 2012 at 2:00 PM, Gary Helmling <[EMAIL PROTECTED]> wrote: > > > > org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: > > org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: No > matching > > handler for protocol > org.apache.hadoop.hbase.coprocessor.AggregateProtocol > > in region transactions,,1335223974116.e9190687f8a74b5083b39b6e5bd55705. > > The exception indicates that the AggregateImplementation coprocessor > is not loaded on your region servers. Setting > "hbase.coprocessor.region.classes" in the client configuration that > you use is not sufficient. You need to either set this in the > hbase-site.xml file used by your region servers (and restart the > region servers), or you can enable the coprocessor for a specific > table by disabling the table, setting a property on the > HTableDescriptor and re-enabling the table. > > For more details, see > > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/coprocessor/package-summary.html#package_description > -- Thanks & Regards, Anil Gupta
-
Re: Unable to run aggregation using AggregationClient in HBase0.92Gary Helmling 2012-05-07, 21:46
Hi Anil,
> Does this mean that > "hbase.coprocessor.region.classes" is not a client side configuration? I am > just curious to know why it was not working when i was setting the conf > through code. > That is correct. This is a server-side only configuration. Setting it on the client side will have no effect.
-
Re: Unable to run aggregation using AggregationClient in HBase0.92anil gupta 2012-05-07, 21:50
Thanks a lot, Gary.
On Mon, May 7, 2012 at 2:46 PM, Gary Helmling <[EMAIL PROTECTED]> wrote: > Hi Anil, > > > Does this mean that > > "hbase.coprocessor.region.classes" is not a client side configuration? I > am > > just curious to know why it was not working when i was setting the conf > > through code. > > > > That is correct. This is a server-side only configuration. Setting > it on the client side will have no effect. > -- Thanks & Regards, Anil Gupta |