From 42f2eab234aec347c01c404ba66385f966f44779 Mon Sep 17 00:00:00 2001 From: Solomon Duskis Date: Fri, 5 May 2017 11:12:25 -0400 Subject: [PATCH] BEAM-2181 Upgrade Bigtable dependency to 0.9.6.2 Cloud Bigtable 0.9.6.2 has some fixes relating to: 1) Using dependencies for GCP protobuf objects rather than including generated artifacts directly in bigtable-protos 2) BulkMutation bug fixes 3) Auth token management 4) Using fewer grpc experimental features. All are important in the context of beam, so the beam dependency should be upgraded. One snag came up. BigtableSession.isAlpnProviderEnabled() was removed in order to reduce the number of grpc experimental features. BigtableServiceImpl.tableExists() can no longer depend on isAlpnProviderEnabled(). --- pom.xml | 2 +- .../sdk/io/gcp/bigtable/BigtableServiceImpl.java | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 15428913d9fa..bb6892aa501d 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ 2.24.0 1.8.1 v2-rev295-1.22.0 - 0.9.6 + 0.9.6.2 v1-rev6-1.22.0 0.1.0 v2-rev8-1.22.0 diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java index 90102c8e0a4c..8fb0347dc0ec 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java @@ -74,15 +74,6 @@ public BigtableWriterImpl openForWriting(String tableId) throws IOException { @Override public boolean tableExists(String tableId) throws IOException { - if (!BigtableSession.isAlpnProviderEnabled()) { - LOG.info( - "Skipping existence check for table {} (BigtableOptions {}) because ALPN is not" - + " configured.", - tableId, - options); - return true; - } - try (BigtableSession session = new BigtableSession(options)) { GetTableRequest getTable = GetTableRequest.newBuilder() @@ -98,7 +89,8 @@ public boolean tableExists(String tableId) throws IOException { String.format( "Error checking whether table %s (BigtableOptions %s) exists", tableId, options); LOG.error(message, e); - throw new IOException(message, e); + // Ignore issues relating to temporary issues or boringssl configuration. + return true; } }