如何从任何目录运行BigTable hbase shell?

问题描述 投票:1回答:1

我开始按照these说明安装hbase并将其配置为命中我的BigTable实例。一切正常,但接下来我想另外配置这个安装,所以我可以从任何地方运行hbase shell

所以我在.zshrc上添加了以下内容:

export HBASE_HOME=/path/to/my/hbase
export PATH=$HBASE_HOME:...

当我运行hbase shell时,我得到以下内容:

2017-04-28 09:58:45,069 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
NativeException: java.io.IOException: java.lang.ClassNotFoundException: com.google.cloud.bigtable.hbase1_2.BigtableConnection
  initialize at /Users/mmscibor/.hbase/lib/ruby/hbase/hbase.rb:42
      (root) at /Users/mmscibor/.hbase/bin/hirb.rb:131

我觉得有什么东西在寻找它的.jars,并注意到我下载的.tar有一个lib目录所以另外尝试:

hbase shell -cp $HBASE_HOME/lib/

但没有运气。但是,如果我导航到$HBASE_HOME并运行hbase shell一切正常。

我在这里错过了什么?

shell hbase bigtable
1个回答
0
投票

你可能遇到了这里描述的问题:https://github.com/GoogleCloudPlatform/cloud-bigtable-examples/issues/226

您需要在您的环境中设置GOOGLE_APPLICATION_CREDENTIALS,或运行gcloud auth application-default login

© www.soinside.com 2019 - 2024. All rights reserved.