[
https://issues.apache.org/jira/browse/BEAM-2863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16331111#comment-16331111
]
ASF GitHub Bot commented on BEAM-2863:
--------------------------------------
lukecwik closed pull request #4440: [BEAM-2863] Migrate away from deprecated
methods in Guava
URL: https://github.com/apache/beam/pull/4440
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
b/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
index efbfe19760f..fa51308d04e 100644
---
a/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
+++
b/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java
@@ -18,9 +18,9 @@
package org.apache.beam.runners.fnexecution.control;
import com.google.auto.value.AutoValue;
-import com.google.common.base.Function;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.MoreExecutors;
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.beam.model.fnexecution.v1.BeamFnApi;
@@ -115,12 +115,8 @@ public SdkHarnessClient withIdGenerator(IdGenerator
idGenerator) {
return Futures.transform(
genericResponse,
- new Function<BeamFnApi.InstructionResponse,
BeamFnApi.RegisterResponse>() {
- @Override
- public BeamFnApi.RegisterResponse
apply(BeamFnApi.InstructionResponse input) {
- return input.getRegister();
- }
- });
+ input -> input.getRegister(),
+ MoreExecutors.directExecutor());
}
/**
@@ -164,12 +160,8 @@ public void accept(Object input) throws Exception {
ListenableFuture<BeamFnApi.ProcessBundleResponse> specificResponse =
Futures.transform(
genericResponse,
- new Function<BeamFnApi.InstructionResponse,
BeamFnApi.ProcessBundleResponse>() {
- @Override
- public BeamFnApi.ProcessBundleResponse
apply(BeamFnApi.InstructionResponse input) {
- return input.getProcessBundle();
- }
- });
+ input -> input.getProcessBundle(),
+ MoreExecutors.directExecutor());
return ActiveBundle.create(bundleId, specificResponse, dataReceiver);
}
diff --git
a/sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/SocketAddressFactory.java
b/sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/SocketAddressFactory.java
index 090cc75a383..640931d694e 100644
---
a/sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/SocketAddressFactory.java
+++
b/sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/SocketAddressFactory.java
@@ -58,7 +58,7 @@ public static SocketAddress createFrom(String value) {
HostAndPort hostAndPort = HostAndPort.fromString(value);
checkArgument(hostAndPort.hasPort(),
"Address must be a unix:// path or be in the form host:port. Got:
%s", value);
- return new InetSocketAddress(hostAndPort.getHostText(),
hostAndPort.getPort());
+ return new InetSocketAddress(hostAndPort.getHost(),
hostAndPort.getPort());
}
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add support for Side Inputs over the Fn API
> -------------------------------------------
>
> Key: BEAM-2863
> URL: https://issues.apache.org/jira/browse/BEAM-2863
> Project: Beam
> Issue Type: Improvement
> Components: beam-model
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: Major
> Labels: portability
> Fix For: 2.3.0
>
>
> See:
> * https://s.apache.org/beam-side-inputs-1-pager
> * http://s.apache.org/beam-fn-api-state-api
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)