Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Nov 7, 2022
1 parent 8cb1942 commit 099a16c
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -217,14 +217,12 @@ public synchronized void createClient(

BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder();
if (request.hasPerOperationTimeout()) {
com.google.protobuf.Duration timeoutFromReq = request.getPerOperationTimeout();
Duration newTimeout =
Duration.ofSeconds(timeoutFromReq.getSeconds(), timeoutFromReq.getNanos());
Duration newTimeout = Duration.ofMillis(Durations.toMillis(request.getPerOperationTimeout()));
settingsBuilder = overrideTimeoutSetting(newTimeout, settingsBuilder);
logger.info(
String.format(
"Total timeout is set to %s for all the methods",
Durations.toString(timeoutFromReq)));
Durations.toString(request.getPerOperationTimeout())));
}

// Create and store CbtClient for later use
Expand Down

0 comments on commit 099a16c

Please sign in to comment.