Skip to content

Commit 0841bd2

Browse files
authored
Apply Java checkstyle (#122)
1 parent 4249151 commit 0841bd2

32 files changed

+292
-193
lines changed

java/src/main/java/com/logicalclocks/hsfs/Feature.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,32 @@
2727
@AllArgsConstructor
2828
@NoArgsConstructor
2929
public class Feature {
30-
@Getter @Setter
30+
@Getter
31+
@Setter
3132
private String name;
3233

33-
@Getter @Setter
34+
@Getter
35+
@Setter
3436
private String type;
3537

36-
@Getter @Setter
38+
@Getter
39+
@Setter
3740
private String onlineType;
3841

39-
@Getter @Setter
42+
@Getter
43+
@Setter
4044
private String description;
4145

42-
@Getter @Setter
46+
@Getter
47+
@Setter
4348
private Boolean primary;
4449

45-
@Getter @Setter
50+
@Getter
51+
@Setter
4652
private Boolean partition;
4753

48-
@Getter @Setter
54+
@Getter
55+
@Setter
4956
private String defaultValue;
5057

5158
public Feature(@NonNull String name) {

java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,39 @@
4242
@JsonIgnoreProperties(ignoreUnknown = true)
4343
public class FeatureGroup extends FeatureGroupBase {
4444

45-
@Getter @Setter
45+
@Getter
46+
@Setter
4647
private Boolean onlineEnabled;
4748

48-
@Getter @Setter
49+
@Getter
50+
@Setter
4951
private String type = "cachedFeaturegroupDTO";
5052

51-
@Getter @Setter
53+
@Getter
54+
@Setter
5255
private TimeTravelFormat timeTravelFormat = TimeTravelFormat.HUDI;
5356

54-
@Getter @Setter
57+
@Getter
58+
@Setter
5559
protected String location;
5660

57-
@Getter @Setter
61+
@Getter
62+
@Setter
5863
@JsonProperty("descStatsEnabled")
5964
private Boolean statisticsEnabled;
6065

61-
@Getter @Setter
66+
@Getter
67+
@Setter
6268
@JsonProperty("featHistEnabled")
6369
private Boolean histograms;
6470

65-
@Getter @Setter
71+
@Getter
72+
@Setter
6673
@JsonProperty("featCorrEnabled")
6774
private Boolean correlations;
6875

69-
@Getter @Setter
76+
@Getter
77+
@Setter
7078
private List<String> statisticColumns;
7179

7280
@JsonIgnore
@@ -113,11 +121,11 @@ public Dataset<Row> read(boolean online) throws FeatureStoreException, IOExcepti
113121
return selectAll().read(online);
114122
}
115123

116-
public Dataset<Row> read(Map<String,String> readOptions) throws FeatureStoreException, IOException {
124+
public Dataset<Row> read(Map<String, String> readOptions) throws FeatureStoreException, IOException {
117125
return read(false, null);
118126
}
119127

120-
public Dataset<Row> read(boolean online, Map<String,String> readOptions) throws FeatureStoreException, IOException {
128+
public Dataset<Row> read(boolean online, Map<String, String> readOptions) throws FeatureStoreException, IOException {
121129
return selectAll().read(online, readOptions);
122130
}
123131

@@ -142,7 +150,7 @@ public Dataset<Row> read(String wallclockTime) throws FeatureStoreException, IOE
142150
* @throws FeatureStoreException
143151
* @throws IOException
144152
*/
145-
public Dataset<Row> read(String wallclockTime, Map<String,String> readOptions)
153+
public Dataset<Row> read(String wallclockTime, Map<String, String> readOptions)
146154
throws FeatureStoreException, IOException {
147155
return selectAll().asOf(wallclockTime).read(false, readOptions);
148156
}
@@ -151,7 +159,7 @@ public Dataset<Row> read(String wallclockTime, Map<String,String> readOptions)
151159
* Reads changes that occurred between specified points in time.
152160
*
153161
* @param wallclockStartTime start date.
154-
* @param wallclockEndTime end date.
162+
* @param wallclockEndTime end date.
155163
* @return DataFrame.
156164
* @throws FeatureStoreException
157165
* @throws IOException
@@ -165,12 +173,12 @@ public Dataset<Row> readChanges(String wallclockStartTime, String wallclockEndTi
165173
* Reads changes that occurred between specified points in time.
166174
*
167175
* @param wallclockStartTime start date.
168-
* @param wallclockEndTime end date.
176+
* @param wallclockEndTime end date.
169177
* @return DataFrame.
170178
* @throws FeatureStoreException
171179
* @throws IOException
172180
*/
173-
public Dataset<Row> readChanges(String wallclockStartTime, String wallclockEndTime, Map<String,String> readOptions)
181+
public Dataset<Row> readChanges(String wallclockStartTime, String wallclockEndTime, Map<String, String> readOptions)
174182
throws FeatureStoreException, IOException {
175183
return selectAll().pullChanges(wallclockStartTime, wallclockEndTime).read(false, readOptions);
176184
}
@@ -210,7 +218,7 @@ public void insert(Dataset<Row> featureData, boolean overwrite) throws IOExcepti
210218

211219
public void insert(Dataset<Row> featureData, Storage storage, boolean overwrite)
212220
throws IOException, FeatureStoreException {
213-
insert(featureData, storage, overwrite, null, null);
221+
insert(featureData, storage, overwrite, null, null);
214222
}
215223

216224
public void insert(Dataset<Row> featureData, boolean overwrite, Map<String, String> writeOptions)
@@ -222,7 +230,7 @@ public void insert(Dataset<Row> featureData, boolean overwrite, Map<String, Stri
222230
* Commit insert or upsert to time travel enabled Feature group.
223231
*
224232
* @param featureData dataframe to be committed.
225-
* @param operation commit operation type, INSERT or UPSERT.
233+
* @param operation commit operation type, INSERT or UPSERT.
226234
* @throws FeatureStoreException
227235
* @throws IOException
228236
*/
@@ -280,20 +288,22 @@ public void commitDeleteRecord(Dataset<Row> featureData, Map<String, String> wri
280288

281289
/**
282290
* Return commit details.
291+
*
283292
* @throws FeatureStoreException
284293
* @throws IOException
285294
*/
286-
public Map<String, Map<String,String>> commitDetails() throws IOException, FeatureStoreException {
295+
public Map<String, Map<String, String>> commitDetails() throws IOException, FeatureStoreException {
287296
return featureGroupEngine.commitDetails(this, null);
288297
}
289298

290299
/**
291300
* Return commit details.
301+
*
292302
* @param limit number of commits to return.
293303
* @throws FeatureStoreException
294304
* @throws IOException
295305
*/
296-
public Map<String, Map<String,String>> commitDetails(Integer limit) throws IOException, FeatureStoreException {
306+
public Map<String, Map<String, String>> commitDetails(Integer limit) throws IOException, FeatureStoreException {
297307
return featureGroupEngine.commitDetails(this, limit);
298308
}
299309

java/src/main/java/com/logicalclocks/hsfs/FeatureGroupCommit.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@
2828
@AllArgsConstructor
2929
@NoArgsConstructor
3030
@JsonIgnoreProperties(ignoreUnknown = true)
31-
public class FeatureGroupCommit extends RestDto<FeatureGroupCommit> {
32-
@Getter @Setter
31+
public class FeatureGroupCommit extends RestDto<FeatureGroupCommit> {
32+
@Getter
33+
@Setter
3334
private Long commitID;
34-
@Getter @Setter
35+
@Getter
36+
@Setter
3537
private String commitDateString;
36-
@Getter @Setter
38+
@Getter
39+
@Setter
3740
private Long rowsInserted;
38-
@Getter @Setter
41+
@Getter
42+
@Setter
3943
private Long rowsUpdated;
40-
@Getter @Setter
44+
@Getter
45+
@Setter
4146
private Long rowsDeleted;
4247
}

java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@
3333

3434
public class FeatureStore {
3535

36-
@Getter @Setter
36+
@Getter
37+
@Setter
3738
@JsonProperty("featurestoreId")
3839
private Integer id;
3940

40-
@Getter @Setter
41+
@Getter
42+
@Setter
4143
@JsonProperty("featurestoreName")
4244
private String name;
4345

44-
@Getter @Setter
46+
@Getter
47+
@Setter
4548
private Integer projectId;
4649

4750
private FeatureGroupApi featureGroupApi;
@@ -61,7 +64,7 @@ public FeatureStore() throws FeatureStoreException {
6164
/**
6265
* Get a feature group object from the feature store.
6366
*
64-
* @param name the name of the feature group
67+
* @param name the name of the feature group
6568
* @param version the version of the feature group
6669
* @return FeatureGroup
6770
* @throws FeatureStoreException
@@ -89,7 +92,7 @@ public FeatureGroup getFeatureGroup(String name) throws FeatureStoreException, I
8992
/**
9093
* Get a on-demand feature group object from the feature store.
9194
*
92-
* @param name the name of the feature group
95+
* @param name the name of the feature group
9396
* @param version the version of the feature group
9497
* @return OnDemandFeatureGroup
9598
* @throws FeatureStoreException
@@ -141,11 +144,11 @@ public TrainingDataset.TrainingDatasetBuilder createTrainingDataset() {
141144
return TrainingDataset.builder()
142145
.featureStore(this);
143146
}
144-
147+
145148
/**
146149
* Get a training dataset object from the selected feature store.
147150
*
148-
* @param name name of the training dataset
151+
* @param name name of the training dataset
149152
* @param version version to get
150153
* @return TrainingDataset
151154
* @throws FeatureStoreException

java/src/main/java/com/logicalclocks/hsfs/FsQuery.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,25 @@
2828
@AllArgsConstructor
2929
@NoArgsConstructor
3030
public class FsQuery {
31-
@Getter @Setter
31+
@Getter
32+
@Setter
3233
private String query;
3334

34-
@Getter @Setter
35+
@Getter
36+
@Setter
3537
private String queryOnline;
3638

37-
@Getter @Setter
39+
@Getter
40+
@Setter
3841
private List<OnDemandFeatureGroupAlias> onDemandFeatureGroups;
3942

40-
@Getter @Setter
43+
@Getter
44+
@Setter
4145
private List<HudiFeatureGroupAlias> hudiCachedFeatureGroups;
4246

4347
public void removeNewLines() {
4448
query = query.replace("\n", " ");
45-
queryOnline = queryOnline.replace("\n", " ");
49+
queryOnline = queryOnline.replace("\n", " ");
4650
}
4751

4852
public String getStorageQuery(Storage storage) throws FeatureStoreException {

java/src/main/java/com/logicalclocks/hsfs/HopsworksConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class HopsworksConnection implements Closeable {
7373
public HopsworksConnection(String host, int port, String project, Region region, SecretStore secretStore,
7474
boolean hostnameVerification, String trustStorePath,
7575
String certPath, String apiKeyFilePath, String apiKeyValue)
76-
throws IOException, FeatureStoreException {
76+
throws IOException, FeatureStoreException {
7777
this.host = host;
7878
this.port = port;
7979
this.project = project;

java/src/main/java/com/logicalclocks/hsfs/HudiFeatureGroupAlias.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@
2525
@NoArgsConstructor
2626
public class HudiFeatureGroupAlias {
2727

28-
@Getter @Setter
28+
@Getter
29+
@Setter
2930
private String alias;
3031

31-
@Getter @Setter
32+
@Getter
33+
@Setter
3234
private FeatureGroup featureGroup;
3335

34-
@Getter @Setter
36+
@Getter
37+
@Setter
3538
private Long leftFeatureGroupStartTimestamp;
3639

37-
@Getter @Setter
40+
@Getter
41+
@Setter
3842
private Long leftFeatureGroupEndTimestamp;
3943
}

java/src/main/java/com/logicalclocks/hsfs/OnDemandFeatureGroup.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@
3434
@JsonIgnoreProperties(ignoreUnknown = true)
3535
public class OnDemandFeatureGroup extends FeatureGroupBase {
3636

37-
@Getter @Setter
37+
@Getter
38+
@Setter
3839
private StorageConnector storageConnector;
3940

40-
@Getter @Setter
41+
@Getter
42+
@Setter
4143
private String query;
4244

43-
@Getter @Setter
45+
@Getter
46+
@Setter
4447
private String type = "onDemandFeaturegroupDTO";
4548

4649
private OnDemandFeatureGroupEngine onDemandFeatureGroupEngine = new OnDemandFeatureGroupEngine();

java/src/main/java/com/logicalclocks/hsfs/OnDemandFeatureGroupAlias.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
@NoArgsConstructor
2626
public class OnDemandFeatureGroupAlias {
2727

28-
@Getter @Setter
28+
@Getter
29+
@Setter
2930
private OnDemandFeatureGroup onDemandFeatureGroup;
3031

31-
@Getter @Setter
32+
@Getter
33+
@Setter
3234
private String alias;
3335
}

java/src/main/java/com/logicalclocks/hsfs/Project.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@
2323
@NoArgsConstructor
2424
public class Project {
2525

26-
@Getter @Setter
26+
@Getter
27+
@Setter
2728
private Integer projectId;
28-
@Getter @Setter
29+
@Getter
30+
@Setter
2931
private String projectName;
30-
@Getter @Setter
32+
@Getter
33+
@Setter
3134
private String owner;
3235

3336
public Project(Integer projectId) {

0 commit comments

Comments
 (0)