[
https://issues.apache.org/jira/browse/BEAM-6725?focusedWorklogId=205118&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-205118
]
ASF GitHub Bot logged work on BEAM-6725:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Feb/19 12:18
Start Date: 27/Feb/19 12:18
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #7941: [BEAM-6725] share
some Flink job invocation code with Samza runner
URL: https://github.com/apache/beam/pull/7941#discussion_r260720670
##########
File path:
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/jobsubmission/JobInvocation.java
##########
@@ -17,31 +17,173 @@
*/
package org.apache.beam.runners.fnexecution.jobsubmission;
+import static
org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
+import static
org.apache.beam.vendor.guava.v20_0.com.google.common.base.Throwables.getRootCause;
+import static
org.apache.beam.vendor.guava.v20_0.com.google.common.base.Throwables.getStackTraceAsString;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.function.Consumer;
+import javax.annotation.Nullable;
import org.apache.beam.model.jobmanagement.v1.JobApi.JobMessage;
import org.apache.beam.model.jobmanagement.v1.JobApi.JobState;
import org.apache.beam.model.jobmanagement.v1.JobApi.JobState.Enum;
+import org.apache.beam.model.pipeline.v1.RunnerApi;
+import org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline;
+import org.apache.beam.sdk.PipelineResult;
+import
org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.FutureCallback;
+import
org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.Futures;
+import
org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.ListenableFuture;
+import
org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.ListeningExecutorService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/** Internal representation of a Job which has been invoked (prepared and run)
by a client. */
-public interface JobInvocation {
+public abstract class JobInvocation {
+
+ protected abstract PipelineResult run(Pipeline pipeline) throws Exception;
Review comment:
Please move method declarations after field declarations. We do not enforce
this with a check but I think it is considered good practice and I haven't seen
this anywhere else in Beam.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 205118)
Time Spent: 20m (was: 10m)
> Move runner-agnostic code out of FlinkJobInvocation
> ---------------------------------------------------
>
> Key: BEAM-6725
> URL: https://issues.apache.org/jira/browse/BEAM-6725
> Project: Beam
> Issue Type: Task
> Components: runner-flink, runner-samza, runner-spark
> Reporter: Kyle Weaver
> Assignee: Kyle Weaver
> Priority: Major
> Labels: portability
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Like BEAM-6714, FlinkJobInvocation contains some code (for asynchronously
> running jobs) that isn't really Flink specific and therefore could/should be
> reused by other portable runners. I'm thinking instead of an interface,
> JobInvocation should be made an abstract class that implements the methods
> that it currently abstracts, with an abstract method `runPipeline` for the
> runner-specific details.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)