0

Trying to get that simple-cli example running on my local machine. It compiles fine however even though all looks correct on hbase-site.xml, it throws the following errors;

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)

This means that we can't access to hbase from our local?

East2West
  • 657
  • 1
  • 6
  • 22
  • looks like the following code does not return json file loc from the bach_profile `String serviceAccountJson = System.getenv().get(SERVICE_ACCOUNT_JSON_ENV_VARIABLE);` – East2West Jul 02 '15 at 22:20
  • `env` should show if you have defined GOOGLE_APPLICATION_CREDENTIALS correctly - see https://developers.google.com/identity/protocols/application-default-credentials for more info. – Les Vogel - Google DevRel Jul 06 '15 at 00:00
  • on mac os, there is no bashrc file and those env variables in bash_profile is only available to terminal not to eclipse. – East2West Jul 06 '15 at 21:03

1 Answers1

0

you can set environment variables on the system level as outlined for the following question so that eclipse gets the env variables;

Set environment variables on Mac OS X Lion

Community
  • 1
  • 1
East2West
  • 657
  • 1
  • 6
  • 22