Skip to content

Commit

Permalink
Fixed bug in featurset proto to model conversion in DataflowJobManager (
Browse files Browse the repository at this point in the history
#578)

Bug caused by toString() method being used in the conversion lambda instead of
the getName() method.  Since lambda duplicates functionality already
implemented by Feature.fromProto, removing the lambda block in favor
using the method to do the conversion.

Co-authored-by: Zhu Zhanyan <zhu.zhanyan@gojek.com>
  • Loading branch information
mrzzy and Zhu Zhanyan authored Mar 27, 2020
1 parent 901e260 commit 90debca
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,7 @@ private Job submitDataflowJob(
ImportOptions pipelineOptions = getPipelineOptions(jobName, featureSetProtos, sink, update);
DataflowPipelineJob pipelineResult = runPipeline(pipelineOptions);
List<FeatureSet> featureSets =
featureSetProtos.stream()
.map(
fsp -> {
FeatureSet featureSet = new FeatureSet();
featureSet.setName(fsp.getSpec().toString());
featureSet.setVersion(fsp.getSpec().getVersion());
featureSet.setProject(new Project(fsp.getSpec().getProject()));
return featureSet;
})
.collect(Collectors.toList());
featureSetProtos.stream().map(FeatureSet::fromProto).collect(Collectors.toList());
String jobId = waitForJobToRun(pipelineResult);
return new Job(
jobName,
Expand Down

0 comments on commit 90debca

Please sign in to comment.