-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: migrating Bigtable workload generator example to not use Hbase #9235
base: main
Are you sure you want to change the base?
Conversation
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/test/java/bigtable/WorkloadGeneratorTest.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/test/java/bigtable/WorkloadGeneratorTest.java
Outdated
Show resolved
Hide resolved
some cleanup in response to comments
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Outdated
Show resolved
Hide resolved
bigtable/beam/workload-generator/src/main/java/bigtable/WorkloadGenerator.java
Show resolved
Hide resolved
void setup() throws IOException { | ||
synchronized (lock) { | ||
if (++refCount == 1) { | ||
bigtableDataClient = BigtableDataClient.create(this.projectId, this.instanceId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, you might want to add a catch to rollback the refCount if you failed to instantiate the client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the client fails to initiate won't the whole program exit from the exception? I could add the catch and just print that the connection failed, but for the purposes of this example I feel like it is fine to just fail?
cleanup variables
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
pom.xml
parent set to latestshared-configuration
mvn clean verify
requiredmvn -P lint checkstyle:check
requiredmvn -P lint clean compile pmd:cpd-check spotbugs:check
advisory only