diff --git a/java/src/main/java/com/logicalclocks/hsfs/Feature.java b/java/src/main/java/com/logicalclocks/hsfs/Feature.java index 00ade31567..f1b9c4252c 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/Feature.java +++ b/java/src/main/java/com/logicalclocks/hsfs/Feature.java @@ -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) { diff --git a/java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java b/java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java index a6fa510481..318c662c32 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java +++ b/java/src/main/java/com/logicalclocks/hsfs/FeatureGroup.java @@ -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 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 statisticColumns; @JsonIgnore @@ -144,7 +160,7 @@ public Query selectAll() throws FeatureStoreException, IOException { public Query select(List 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 featureObjList = features.stream().map(Feature::new).collect(Collectors.toList()); + List featureObjList = features.stream().map(Feature::new).collect(Collectors.toList()); return selectFeatures(featureObjList); } @@ -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 diff --git a/java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java b/java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java index d0a4d176ca..852ca62768 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java +++ b/java/src/main/java/com/logicalclocks/hsfs/FeatureStore.java @@ -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; @@ -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 @@ -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 diff --git a/java/src/main/java/com/logicalclocks/hsfs/FsQuery.java b/java/src/main/java/com/logicalclocks/hsfs/FsQuery.java index 64c302b18e..bc690e84af 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/FsQuery.java +++ b/java/src/main/java/com/logicalclocks/hsfs/FsQuery.java @@ -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 { diff --git a/java/src/main/java/com/logicalclocks/hsfs/HopsworksConnection.java b/java/src/main/java/com/logicalclocks/hsfs/HopsworksConnection.java index 05453f18bf..1bd2ea2855 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/HopsworksConnection.java +++ b/java/src/main/java/com/logicalclocks/hsfs/HopsworksConnection.java @@ -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; diff --git a/java/src/main/java/com/logicalclocks/hsfs/Project.java b/java/src/main/java/com/logicalclocks/hsfs/Project.java index 860f374184..a73050d695 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/Project.java +++ b/java/src/main/java/com/logicalclocks/hsfs/Project.java @@ -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) { diff --git a/java/src/main/java/com/logicalclocks/hsfs/Split.java b/java/src/main/java/com/logicalclocks/hsfs/Split.java index f5c4cd5247..2b570548ba 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/Split.java +++ b/java/src/main/java/com/logicalclocks/hsfs/Split.java @@ -24,9 +24,11 @@ @AllArgsConstructor @NoArgsConstructor public class Split { - @Getter @Setter + @Getter + @Setter private String name; - @Getter @Setter + @Getter + @Setter private Float percentage; } diff --git a/java/src/main/java/com/logicalclocks/hsfs/StorageConnector.java b/java/src/main/java/com/logicalclocks/hsfs/StorageConnector.java index 4223634e15..e926136477 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/StorageConnector.java +++ b/java/src/main/java/com/logicalclocks/hsfs/StorageConnector.java @@ -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 getSparkOptions() throws FeatureStoreException { diff --git a/java/src/main/java/com/logicalclocks/hsfs/TrainingDataset.java b/java/src/main/java/com/logicalclocks/hsfs/TrainingDataset.java index 975bb6bf82..742c184a6d 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/TrainingDataset.java +++ b/java/src/main/java/com/logicalclocks/hsfs/TrainingDataset.java @@ -37,64 +37,82 @@ @NoArgsConstructor public class TrainingDataset { - @Getter @Setter + @Getter + @Setter private Integer id; - @Getter @Setter + @Getter + @Setter private String name; - @Getter @Setter + @Getter + @Setter private Integer version; - @Getter @Setter + @Getter + @Setter private String description; - @Getter @Setter + @Getter + @Setter private DataFormat dataFormat; - @Getter @Setter + @Getter + @Setter private TrainingDatasetType trainingDatasetType = TrainingDatasetType.HOPSFS_TRAINING_DATASET; - @Getter @Setter + @Getter + @Setter private List features; - @Getter @Setter + @Getter + @Setter @JsonIgnore private FeatureStore featureStore; - @Getter @Setter + @Getter + @Setter private Integer storageConnectorId; - @Getter @Setter + @Getter + @Setter @JsonIgnore private StorageConnector storageConnector; - @Getter @Setter + @Getter + @Setter private String location; - @Getter @Setter + @Getter + @Setter private Long seed; - @Getter @Setter + @Getter + @Setter private List splits; - @Getter @Setter + @Getter + @Setter @JsonIgnore private Boolean statisticsEnabled = true; - @Getter @Setter + @Getter + @Setter @JsonIgnore private Boolean histograms; - @Getter @Setter + @Getter + @Setter @JsonIgnore private Boolean correlations; - @Getter @Setter + @Getter + @Setter @JsonIgnore private List statisticColumns; - @Getter @Setter + @Getter + @Setter @JsonProperty("queryDTO") private Query queryInt; @@ -155,7 +173,7 @@ public void save(Dataset dataset) throws FeatureStoreException, IOException /** * Create the training dataset based on the content of the feature store query. * - * @param query the query to save as training dataset + * @param query the query to save as training dataset * @param writeOptions options to pass to the Spark write operation * @throws FeatureStoreException * @throws IOException @@ -168,7 +186,7 @@ public void save(Query query, Map writeOptions) throws FeatureSt /** * Create the training dataset based on teh content of the dataset. * - * @param dataset the dataset to save as training dataset + * @param dataset the dataset to save as training dataset * @param writeOptions options to pass to the Spark write operation * @throws FeatureStoreException * @throws IOException @@ -184,7 +202,7 @@ public void save(Dataset dataset, Map writeOptions) /** * Insert the content of the feature store query in the training dataset. * - * @param query the query to write as training dataset + * @param query the query to write as training dataset * @param overwrite true to overwrite the current content of the training dataset * @throws FeatureStoreException * @throws IOException @@ -196,7 +214,7 @@ public void insert(Query query, boolean overwrite) throws FeatureStoreException, /** * Insert the content of the dataset in the training dataset. * - * @param dataset the dataset to write as training dataset + * @param dataset the dataset to write as training dataset * @param overwrite true to overwrite the current content of the training dataset * @throws FeatureStoreException * @throws IOException @@ -208,8 +226,8 @@ public void insert(Dataset dataset, boolean overwrite) throws FeatureStoreE /** * Insert the content of the feature store query in the training dataset. * - * @param query the query to execute to generate the training dataset - * @param overwrite true to overwrite the current content of the training dataset + * @param query the query to execute to generate the training dataset + * @param overwrite true to overwrite the current content of the training dataset * @param writeOptions options to pass to the Spark write operation * @throws FeatureStoreException * @throws IOException @@ -224,8 +242,8 @@ public void insert(Query query, boolean overwrite, Map writeOpti /** * Insert the content of the dataset in the training dataset. * - * @param dataset the spark dataframe to write as training dataset - * @param overwrite true to overwrite the current content of the training dataset + * @param dataset the spark dataframe to write as training dataset + * @param overwrite true to overwrite the current content of the training dataset * @param writeOptions options to pass to the Spark write operation * @throws FeatureStoreException * @throws IOException @@ -270,7 +288,7 @@ public Dataset read(String split) { /** * Read a single split from the training dataset. * - * @param split the split name + * @param split the split name * @param readOptions options to pass to the Spark read operation * @return */ @@ -340,7 +358,7 @@ public void addTag(String name) throws FeatureStoreException, IOException { /** * Add name/value tag to the training dataset. * - * @param name name of the tag + * @param name name of the tag * @param value value of the tag * @throws FeatureStoreException * @throws IOException @@ -386,7 +404,7 @@ public void deleteTag(String name) throws FeatureStoreException, IOException { } @JsonIgnore - public String getQuery() throws FeatureStoreException, IOException { + public String getQuery() throws FeatureStoreException, IOException { return getQuery(Storage.ONLINE); } diff --git a/java/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java b/java/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java index d7e8a919b7..b1357ddce9 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java +++ b/java/src/main/java/com/logicalclocks/hsfs/TrainingDatasetFeature.java @@ -25,16 +25,20 @@ @NoArgsConstructor @AllArgsConstructor public class TrainingDatasetFeature { - @Getter @Setter + @Getter + @Setter private String name; - @Getter @Setter + @Getter + @Setter private String type; - @Getter @Setter + @Getter + @Setter private FeatureGroup featureGroup; - @Getter @Setter + @Getter + @Setter private Integer index; @Builder diff --git a/java/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngine.java b/java/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngine.java index cb11dd1022..0e7d46fd42 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngine.java +++ b/java/src/main/java/com/logicalclocks/hsfs/engine/FeatureGroupEngine.java @@ -124,7 +124,7 @@ public void saveDataframe(FeatureGroup featureGroup, Dataset dataset, Stora saveOnlineDataframe(featureGroup, dataset, saveMode, writeOptions); break; default: - throw new FeatureStoreException("Storage: " + storage + " not recognized"); + throw new FeatureStoreException("Storage: " + storage + " not recognized"); } } diff --git a/java/src/main/java/com/logicalclocks/hsfs/engine/SparkEngine.java b/java/src/main/java/com/logicalclocks/hsfs/engine/SparkEngine.java index 650a290dd7..5bf5a6cbf5 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/engine/SparkEngine.java +++ b/java/src/main/java/com/logicalclocks/hsfs/engine/SparkEngine.java @@ -117,7 +117,7 @@ private void configureS3Connector(StorageConnector storageConnector) { * @param saveMode */ public void write(TrainingDataset trainingDataset, Dataset dataset, - Map writeOptions, SaveMode saveMode) { + Map writeOptions, SaveMode saveMode) { if (trainingDataset.getStorageConnector() != null) { SparkEngine.getInstance().configureConnector(trainingDataset.getStorageConnector()); @@ -204,6 +204,7 @@ public Map getReadOptions(Map providedOptions, D /** * Write multiple training dataset splits and name them. + * * @param datasets * @param dataFormat * @param writeOptions @@ -226,7 +227,7 @@ private void writeSplits(Dataset[] datasets, DataFormat dataFormat, Map dataset, DataFormat dataFormat, Map writeOptions, SaveMode saveMode, String path) { @@ -259,8 +260,8 @@ public Dataset read(DataFormat dataFormat, Map readOptions, * @throws FeatureStoreException */ public Map getOnlineOptions(Map providedWriteOptions, - FeatureGroup featureGroup, - StorageConnector storageConnector) throws FeatureStoreException { + FeatureGroup featureGroup, + StorageConnector storageConnector) throws FeatureStoreException { Map writeOptions = storageConnector.getSparkOptions(); writeOptions.put(Constants.JDBC_TABLE, utils.getFgName(featureGroup)); diff --git a/java/src/main/java/com/logicalclocks/hsfs/engine/StatisticsEngine.java b/java/src/main/java/com/logicalclocks/hsfs/engine/StatisticsEngine.java index 6dfea8098c..6901f52054 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/engine/StatisticsEngine.java +++ b/java/src/main/java/com/logicalclocks/hsfs/engine/StatisticsEngine.java @@ -45,13 +45,13 @@ public StatisticsEngine(EntityEndpointType entityType) { public Statistics computeStatistics(TrainingDataset trainingDataset, Dataset dataFrame) throws FeatureStoreException, IOException { return statisticsApi.post(trainingDataset, computeStatistics(dataFrame, trainingDataset.getStatisticColumns(), - trainingDataset.getHistograms(), trainingDataset.getCorrelations())); + trainingDataset.getHistograms(), trainingDataset.getCorrelations())); } public Statistics computeStatistics(FeatureGroup featureGroup, Dataset dataFrame) throws FeatureStoreException, IOException { return statisticsApi.post(featureGroup, computeStatistics(dataFrame, featureGroup.getStatisticColumns(), - featureGroup.getHistograms(), featureGroup.getCorrelations())); + featureGroup.getHistograms(), featureGroup.getCorrelations())); } private Statistics computeStatistics(Dataset dataFrame, List statisticColumns, Boolean histograms, diff --git a/java/src/main/java/com/logicalclocks/hsfs/engine/TrainingDatasetEngine.java b/java/src/main/java/com/logicalclocks/hsfs/engine/TrainingDatasetEngine.java index ac7029ac54..209cbebf0c 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/engine/TrainingDatasetEngine.java +++ b/java/src/main/java/com/logicalclocks/hsfs/engine/TrainingDatasetEngine.java @@ -52,7 +52,7 @@ public class TrainingDatasetEngine { * @throws IOException */ public void save(TrainingDataset trainingDataset, Dataset dataset, - Map userWriteOptions) + Map userWriteOptions) throws FeatureStoreException, IOException { if (trainingDataset.getQueryInt() == null) { diff --git a/java/src/main/java/com/logicalclocks/hsfs/engine/Utils.java b/java/src/main/java/com/logicalclocks/hsfs/engine/Utils.java index 47b642fbd2..cddb551cb8 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/engine/Utils.java +++ b/java/src/main/java/com/logicalclocks/hsfs/engine/Utils.java @@ -68,7 +68,7 @@ public void trainingDatasetSchemaMatch(Dataset dataset, List new StructField(f.getName(), // What should we do about the nullables new CatalystSqlParser(null).parseDataType(f.getType()), true, Metadata.empty()) - ).toArray(StructField[]::new)); + ).toArray(StructField[]::new)); if (!dataset.schema().equals(tdStructType)) { throw new FeatureStoreException("The Dataframe schema: " + dataset.schema() diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java index 089513e14c..c905b30b39 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/FeatureStoreApi.java @@ -28,8 +28,8 @@ public class FeatureStoreApi { public static final String FEATURE_STORE_SERVICE_PATH = "/featurestores"; - public static final String FEATURE_STORE_PATH = FEATURE_STORE_SERVICE_PATH + "{/fsId}"; - public static final String FEATURE_STORE_NAME_PATH = FEATURE_STORE_SERVICE_PATH + "{/fsName}"; + public static final String FEATURE_STORE_PATH = FEATURE_STORE_SERVICE_PATH + "{/fsId}"; + public static final String FEATURE_STORE_NAME_PATH = FEATURE_STORE_SERVICE_PATH + "{/fsName}"; private static final Logger LOGGER = LoggerFactory.getLogger(FeatureStoreApi.class); diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java index cb925b9224..f0752096a8 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksClient.java @@ -104,11 +104,14 @@ public HopsworksClient(HopsworksHttpClient hopsworksHttpClient) { @AllArgsConstructor @NoArgsConstructor private static class HopsworksErrorClass { - @Getter @Setter + @Getter + @Setter private Integer errorCode; - @Getter @Setter + @Getter + @Setter private String usrMsg; - @Getter @Setter + @Getter + @Setter private String devMsg; @Override diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java index b9b18a9293..e8d4dbcf54 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksExternalClient.java @@ -74,23 +74,23 @@ public class HopsworksExternalClient implements HopsworksHttpClient { public HopsworksExternalClient(String host, int port, String apiKeyFilepath, boolean hostnameVerification, String trustStorePath) - throws IOException, FeatureStoreException, KeyStoreException, CertificateException, - NoSuchAlgorithmException, KeyManagementException { + throws IOException, FeatureStoreException, KeyStoreException, CertificateException, + NoSuchAlgorithmException, KeyManagementException { this(host, port, null, null, hostnameVerification, trustStorePath, apiKeyFilepath, null); } public HopsworksExternalClient(String host, int port, boolean hostnameVerification, String trustStorePath, Region region, SecretStore secretStore) - throws IOException, FeatureStoreException, KeyStoreException, CertificateException, - NoSuchAlgorithmException, KeyManagementException { + throws IOException, FeatureStoreException, KeyStoreException, CertificateException, + NoSuchAlgorithmException, KeyManagementException { this(host, port, region, secretStore, hostnameVerification, trustStorePath, null, null); } public HopsworksExternalClient(String host, int port, boolean hostnameVerification, String trustStorePath, String apiKeyValue) - throws IOException, FeatureStoreException, KeyStoreException, CertificateException, - NoSuchAlgorithmException, KeyManagementException { + throws IOException, FeatureStoreException, KeyStoreException, CertificateException, + NoSuchAlgorithmException, KeyManagementException { this(host, port, null, null, hostnameVerification, trustStorePath, null, apiKeyValue); } @@ -100,10 +100,10 @@ public HopsworksExternalClient(CloseableHttpClient httpClient, HttpHost httpHost } HopsworksExternalClient(String host, int port, Region region, - SecretStore secretStore, boolean hostnameVerification, - String trustStorePath, String apiKeyFilepath, String apiKeyValue) - throws IOException, FeatureStoreException, KeyStoreException, CertificateException, - NoSuchAlgorithmException, KeyManagementException { + SecretStore secretStore, boolean hostnameVerification, + String trustStorePath, String apiKeyFilepath, String apiKeyValue) + throws IOException, FeatureStoreException, KeyStoreException, CertificateException, + NoSuchAlgorithmException, KeyManagementException { httpHost = new HttpHost(host, port, "https"); @@ -113,9 +113,9 @@ public HopsworksExternalClient(CloseableHttpClient httpClient, HttpHost httpHost connectionPool.setDefaultMaxPerRoute(10); httpClient = HttpClients.custom() - .setConnectionManager(connectionPool) - .setKeepAliveStrategy((httpResponse, httpContext) -> 30 * 1000) - .build(); + .setConnectionManager(connectionPool) + .setKeepAliveStrategy((httpResponse, httpContext) -> 30 * 1000) + .build(); if (!Strings.isNullOrEmpty(apiKeyValue)) { this.apiKey = apiKeyValue; @@ -157,6 +157,7 @@ private Registry createConnectionFactory(HttpHost httpH * - AWS Parameter store * - AWS Secrets manager * - FIle on the local file system + * * @param secretStore * @param region * @param apiKeyFilepath diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java index c6826c2721..56f77fa343 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/HopsworksInternalClient.java @@ -78,9 +78,9 @@ public HopsworksInternalClient() throws IOException, KeyStoreException, Certific connectionPool.setDefaultMaxPerRoute(10); httpClient = HttpClients.custom() - .setConnectionManager(connectionPool) - .setKeepAliveStrategy((httpResponse, httpContext) -> 30 * 1000) - .build(); + .setConnectionManager(connectionPool) + .setKeepAliveStrategy((httpResponse, httpContext) -> 30 * 1000) + .build(); refreshJwt(); } diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/Join.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/Join.java index 00c277d5cb..cce0e6b80b 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/Join.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/Join.java @@ -25,17 +25,22 @@ public class Join { - @Getter @Setter + @Getter + @Setter private Query query; - @Getter @Setter + @Getter + @Setter private List on; - @Getter @Setter + @Getter + @Setter private List leftOn; - @Getter @Setter + @Getter + @Setter private List rightOn; - @Getter @Setter + @Getter + @Setter private JoinType joinType; public Join(Query query, JoinType joinType) { diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/Query.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/Query.java index 1324302c06..71573d8f35 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/Query.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/Query.java @@ -39,12 +39,15 @@ public class Query { private static final Logger LOGGER = LoggerFactory.getLogger(FeatureGroup.class); - @Getter @Setter + @Getter + @Setter private FeatureGroup leftFeatureGroup; - @Getter @Setter + @Getter + @Setter private List leftFeatures; - @Getter @Setter + @Getter + @Setter private List joins = new ArrayList<>(); private QueryConstructorApi queryConstructorApi; diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java index 8159645054..e43dcc492a 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/Statistics.java @@ -27,9 +27,11 @@ @AllArgsConstructor public class Statistics extends RestDto { - @Getter @Setter + @Getter + @Setter private String commitTime; - @Getter @Setter + @Getter + @Setter private String content; } diff --git a/java/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java b/java/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java index d20c293248..2e01a25ce1 100644 --- a/java/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java +++ b/java/src/main/java/com/logicalclocks/hsfs/metadata/StatisticsApi.java @@ -50,13 +50,13 @@ public StatisticsApi(@NonNull EntityEndpointType entityType) { public Statistics post(FeatureGroup featureGroup, Statistics statistics) throws FeatureStoreException, IOException { return post(featureGroup.getFeatureStore().getProjectId(), featureGroup.getFeatureStore().getId(), - featureGroup.getId(), statistics); + featureGroup.getId(), statistics); } public Statistics post(TrainingDataset trainingDataset, Statistics statistics) throws FeatureStoreException, IOException { return post(trainingDataset.getFeatureStore().getProjectId(), trainingDataset.getFeatureStore().getId(), - trainingDataset.getId(), statistics); + trainingDataset.getId(), statistics); } private Statistics post(Integer projectId, Integer featurestoreId, Integer entityId, Statistics statistics) @@ -84,12 +84,12 @@ private Statistics post(Integer projectId, Integer featurestoreId, Integer entit public Statistics get(FeatureGroup featureGroup, String commitTime) throws FeatureStoreException, IOException { return get(featureGroup.getFeatureStore().getProjectId(), featureGroup.getFeatureStore().getId(), - featureGroup.getId(), commitTime); + featureGroup.getId(), commitTime); } public Statistics get(TrainingDataset trainingDataset, String commitTime) throws FeatureStoreException, IOException { return get(trainingDataset.getFeatureStore().getProjectId(), trainingDataset.getFeatureStore().getId(), - trainingDataset.getId(), commitTime); + trainingDataset.getId(), commitTime); } private Statistics get(Integer projectId, Integer featurestoreId, Integer entityId, String commitTime) @@ -121,12 +121,12 @@ private Statistics get(Integer projectId, Integer featurestoreId, Integer entity public Statistics getLast(FeatureGroup featureGroup) throws FeatureStoreException, IOException { return getLast(featureGroup.getFeatureStore().getProjectId(), featureGroup.getFeatureStore().getId(), - featureGroup.getId()); + featureGroup.getId()); } public Statistics getLast(TrainingDataset trainingDataset) throws FeatureStoreException, IOException { return getLast(trainingDataset.getFeatureStore().getProjectId(), trainingDataset.getFeatureStore().getId(), - trainingDataset.getId()); + trainingDataset.getId()); } private Statistics getLast(Integer projectId, Integer featurestoreId, Integer entityId) diff --git a/java/src/main/resources/checkstyle.xml b/java/src/main/resources/checkstyle.xml index c11fc3d9ae..cd748c4ab0 100644 --- a/java/src/main/resources/checkstyle.xml +++ b/java/src/main/resources/checkstyle.xml @@ -16,7 +16,7 @@ Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov. --> - + @@ -30,7 +30,7 @@ + default="checkstyle-suppressions.xml"/> @@ -304,7 +304,7 @@ + default="checkstyle-xpath-suppressions.xml"/>