You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tg...@apache.org on 2016/11/11 21:50:47 UTC
[2/2] incubator-beam git commit: Do not pass Credentials in
BigtableWriteIT DoFn
Do not pass Credentials in BigtableWriteIT DoFn
The credentials cannot be deserialized in Jenkins.
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/df26fc01
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/df26fc01
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/df26fc01
Branch: refs/heads/master
Commit: df26fc018486cc0797d736a72f84da65e8fc4e24
Parents: 49ce270
Author: Thomas Groh <tg...@google.com>
Authored: Thu Nov 10 14:59:33 2016 -0800
Committer: Thomas Groh <tg...@google.com>
Committed: Fri Nov 11 13:43:03 2016 -0800
----------------------------------------------------------------------
.../sdk/io/gcp/bigtable/BigtableWriteIT.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/df26fc01/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableWriteIT.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableWriteIT.java b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableWriteIT.java
index cae19cf..d7792f4 100644
--- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableWriteIT.java
+++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableWriteIT.java
@@ -30,6 +30,7 @@ import com.google.bigtable.v2.Row;
import com.google.bigtable.v2.RowRange;
import com.google.bigtable.v2.RowSet;
import com.google.cloud.bigtable.config.BigtableOptions;
+import com.google.cloud.bigtable.config.BigtableOptions.Builder;
import com.google.cloud.bigtable.config.CredentialOptions;
import com.google.cloud.bigtable.config.RetryOptions;
import com.google.cloud.bigtable.grpc.BigtableSession;
@@ -85,17 +86,21 @@ public class BigtableWriteIT implements Serializable {
retryOptionsBuilder.setStreamingBatchSize(
retryOptionsBuilder.build().getStreamingBufferSize() / 2);
- BigtableOptions.Builder bigtableOptionsBuilder =
- new BigtableOptions.Builder()
+ bigtableOptions =
+ new Builder()
.setProjectId(options.getProjectId())
.setInstanceId(options.getInstanceId())
.setUserAgent("apache-beam-test")
.setRetryOptions(retryOptionsBuilder.build())
- .setCredentialOptions(
- CredentialOptions.credential(options.as(GcpOptions.class).getGcpCredential()));
- bigtableOptions = bigtableOptionsBuilder.build();
-
- session = new BigtableSession(bigtableOptions);
+ .build();
+
+ session =
+ new BigtableSession(
+ bigtableOptions
+ .toBuilder()
+ .setCredentialOptions(
+ CredentialOptions.credential(options.as(GcpOptions.class).getGcpCredential()))
+ .build());
tableAdminClient = session.getTableAdminClient();
}