Skip to content
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

Fixing some deprecation warnings #4390

Merged
merged 2 commits into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()

This comment was marked as resolved.

.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