Wie verbinde ich mich mit einem laufenden Bigtable Emulator von Java

Ich versuche, den Bigtable-Emulator von gcloud Beta-Emulatoren zu verwenden. Ich starte den Emulator, greife nach dem Hostnamen (localhost) und dem Port (in diesem Fall 8885)

gcloud Beta-Emulatoren bigtable Start

Executing: / usr / local / Caskroom / google-cloud-sdk / aktuell / google-cloud-sdk / plattform / bigtable-emulator / cbtemulator --host = localhost --port = 8885

Ich versuche, von einem Java-Testclient aus eine Verbindung zum Emulator herzustelle

Configuration conf = BigtableConfiguration.configure(projectId, instanceId);

if(!Strings.isNullOrEmpty(host)){
    conf.set(BigtableOptionsFactory.BIGTABLE_HOST_KEY, host);
    conf.set(BigtableOptionsFactory.BIGTABLE_PORT_KEY, Integer.toString(port));
}
connection = BigtableConfiguration.connect(configuration);
try (Table table = connection.getTable("tName")){
    table.put(<Put instance>);
} 

Wenn ich den Testcode ausführe, den ich erhalte:

16:36:37.369 [bigtable-batch-pool-1] INFO com.google.cloud.bigtable.grpc.async.AbstractRetryingRpcListener - Retrying failed call. Failure #1, got: Status{code=UNAVAILABLE, description=null, cause=java.net.ConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:8885}
java.net.ConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:8885

Ich benutze die Bibliothek:com.google.cloud.bigtable:bigtable-hbase-1.2:0.9.1

Hast du eine Ahnung, was ich falsch mache?

Vielen Dank

Antworten auf die Frage(2)

Ihre Antwort auf die Frage