0

试图让那个简单的 cli 示例在我的本地机器上运行。它编译得很好,但是即使在 hbase-site.xml 上看起来一切都正确,它也会引发以下错误;

2015-07-02 13:46:19,184 ERROR [main] hbase1_1.BigtableConnection: Error loading BigtableOptions from Configuration.
java.io.IOException: Error getting access token from metadata server at: http://metadata/computeMetadata/v1/instance/service-accounts/default/token
at com.google.cloud.bigtable.config.CredentialFactory.getCredentialFromMetadataServiceAccount(CredentialFactory.java:100)
........
Caused by: java.io.IOException: ComputeEngineCredentials cannot find the metadata server. This is likely because code is not running on Google Compute Engine.
    at com.google.auth.oauth2.ComputeEngineCredentials.refreshAccessToken(ComputeEngineCredentials.java:63)

这意味着我们无法从本地访问hbase?

4

1 回答 1

0

您可以按照以下问题的概述在系统级别设置环境变量,以便 eclipse 获取环境变量;

在 Mac OS X Lion 上设置环境变量

于 2015-07-06T21:05:35.840 回答