@@ -67,7 +67,7 @@ public DataflowJobManager(
6767
6868 @ Override
6969 public String startJob (String name , List <FeatureSetSpec > featureSets , Store sink ) {
70- return submitDataflowJob (featureSets , sink , false );
70+ return submitDataflowJob (name , featureSets , sink , false );
7171 }
7272
7373 /**
@@ -83,7 +83,7 @@ public String updateJob(JobInfo jobInfo) {
8383 for (FeatureSet featureSet : jobInfo .getFeatureSets ()) {
8484 featureSetSpecs .add (featureSet .toProto ());
8585 }
86- return submitDataflowJob (featureSetSpecs , jobInfo .getStore ().toProto (), true );
86+ return submitDataflowJob (jobInfo . getId (), featureSetSpecs , jobInfo .getStore ().toProto (), true );
8787 } catch (InvalidProtocolBufferException e ) {
8888 throw new RuntimeException (String .format ("Unable to update job %s" , jobInfo .getId ()), e );
8989 }
@@ -118,9 +118,9 @@ public void abortJob(String dataflowJobId) {
118118 }
119119 }
120120
121- private String submitDataflowJob (List <FeatureSetSpec > featureSets , Store sink , boolean update ) {
121+ private String submitDataflowJob (String jobName , List <FeatureSetSpec > featureSets , Store sink , boolean update ) {
122122 try {
123- ImportJobPipelineOptions pipelineOptions = getPipelineOptions (featureSets , sink , update );
123+ ImportJobPipelineOptions pipelineOptions = getPipelineOptions (jobName , featureSets , sink , update );
124124 DataflowPipelineJob pipelineResult = runPipeline (pipelineOptions );
125125 String jobId = waitForJobToRun (pipelineResult );
126126 return jobId ;
@@ -130,7 +130,7 @@ private String submitDataflowJob(List<FeatureSetSpec> featureSets, Store sink, b
130130 }
131131 }
132132
133- private ImportJobPipelineOptions getPipelineOptions (List <FeatureSetSpec > featureSets , Store sink ,
133+ private ImportJobPipelineOptions getPipelineOptions (String jobName , List <FeatureSetSpec > featureSets , Store sink ,
134134 boolean update ) throws InvalidProtocolBufferException {
135135 String [] args = TypeConversion .convertJsonStringToArgs (defaults .getImportJobOptions ());
136136 ImportJobPipelineOptions pipelineOptions = PipelineOptionsFactory .fromArgs (args )
@@ -145,6 +145,7 @@ private ImportJobPipelineOptions getPipelineOptions(List<FeatureSetSpec> feature
145145 pipelineOptions .setProject (projectId );
146146 pipelineOptions .setUpdate (update );
147147 pipelineOptions .setRunner (DataflowRunner .class );
148+ pipelineOptions .setJobName (jobName );
148149 return pipelineOptions ;
149150 }
150151
0 commit comments