Skip to content

Commit

Permalink
Deduplicate storage ids before we fetch them (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
tims authored and feast-ci-bot committed Jan 14, 2019
1 parent 6dc20dc commit f675650
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ingestion/src/main/java/feast/ingestion/model/Specs.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import feast.ingestion.service.SpecService;
import feast.specs.EntitySpecProto.EntitySpec;
import feast.specs.FeatureSpecProto.FeatureSpec;
Expand All @@ -30,6 +31,7 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
Expand Down Expand Up @@ -63,7 +65,7 @@ public static Specs of(String jobName, ImportSpec importSpec, SpecService specSe
specsBuilder.featureSpecs(specService.getFeatureSpecs(featureIds));

List<String> entityNames = importSpec.getEntitiesList();
List<String> storageIds = Lists.newArrayList();
Set<String> storageIds = Sets.newHashSet();
for (FeatureSpec featureSpec : specsBuilder.featureSpecs.values()) {
Preconditions.checkArgument(
entityNames.contains(featureSpec.getEntity()),
Expand Down

0 comments on commit f675650

Please sign in to comment.