Skip to content

Commit

Permalink
add try catch block while create bigtable connection
Browse files Browse the repository at this point in the history
  • Loading branch information
bayu-aditya committed Sep 27, 2024
1 parent 7e7e417 commit 455e253
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ public OnlineRetriever getRetriever() {
BigtableConfiguration.configure(projectId, instanceId);
config.set(BigtableOptionsFactory.APP_PROFILE_ID_KEY, appProfileId);

Connection connection = BigtableConfiguration.connect(config);
Connection connection;
try {
connection = BigtableConfiguration.connect(config);
} catch (IllegalStateException e) {
throw new RuntimeException(e);
}

return new HBaseOnlineRetriever(connection);
}

Expand Down

0 comments on commit 455e253

Please sign in to comment.