重新部署后HBase协处理器未更新 [英] HBase coprocessor not updating after redeploy

查看:138
本文介绍了重新部署后HBase协处理器未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HBase 1.1.2,并尝试重新部署自定义端点协处理器以修复Java代码中的错误.我对协处理器代码进行了一些更改,并通过以下步骤将其重新部署:

I'm using HBase 1.1.2, and trying to redeploy a custom endpoint coprocessor to fix an error in my Java code. I made some changes to the coprocessor code and redeployed it via the following steps:

  1. 重建协处理器jar
  2. 将其复制到HDFS上的某个位置
  3. 删除现有的协处理器:alter 'table', METHOD => 'table_att_unset',NAME => 'coprocessor$1'
  4. 通过HBase UI确认表未附加协处理器
  5. 通过禁用表并运行alter 'table', METHOD => 'table_att', 'coprocessor'=>'hdfs:///user/bwatson/sum-coprocessor-0.1.0-SNAPSHOT.jar|uk.co.hadoopathome.coprocessor.SumAndCountEndpoint||'
  6. 添加新的协处理器
  7. 重新启用表格
  8. 通过HBase UI确认已连接协处理器
  1. Rebuild the coprocessor jar
  2. Copy it to a location on the HDFS
  3. Remove the existing coprocessor: alter 'table', METHOD => 'table_att_unset',NAME => 'coprocessor$1'
  4. Confirm through the HBase UI that the table has no coprocessors attached
  5. Add the new coprocessor by disabling the table and running alter 'table', METHOD => 'table_att', 'coprocessor'=>'hdfs:///user/bwatson/sum-coprocessor-0.1.0-SNAPSHOT.jar|uk.co.hadoopathome.coprocessor.SumAndCountEndpoint||'
  6. Re-enable the table
  7. Confirm through the HBase UI that the coprocessor has been attached

当我重新运行与协处理器通信的客户端代码时,我可以在regionserver日志中清楚地看到旧的协处理器代码仍在运行.

When I re-run my client code that talks to the coprocessor, I can clearly see in the regionserver logs that the old coprocessor code is still running.

如果我在托管表的区域服务器上本地搜索jar,我会发现jar仅位于一个位置:

If I search for the jar locally on the regionserver that hosts my table, I see that the jar is only in one location:

find / -name "*um-coprocesso*"
/tmp/hbase-hbase/local/jars/tmp/.2107072457.sum-coprocessor-0.1.0-SNAPSHOT.jar.1522237762363.jar
/tmp/hbase-hbase/local/jars/tmp/..2107072457.sum-coprocessor-0.1.0-SNAPSHOT.jar.1522237762363.jar.crc

我可以从这个罐子的日期和大小确认它是旧版本.

I can confirm from the date and size of this jar that it is the old version.

这是HBase中的错误吗?我该如何解决?

Is this a bug in HBase? How can I get around this?

推荐答案

重新启动HBase达到了目的. /tmp/hbase-hbase/local/jars/tmp/中的jar被删除,并且我的下一次部署成功.

Restarting HBase did the trick; the jar in /tmp/hbase-hbase/local/jars/tmp/ was removed, and my next deploy was successful.

这是HBase中的一个错误,无论是在文档中还是在代码中.我将和HBase Jira一起出票.

This is a bug in HBase, either in the documentation or the code. I'll raise a ticket with the HBase Jira.

这篇关于重新部署后HBase协处理器未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆