Home Forums HBase HBase coprocessors do not work in sandbox

This topic contains 3 replies, has 2 voices, and was last updated by  Robert 1 year, 2 months ago.

  • Creator
    Topic
  • #33053

    We have few custom coprocessors and I am trying to run those in HBase. I have copied the relevant jar file (name: custom_ex.jar) with the coprocessor classes in to the /usr/lib/hbase/lib folder and also edited the hbase-site.xml with the coprocessor classes

    hbase.coprocessor.region.classes com.olf.ads.provider.hbase.processor.RowCountEndpoint,com.olf.ads.provider.hbase.processor.EntryProcessorEndpoint,com.olf.ads.provider.hbase.aggregator.AggregateEndpoint

    Re-started everything and then I can see that ads.jar file is in the hbase classpath. (by looking in to hbase-hbase-regionserver-sandbox.log)


    environment:java.class.path=/etc/hbase/conf:/usr/jdk/jdk1.6.0_31/lib/tools.jar:/usr/lib/hbase/bin/..:/usr/lib/hbase/bin/../hbase-0.94.6.1.3.0.0-107-security.jar:/usr/lib/hbase/bin/../hbase-0.94.6.1.3.0.0-107-security-tests.jar:/usr/lib/hbase/bin/../lib/activation-1.1.jar:/usr/lib/hbase/bin/../lib/custom_ex.jar:/usr/lib/hbase/bin/../lib/asm-3.1.jar:/usr/lib/hbase/bin/

    However, later in the logs I can see


    2013-08-22 04:27:14,276 WARN org.apache.hadoop.hbase.coprocessor.CoprocessorHost: Class com.olf.ads.provider.hbase.processor.RowCountEndpoint cannot be found. com.olf.ads.provider.hbase.processor.RowCountEndpoint
    2013-08-22 04:27:14,276 WARN org.apache.hadoop.hbase.coprocessor.CoprocessorHost: Class com.olf.ads.provider.hbase.processor.EntryProcessorEndpoint cannot be found. com.olf.ads.provider.hbase.processor.EntryProcessorEndpoint
    2013-08-22 04:27:14,276 WARN org.apache.hadoop.hbase.coprocessor.CoprocessorHost: Class com.olf.ads.provider.hbase.aggregator.AggregateEndpoint cannot be found. com.olf.ads.provider.hbase.aggregator.AggregateEndpoint

    also exception was thrown when trying to run the coprocessor in HBase using an Java client

    2013-08-22 04:29:08,945 ERROR org.apache.hadoop.hbase.regionserver.HRegionServer:
    org.apache.hadoop.hbase.ipc.HBaseRPC$UnknownProtocolException: No matching handler for protocol com.olf.ads.provider.hbase.processor.RowCountProtocol in region HBase_TestDataGridCacheBasics,,1377170947638.2394412b5ea122cf33f2311ec67235c2.
    at org.apache.hadoop.hbase.regionserver.HRegion.exec(HRegion.java:5464)
    at org.apache.hadoop.hbase.regionserver.HRegionServer.execCoprocessor(HRegionServer.java:3850)
    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:340)
    at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1426)

    The custom_ex.jar file has the correct classes in it.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #34154

    Robert
    Participant

    Hi Dasun,
    Thanks for the feedback, glad it all worked out for you.

    Regards,
    Robert

    Collapse
    #33633

    Thanks for the link Robert.

    By the way the issue was with the permission on my custom_ex.jar. Permission had to be set as chmod 644

    Collapse
    #33594

    Robert
    Participant

    Hi Dasun,
    Have you followed the instructions here:
    https://blogs.apache.org/hbase/entry/coprocessor_introduction in the coprocessor deployment section?

    Regards,
    Robert

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)