Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
SirOibaf committed Oct 22, 2020
1 parent 38d9291 commit 4942e6b
Show file tree
Hide file tree
Showing 24 changed files with 213 additions and 133 deletions.
21 changes: 14 additions & 7 deletions java/src/main/java/com/logicalclocks/hsfs/Feature.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,32 @@
@AllArgsConstructor
@NoArgsConstructor
public class Feature {
@Getter @Setter
@Getter
@Setter
private String name;

@Getter @Setter
@Getter
@Setter
private String type;

@Getter @Setter
@Getter
@Setter
private String onlineType;

@Getter @Setter
@Getter
@Setter
private String description;

@Getter @Setter
@Getter
@Setter
private Boolean primary;

@Getter @Setter
@Getter
@Setter
private Boolean partition;

@Getter @Setter
@Getter
@Setter
private String defaultValue;

public Feature(@NonNull String name) {
Expand Down
48 changes: 32 additions & 16 deletions java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,52 +47,68 @@
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class FeatureGroup {
@Getter @Setter
@Getter
@Setter
private Integer id;

@Getter @Setter
@Getter
@Setter
private String name;

@Getter @Setter
@Getter
@Setter
private Integer version;

@Getter @Setter @With
@Getter
@Setter
@With
private String description;

@Getter @Setter
@Getter
@Setter
private FeatureStore featureStore;

@Getter @Setter @With
@Getter
@Setter
@With
private List<Feature> features;

@Getter @Setter
@Getter
@Setter
private Date created;

@Getter
private String creator;

@Getter @Setter
@Getter
@Setter
private Storage defaultStorage;

@Getter @Setter
@Getter
@Setter
private Boolean onlineEnabled;

@Getter @Setter
@Getter
@Setter
private String type = "cachedFeaturegroupDTO";

@Getter @Setter
@Getter
@Setter
@JsonProperty("descStatsEnabled")
private Boolean statisticsEnabled;

@Getter @Setter
@Getter
@Setter
@JsonProperty("featHistEnabled")
private Boolean histograms;

@Getter @Setter
@Getter
@Setter
@JsonProperty("featCorrEnabled")
private Boolean correlations;

@Getter @Setter
@Getter
@Setter
private List<String> statisticColumns;

@JsonIgnore
Expand Down Expand Up @@ -144,7 +160,7 @@ public Query selectAll() throws FeatureStoreException, IOException {
public Query select(List<String> features) throws FeatureStoreException, IOException {
// Create a feature object for each string feature given by the user.
// For the query building each feature need only the name set.
List<Feature> featureObjList = features.stream().map(Feature::new).collect(Collectors.toList());
List<Feature> featureObjList = features.stream().map(Feature::new).collect(Collectors.toList());
return selectFeatures(featureObjList);
}

Expand Down Expand Up @@ -312,7 +328,7 @@ public void addTag(String name) throws FeatureStoreException, IOException {
/**
* Add name/value tag to the feature group.
*
* @param name name of the tag
* @param name name of the tag
* @param value value of the tag
* @throws FeatureStoreException
* @throws IOException
Expand Down
15 changes: 9 additions & 6 deletions java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@

public class FeatureStore {

@Getter @Setter
@Getter
@Setter
@JsonProperty("featurestoreId")
private Integer id;

@Getter @Setter
@Getter
@Setter
@JsonProperty("featurestoreName")
private String name;

@Getter @Setter
@Getter
@Setter
private Integer projectId;

private FeatureGroupApi featureGroupApi;
Expand All @@ -61,7 +64,7 @@ public FeatureStore() throws FeatureStoreException {
/**
* Get a feature group object from the feature store.
*
* @param name the name of the feature group
* @param name the name of the feature group
* @param version the version of the feature group
* @return FeatureGroup
* @throws FeatureStoreException
Expand Down Expand Up @@ -104,11 +107,11 @@ public TrainingDataset.TrainingDatasetBuilder createTrainingDataset() {
return TrainingDataset.builder()
.featureStore(this);
}

/**
* Get a training dataset object from the selected feature store.
*
* @param name name of the training dataset
* @param name name of the training dataset
* @param version version to get
* @return TrainingDataset
* @throws FeatureStoreException
Expand Down
8 changes: 5 additions & 3 deletions java/src/main/java/com/logicalclocks/hsfs/FsQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
@AllArgsConstructor
@NoArgsConstructor
public class FsQuery {
@Getter @Setter
@Getter
@Setter
private String query;

@Getter @Setter
@Getter
@Setter
private String queryOnline;

public void removeNewLines() {
query = query.replace("\n", " ");
queryOnline = queryOnline.replace("\n", " ");
queryOnline = queryOnline.replace("\n", " ");
}

public String getStorageQuery(Storage storage) throws FeatureStoreException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class HopsworksConnection implements Closeable {
public HopsworksConnection(String host, int port, String project, Region region, SecretStore secretStore,
boolean hostnameVerification, String trustStorePath,
String certPath, String apiKeyFilePath, String apiKeyValue)
throws IOException, FeatureStoreException {
throws IOException, FeatureStoreException {
this.host = host;
this.port = port;
this.project = project;
Expand Down
9 changes: 6 additions & 3 deletions java/src/main/java/com/logicalclocks/hsfs/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
@NoArgsConstructor
public class Project {

@Getter @Setter
@Getter
@Setter
private Integer projectId;
@Getter @Setter
@Getter
@Setter
private String projectName;
@Getter @Setter
@Getter
@Setter
private String owner;

public Project(Integer projectId) {
Expand Down
6 changes: 4 additions & 2 deletions java/src/main/java/com/logicalclocks/hsfs/Split.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
@AllArgsConstructor
@NoArgsConstructor
public class Split {
@Getter @Setter
@Getter
@Setter
private String name;

@Getter @Setter
@Getter
@Setter
private Float percentage;
}
36 changes: 23 additions & 13 deletions java/src/main/java/com/logicalclocks/hsfs/StorageConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,44 @@
@ToString
public class StorageConnector {

@Getter @Setter
@Getter
@Setter
private Integer id;

@Getter @Setter
@Getter
@Setter
private String name;

@Getter @Setter
@Getter
@Setter
private String accessKey;

@Getter @Setter
@Getter
@Setter
private String secretKey;

@Getter @Setter

@Getter
@Setter
private String serverEncryptionAlgorithm;

@Getter @Setter

@Getter
@Setter
private String serverEncryptionKey;

@Getter @Setter

@Getter
@Setter
private String bucket;

@Getter @Setter
@Getter
@Setter
private String connectionString;

@Getter @Setter
@Getter
@Setter
private String arguments;

@Getter @Setter
@Getter
@Setter
private StorageConnectorType storageConnectorType;

public Map<String, String> getSparkOptions() throws FeatureStoreException {
Expand Down
Loading

0 comments on commit 4942e6b

Please sign in to comment.