Skip to content

Commit

Permalink
Merge branch 'master' into dpebot-repositorygardener
Browse files Browse the repository at this point in the history
  • Loading branch information
averikitsch authored Jun 10, 2019
2 parents 2cdef7f + a746dbe commit 0cfcf09
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.m.examples.bigtable;

// START [bigtable_quickstart_veneer]
// [START bigtable_quickstart_veneer]

import com.google.api.gax.rpc.NotFoundException;
import com.google.cloud.bigtable.data.v2.BigtableDataClient;
Expand Down Expand Up @@ -56,4 +56,4 @@ public static void quickstart(String projectId, String instanceId, String tableI
}
}
}
// END [bigtable_quickstart_veneer]
// [END bigtable_quickstart_veneer]
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public static void main(String... args) throws Exception {
Subscription subscription =
subscriptionAdminClient.createSubscription(
subscriptionName, topicName, PushConfig.getDefaultInstance(), 0);
System.out.printf(
"Subscription %s:%s created.\n",
subscriptionName.getProject(), subscriptionName.getSubscription());
} catch (ApiException e) {
// example : code = ALREADY_EXISTS(409) implies subscription already exists
System.out.print(e.getStatusCode().getCode());
System.out.print(e.isRetryable());
}

System.out.printf(
"Subscription %s:%s created.\n",
subscriptionName.getProject(), subscriptionName.getSubscription());
}
}
// [END pubsub_quickstart_create_subscription]
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ public static void main(String... args) throws Exception {
ProjectTopicName topic = ProjectTopicName.of(projectId, topicId);
try (TopicAdminClient topicAdminClient = TopicAdminClient.create()) {
topicAdminClient.createTopic(topic);
System.out.printf("Topic %s:%s created.\n", topic.getProject(), topic.getTopic());
} catch (ApiException e) {
// example : code = ALREADY_EXISTS(409) implies topic already exists
System.out.print(e.getStatusCode().getCode());
System.out.print(e.isRetryable());
}

System.out.printf("Topic %s:%s created.\n", topic.getProject(), topic.getTopic());
}
}
// [END pubsub_quickstart_create_topic]
Loading

0 comments on commit 0cfcf09

Please sign in to comment.