Skip to content

Commit aaaf9e6

Browse files
author
zhilingc
committed
Apply spotless
1 parent 73806e3 commit aaaf9e6

3 files changed

Lines changed: 32 additions & 32 deletions

File tree

ingestion/src/main/java/feast/ingestion/options/ImportOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
public interface ImportOptions extends PipelineOptions, DataflowPipelineOptions, DirectOptions {
2929

3030
@Required
31-
@Description("Default feast project to apply to incoming rows that do not specify project in its feature set reference.")
31+
@Description(
32+
"Default feast project to apply to incoming rows that do not specify project in its feature set reference.")
3233
String getDefaultFeastProject();
3334

3435
void setDefaultFeastProject(String defaultProject);

ingestion/src/main/java/feast/ingestion/transform/fn/ProcessFeatureRowDoFn.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public void processElement(ProcessContext context) {
3232
FeatureRow featureRow = context.element();
3333
String featureSetId = stripVersion(featureRow.getFeatureSet());
3434
featureSetId = applyDefaultProject(featureSetId);
35-
featureRow =
36-
featureRow.toBuilder().setFeatureSet(featureSetId).build();
35+
featureRow = featureRow.toBuilder().setFeatureSet(featureSetId).build();
3736
context.output(featureRow);
3837
}
3938

ingestion/src/test/java/feast/ingestion/transform/ProcessAndValidateFeatureRowsTest.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void shouldStripVersions() {
159159
.setCoder(ProtoCoder.of(FeatureRow.class))
160160
.apply(
161161
ProcessAndValidateFeatureRows.newBuilder()
162-
.setDefaultProject("myproject")
162+
.setDefaultProject("myproject")
163163
.setFailureTag(FAILURE_TAG)
164164
.setSuccessTag(SUCCESS_TAG)
165165
.setFeatureSetSpecs(featureSetSpecs)
@@ -173,24 +173,24 @@ public void shouldStripVersions() {
173173
@Test
174174
public void shouldApplyDefaultProject() {
175175
FeatureSetSpec fs1 =
176-
FeatureSetSpec.newBuilder()
177-
.setName("feature_set")
178-
.setProject("myproject")
179-
.addEntities(
180-
EntitySpec.newBuilder()
181-
.setName("entity_id_primary")
182-
.setValueType(Enum.INT32)
183-
.build())
184-
.addEntities(
185-
EntitySpec.newBuilder()
186-
.setName("entity_id_secondary")
187-
.setValueType(Enum.STRING)
188-
.build())
189-
.addFeatures(
190-
FeatureSpec.newBuilder().setName("feature_1").setValueType(Enum.STRING).build())
191-
.addFeatures(
192-
FeatureSpec.newBuilder().setName("feature_2").setValueType(Enum.INT64).build())
193-
.build();
176+
FeatureSetSpec.newBuilder()
177+
.setName("feature_set")
178+
.setProject("myproject")
179+
.addEntities(
180+
EntitySpec.newBuilder()
181+
.setName("entity_id_primary")
182+
.setValueType(Enum.INT32)
183+
.build())
184+
.addEntities(
185+
EntitySpec.newBuilder()
186+
.setName("entity_id_secondary")
187+
.setValueType(Enum.STRING)
188+
.build())
189+
.addFeatures(
190+
FeatureSpec.newBuilder().setName("feature_1").setValueType(Enum.STRING).build())
191+
.addFeatures(
192+
FeatureSpec.newBuilder().setName("feature_2").setValueType(Enum.INT64).build())
193+
.build();
194194

195195
Map<String, FeatureSetSpec> featureSetSpecs = new HashMap<>();
196196
featureSetSpecs.put("myproject/feature_set", fs1);
@@ -204,15 +204,15 @@ public void shouldApplyDefaultProject() {
204204
input.add(randomRow);
205205

206206
PCollectionTuple output =
207-
p.apply(Create.of(input))
208-
.setCoder(ProtoCoder.of(FeatureRow.class))
209-
.apply(
210-
ProcessAndValidateFeatureRows.newBuilder()
211-
.setDefaultProject("myproject")
212-
.setFailureTag(FAILURE_TAG)
213-
.setSuccessTag(SUCCESS_TAG)
214-
.setFeatureSetSpecs(featureSetSpecs)
215-
.build());
207+
p.apply(Create.of(input))
208+
.setCoder(ProtoCoder.of(FeatureRow.class))
209+
.apply(
210+
ProcessAndValidateFeatureRows.newBuilder()
211+
.setDefaultProject("myproject")
212+
.setFailureTag(FAILURE_TAG)
213+
.setSuccessTag(SUCCESS_TAG)
214+
.setFeatureSetSpecs(featureSetSpecs)
215+
.build());
216216

217217
PAssert.that(output.get(SUCCESS_TAG)).containsInAnyOrder(expected);
218218

@@ -263,7 +263,7 @@ public void shouldExcludeUnregisteredFields() {
263263
.setCoder(ProtoCoder.of(FeatureRow.class))
264264
.apply(
265265
ProcessAndValidateFeatureRows.newBuilder()
266-
.setDefaultProject("myproject")
266+
.setDefaultProject("myproject")
267267
.setFailureTag(FAILURE_TAG)
268268
.setSuccessTag(SUCCESS_TAG)
269269
.setFeatureSetSpecs(featureSets)

0 commit comments

Comments
 (0)