Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coprocessor CheckDirService not found #2

Closed
secfree opened this issue Jul 30, 2015 · 8 comments
Closed

coprocessor CheckDirService not found #2

secfree opened this issue Jul 30, 2015 · 8 comments
Assignees

Comments

@secfree
Copy link

secfree commented Jul 30, 2015

每次进入 hbase-sql 后, 执行的第一条 sql 查询, 会 hang 10 分钟左右, 然后输出:

15/07/30 17:23:20 WARN CoprocessorRpcChannel: Call failed on IOException
org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=35, exceptions:
Thu Jul 30 17:14:07 CST 2015, org.apache.hadoop.hbase.client.RpcRetryingCaller@6d9c7e9b, org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.exceptions.UnknownProtocolException): org.apache.hadoop.hbase.exceptions.UnknownProtocolException: No registered coprocessor service found for name CheckDirService in region metadata,,1438221371472.33a2b7cbaab1f126dbff444b6c11e4da.
        at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5884)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3464)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3446)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:30950)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2093)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:101)
        at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
        at java.lang.Thread.run(Thread.java:745)

CheckDirService 在源码中有定义 proto, 但是没有单独的 jar 生成.

难道需要将 spark-sql-on-hbase-1.0.0.jar 上传到 hbase 的 master 和每个 regionserver ? 这个 jar 文件很大, 如果是这样的话, 有点不方便.

Thanks.

@yzhou2001
Copy link
Member

Yes, the jar needs to be available to HBase master and region servers. Otherwise the coprocessor/custom filter can't be used. We may want to lower the # of retries, 35, to a more reasonable value.

In addition, I recommend you to write github entries in English to maximize the exposure of them.

@secfree
Copy link
Author

secfree commented Aug 2, 2015

I recommend you to write github entries in English to maximize the exposure of them.

Thanks for your advice.

The attempts num is a parameter which can be controlled by client.

I add

 <property>
    <name>hbase.client.retries.number</name>
    <value>3</value>
  </property>

to hbase-site.xml under $SPARK_HOME/conf/, then the hbase-sql can give a quick response when I query the RegionServer.

@secfree
Copy link
Author

secfree commented Aug 2, 2015

  1. I add spark-sql-on-hbase-1.0.0.jar to HBase's master and every RegionServer.
  2. I set export HBASE_CLASSPATH=/.../spark-sql-on-hbase-1.0.0.jar in hbase-env.sh

The CheckDirService coprocessor stay not registered.

I then add

<property>
    <name>hbase.coprocessor.region.classes</name>
    <value>org.apache.spark.sql.hbase.CheckDirProto</value>
 </property>

to hbase-site.xml, and the HBase's log indicates that I supplied the wrong value.

What should I set in hbase-site.xml ?

Thanks.

@xinyunh
Copy link
Member

xinyunh commented Aug 2, 2015

Hi @secfree,

Have you deployed the configured files, hbase-site.xml and hbase-env.sh, to each regionserver?

@secfree
Copy link
Author

secfree commented Aug 2, 2015

Yes, I sync all nodes' configure file with scripts.

This's is the log:

coprocessor.CoprocessorHost: The coprocessor org.apache.spark.sql.hbase.CheckDirProtos threw java.io.IOException: Configured class org.apache.spark.sql.hbase.CheckDirProtos must implement org.apache.hadoop.hbase.Coprocessor interface

Use value org.apache.spark.sql.hbase.CheckDirService will lead a "ClassNotFoundException".

Should I add the hbase.coprocessor.region.classes configure in hbase-site.xml ?

@xinyunh
Copy link
Member

xinyunh commented Aug 2, 2015

Hi @secfree,

No, you don't need to.
I will check it later.

@xinyunh xinyunh self-assigned this Aug 2, 2015
@xinyunh
Copy link
Member

xinyunh commented Aug 2, 2015

Hi @secfree,

It seems that you registered wrong class. :)
Please change it to

hbase.coprocessor.region.classes org.apache.spark.sql.hbase.CheckDirEndPointImpl

@secfree
Copy link
Author

secfree commented Aug 2, 2015

Yes, it's OK now.

Thanks.

@xinyunh xinyunh closed this as completed Aug 2, 2015
scwf pushed a commit to scwf/Spark-SQL-on-HBase that referenced this issue Aug 18, 2015
update as per apache-spark/master and integrate changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants