Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement BIGTABLE_EMULATOR_HOST environment variable support as in golang #6057

@jkleckner

Description

@jkleckner

The documentation for the Bigtable emulator states:

In the environment for your application, set the BIGTABLE_EMULATOR_HOST
environment variable to the host and port where the Cloud Bigtable emulator
is running (for example, myhost.example.com:8010).

If you are running the emulator on the same machine as your application,
you can use the following command to set this environment variable automatically:

  $(gcloud beta emulators bigtable env-init)

Setting this environment variable causes the application to run in the emulator,
with no further action required.  The client automatically uses the variable
if it is set, instead of connecting to the Cloud Bigtable service.

This is not yet implemented for this new Java client.

Take a look at this stackoverflow golang example that shows how the client is used no matter what is requested for project or instance.

It would be a great addition if this Java client would implement this behavior.

Note also that the newBuilderForEmulator code uses an integer port argument meaning that a client that wants to use the emulator needs to crack that integer from the BIGTABLE_EMULATOR_HOST environment variable.

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the Bigtable API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions