The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

HBase Forum

HBase coprocessors do not work in sandbox

  • #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.

  • Author
    Replies
  • #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

    #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

    #34154
    Robert
    Participant

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

    Regards,
    Robert

The forum ‘HBase’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.