Search in sources :

Example 11 with JobInfo

use of org.apache.beam.runners.fnexecution.provisioning.JobInfo in project beam by apache.

the class SparkJobInvoker method createJobInvocation.

static JobInvocation createJobInvocation(String invocationId, String retrievalToken, ListeningExecutorService executorService, Pipeline pipeline, SparkPipelineOptions sparkOptions) {
    JobInfo jobInfo = JobInfo.create(invocationId, sparkOptions.getJobName(), retrievalToken, PipelineOptionsTranslation.toProto(sparkOptions));
    PortablePipelineRunner pipelineRunner;
    if (Strings.isNullOrEmpty(sparkOptions.as(PortablePipelineOptions.class).getOutputExecutablePath())) {
        pipelineRunner = new SparkPipelineRunner(sparkOptions);
    } else {
        pipelineRunner = new PortablePipelineJarCreator(SparkPipelineRunner.class);
    }
    return new JobInvocation(jobInfo, executorService, pipeline, pipelineRunner);
}
Also used : PortablePipelineRunner(org.apache.beam.runners.jobsubmission.PortablePipelineRunner) JobInfo(org.apache.beam.runners.fnexecution.provisioning.JobInfo) PortablePipelineJarCreator(org.apache.beam.runners.jobsubmission.PortablePipelineJarCreator) JobInvocation(org.apache.beam.runners.jobsubmission.JobInvocation)

Aggregations

JobInfo (org.apache.beam.runners.fnexecution.provisioning.JobInfo)11 PortablePipelineRunner (org.apache.beam.runners.jobsubmission.PortablePipelineRunner)5 RunnerApi (org.apache.beam.model.pipeline.v1.RunnerApi)4 Pipeline (org.apache.beam.model.pipeline.v1.RunnerApi.Pipeline)4 PortablePipelineResult (org.apache.beam.runners.jobsubmission.PortablePipelineResult)4 PTransformTranslation (org.apache.beam.runners.core.construction.PTransformTranslation)3 ExecutableStage (org.apache.beam.runners.core.construction.graph.ExecutableStage)3 GreedyPipelineFuser (org.apache.beam.runners.core.construction.graph.GreedyPipelineFuser)3 ProtoOverrides (org.apache.beam.runners.core.construction.graph.ProtoOverrides)3 SplittableParDoExpander (org.apache.beam.runners.core.construction.graph.SplittableParDoExpander)3 TrivialNativeTransformExpander (org.apache.beam.runners.core.construction.graph.TrivialNativeTransformExpander)3 MetricsEnvironment (org.apache.beam.sdk.metrics.MetricsEnvironment)3 Struct (org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.Struct)3 CmdLineException (org.kohsuke.args4j.CmdLineException)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 Map (java.util.Map)2 UUID (java.util.UUID)2 ArtifactApi (org.apache.beam.model.jobmanagement.v1.ArtifactApi)2 PipelineOptionsTranslation (org.apache.beam.runners.core.construction.PipelineOptionsTranslation)2