0

I'm trying to split legacy system combined from hbase and php module into two separated containers with the following docker-compose file:

version: '2'
services:
  php:
    image: my-legacy-php
    volumes:
      - ~/workspace/php:/workspace/php
    ports:
      - "80:80"
    links:
      - hbase:hbase-docker
  hbase:
    image: dajobe/hbase
    hostname: hbase-docker
    ports:
      - "43590-44000:43590-44000"
      - "8085:8085"
      - "2181:2181"
      - "8080:8080"
      - "16010:16010"
      - "9095:9095"
      - "9090:9091"
      - "16020:16020"
      - "16030:16030"
      - "60000:60000"
    volumes:
      - ~/workspace/hbase-docker/data:/data

I'm using public docker image for hbase from dajobe/hbase. Now I'm trying to send some events (HTTP GET requests) to the php moudle and get the following exception in my php module (the Thrift lib):

ERROR HBaseFacade - exception in handling rcomEvent: Internal error processing increment, trace is: #0 /workspace/php/libs/thrift-0.8.0/packages/Hbase/THBaseService.php(536): THBaseServiceClient->recv_increment()

and in the hbase container I see the following exception (in /data/log/hbase-thrift.log):

2016-11-21 09:13:29,620 ERROR [thrift-worker-0] thrift.ProcessFunction: Internal error processing increment
java.lang.NullPointerException
    at org.apache.hadoop.hbase.thrift.ThriftServerRunner$HBaseHandler.increment(ThriftServerRunner.java:1747)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.hadoop.hbase.thrift.HbaseHandlerMetricsProxy.invoke(HbaseHandlerMetricsProxy.java:67)
    at com.sun.proxy.$Proxy9.increment(Unknown Source)
    at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor$increment.getResult(Hbase.java:4537)
    at org.apache.hadoop.hbase.thrift.generated.Hbase$Processor$increment.getResult(Hbase.java:4521)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.hadoop.hbase.thrift.TBoundedThreadPoolServer$ClientConnnection.run(TBoundedThreadPoolServer.java:289)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Any ideas?

EDIT: My prev local hbase version (which worked with my php module) was 0.94.26 and the hbase-docker running 1.1.4

JensG
  • 13,148
  • 4
  • 45
  • 55
ItayB
  • 10,377
  • 9
  • 50
  • 77

1 Answers1

0

The solution for me was to run thrift2 instead of thrift in hbase container.

from https://github.com/dajobe/hbase-docker/blob/master/hbase-server: I've changed:

hbase thrift start > $logs_dir/hbase-thrift.log 2>&1 &

to:

hbase thrift2 start > $logs_dir/hbase-thrift.log 2>&1 &
ItayB
  • 10,377
  • 9
  • 50
  • 77