Skip to content

Commit

Permalink
address comments`
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Dec 3, 2024
1 parent 415ef20 commit 5f91623
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.google.bigtable.v2.PingAndWarmRequest;
import com.google.bigtable.v2.PingAndWarmResponse;
import io.grpc.CallCredentials;
import io.grpc.CallOptions;
import io.grpc.ClientCall;
import io.grpc.Deadline;
import io.grpc.ManagedChannel;
Expand Down Expand Up @@ -104,8 +105,7 @@ private void sendPrimeRequests(ManagedChannel managedChannel) {
ClientCall<PingAndWarmRequest, PingAndWarmResponse> clientCall =
managedChannel.newCall(
BigtableGrpc.getPingAndWarmMethod(),
GrpcCallContext.createDefault()
.getCallOptions()
CallOptions.DEFAULT
.withCallCredentials(callCredentials)
.withDeadline(Deadline.after(1, TimeUnit.MINUTES)));

Expand Down Expand Up @@ -138,11 +138,11 @@ public void onClose(Status status, Metadata trailers) {
// TODO: Not sure if we should swallow the error here. We are pre-emptively swapping
// channels if the new
// channel is bad.
LOG.warning(String.format("Failed to prime channel: %s", e));
LOG.log(Level.WARNING, "failed to prime channel", e);
}
}

private Metadata createMetadata(Map<String, String> headers, PingAndWarmRequest request) {
private static Metadata createMetadata(Map<String, String> headers, PingAndWarmRequest request) {
Metadata metadata = new Metadata();

headers.forEach(
Expand Down

0 comments on commit 5f91623

Please sign in to comment.