docker-bigtable

command module
v0.0.0-...-ccf8d6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

README

Bigtable Emulator In Docker

This repository contains everything to run the in memory Go implementation of Bigtable within a docker container for testing applications which use Bigtable.

To run locally use the command:

docker run -it -p 8080:8080 spotify/bigtable-emulator:latest

Using with the Google Cloud Bigtable client

To use with the Cloud Bigtable Client you need to set the Data Host and Table Admin Host to where the docker container is running, the Port to 8080, and to use the Plain Text Negotiation since the in memory implementation does not support SSL encryption. It is also highly recommended to use null credentials, otherwise valid ones are required. An example of using it with BigtableOptions.java:

BigtableOptions.Builder builder = new BigtableOptions.Builder();
// set required connection parameters
// ...
// ...
// Setup connection to docker container running locally
builder.setDataHost("localhost");
builder.setTableAdminHost("localhost");
builder.setPort(8080);
builder.setUsePlaintextNegotiation(true);
builder.setCredentialOptions(CredentialOptions.nullCredential());
BigtableSession session = new BigtableSession(builder.build());

What Works And What Doesn't

Since this uses an in memory implementation of Bigtable, the Bigtable API is not 100% implemented (for example certain row filter types are not supported). In order to get a full list of that you should look in the source for the in memory implementation. It is highly recommended to check the logs of the docker container if something is not working properly as there will be warning logs whenever an unsupported operation is attempted. An issue has been opended to address this.

Notes

Currently this uses the Go implementation because there is not an official Bigtable emulator provided in the google cloud tools. Hopefully once the Bigtable emulator is included within the set of gcloud utlities, this will be changed to use that implementation.

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

Documentation

Overview

* Copyright 2016 Spotify AB. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. *

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL