Skip to content

Commit

Permalink
Fixing some deprecation warnings (#4390)
Browse files Browse the repository at this point in the history
* fixing some deprecation warnings

* updated comment
  • Loading branch information
elisheva-qlogic authored and sduskis committed Jan 25, 2019
1 parent 9c47e1b commit b92a48b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ public Void call() {

// Handle RPC level errors by wrapping them in a MutateRowsException
ApiFuture<List<MutateRowsResponse>> catching =
ApiFutures.catching(innerFuture, Throwable.class, attemptFailedCallback);
ApiFutures.catching(
innerFuture, Throwable.class, attemptFailedCallback, MoreExecutors.directExecutor());

// Inspect the results and either propagate the success, or prepare to retry the failed
// mutations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,8 @@ private void waitForPort(int port) throws InterruptedException, TimeoutException
}

private ManagedChannel createChannel(int port) {
// NOTE: usePlaintext is currently @ExperimentalAPI. In grpc 1.11 it be became parameterless.
// In 1.12 it should be stable. See https://github.com/grpc/grpc-java/issues/1772 for discussion
return ManagedChannelBuilder.forAddress("localhost", port)
.usePlaintext(true)
.usePlaintext()
.maxInboundMessageSize(256 * 1024 * 1024)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,8 @@ private static String getActiveGoogleCloudConfig(File configDir) {
String activeGoogleCloudConfig = null;
try {
activeGoogleCloudConfig =
Files.readFirstLine(new File(configDir, "active_config"), Charset.defaultCharset());
Files.asCharSource(new File(configDir, "active_config"), Charset.defaultCharset())
.readFirstLine();
} catch (IOException ex) {
// ignore
}
Expand Down

0 comments on commit b92a48b

Please sign in to comment.