Skip to content

Commit 37bd63b

Browse files
authored
[FSTORE-617] Fix java docstrings to build javadocs (#921)
1 parent f304f92 commit 37bd63b

17 files changed

+428
-301
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,6 @@ docs/generated
130130

131131
# Test artifacts
132132
keyFile.json
133+
134+
# delombok dir
135+
delombok

java/pom.xml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<junit.version>5.9.1</junit.version>
3232
<surefire-plugin.version>2.22.0</surefire-plugin.version>
3333
<mockito.version>4.3.1</mockito.version>
34+
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<delombok.output>${project.basedir}/delombok</delombok.output>
3437
</properties>
3538

3639
<dependencies>
@@ -368,14 +371,52 @@
368371
<systemPropertiesFile>src/test/resources/system.properties</systemPropertiesFile>
369372
</configuration>
370373
</plugin>
374+
<plugin>
375+
<groupId>org.projectlombok</groupId>
376+
<artifactId>lombok-maven-plugin</artifactId>
377+
<version>${lombok.version}.0</version>
378+
<configuration>
379+
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
380+
<outputDirectory>${delombok.output}</outputDirectory>
381+
<addOutputDirectory>false</addOutputDirectory>
382+
</configuration>
383+
<executions>
384+
<execution>
385+
<goals>
386+
<goal>delombok</goal>
387+
</goals>
388+
</execution>
389+
</executions>
390+
</plugin>
391+
392+
393+
<plugin>
394+
<groupId>org.apache.maven.plugins</groupId>
395+
<artifactId>maven-javadoc-plugin</artifactId>
396+
<version>3.1.1</version>
397+
<configuration>
398+
<source>1.8</source>
399+
<target>1.8</target>
400+
<sourcepath>${delombok.output}</sourcepath>
401+
</configuration>
402+
403+
<executions>
404+
<execution>
405+
<id>attach-javadocs</id>
406+
<goals>
407+
<goal>jar</goal>
408+
</goals>
409+
</execution>
410+
</executions>
411+
</plugin>
412+
371413
</plugins>
372414
<testResources>
373415
<testResource>
374416
<directory>src/test/resources</directory>
375417
</testResource>
376418
</testResources>
377419
</build>
378-
379420
<repositories>
380421
<repository>
381422
<id>Hops</id>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ public Filter ge(Feature value) {
193193

194194
/**
195195
* check if a value exists in a group of values.
196-
*
196+
* @param collection collection of values to filter on SqlFilterCondition.IN
197+
* @return Filter object
197198
* @deprecated
198199
* `in` method is deprecated. Use `isin` instead.
199200
*/

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

Lines changed: 106 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ public Dataset<Row> read(boolean online, Map<String, String> readOptions) throws
136136
/**
137137
* Reads Feature group data at a specific point in time.
138138
*
139-
* @param wallclockTime
140-
* @return DataFrame.
141-
* @throws FeatureStoreException
142-
* @throws IOException
143-
* @throws ParseException
139+
* @param wallclockTime point in time
140+
* @return Spark DataFrame containing feature data.
141+
* @throws FeatureStoreException FeatureStoreException
142+
* @throws IOException IOException
143+
* @throws ParseException ParseException
144144
*/
145145
public Dataset<Row> read(String wallclockTime) throws FeatureStoreException, IOException, ParseException {
146146
return (Dataset<Row>) selectAll().asOf(wallclockTime).read(false, null);
@@ -149,12 +149,12 @@ public Dataset<Row> read(String wallclockTime) throws FeatureStoreException, IOE
149149
/**
150150
* Reads Feature group data at a specific point in time.
151151
*
152-
* @param wallclockTime
153-
* @param readOptions
154-
* @return DataFrame.
155-
* @throws FeatureStoreException
156-
* @throws IOException
157-
* @throws ParseException
152+
* @param wallclockTime point in time
153+
* @param readOptions Additional read options as key-value pairs, defaults to empty Map.
154+
* @return Spark DataFrame containing feature data.
155+
* @throws FeatureStoreException FeatureStoreException
156+
* @throws IOException IOException
157+
* @throws ParseException ParseException
158158
*/
159159
public Dataset<Row> read(String wallclockTime, Map<String, String> readOptions)
160160
throws FeatureStoreException, IOException, ParseException {
@@ -166,10 +166,10 @@ public Dataset<Row> read(String wallclockTime, Map<String, String> readOptions)
166166
*
167167
* @param wallclockStartTime start date.
168168
* @param wallclockEndTime end date.
169-
* @return DataFrame.
170-
* @throws FeatureStoreException
171-
* @throws IOException
172-
* @throws ParseException
169+
* @return Spark DataFrame containing feature data.
170+
* @throws FeatureStoreException FeatureStoreException
171+
* @throws IOException IOException
172+
* @throws ParseException ParseException
173173
*
174174
* @deprecated
175175
*/
@@ -182,11 +182,12 @@ public Dataset<Row> readChanges(String wallclockStartTime, String wallclockEndTi
182182
* `readChanges` method is deprecated. Use `asOf(wallclockEndTime, wallclockStartTime).read(readOptions)` instead.
183183
*
184184
* @param wallclockStartTime start date.
185-
* @param wallclockEndTime end date.
186-
* @return DataFrame.
187-
* @throws FeatureStoreException
188-
* @throws IOException
189-
* @throws ParseException
185+
* @param wallclockEndTime end date.
186+
* @param readOptions Additional write options as key-value pairs, defaults to empty Map.
187+
* @return Spark DataFrame containing feature data.
188+
* @throws FeatureStoreException FeatureStoreException
189+
* @throws IOException IOException
190+
* @throws ParseException ParseException
190191
*
191192
* @deprecated
192193
*/
@@ -204,8 +205,8 @@ public Dataset<Row> readChanges(String wallclockStartTime, String wallclockEndTi
204205
* @param wallclockTime Datetime string. The String should be formatted in one of the
205206
* following formats `%Y%m%d`, `%Y%m%d%H`, `%Y%m%d%H%M`, or `%Y%m%d%H%M%S`.
206207
* @return Query. The query object with the applied time travel condition
207-
* @throws FeatureStoreException
208-
* @throws ParseException
208+
* @throws FeatureStoreException FeatureStoreException
209+
* @throws ParseException ParseException
209210
*/
210211
public Query asOf(String wallclockTime) throws FeatureStoreException, ParseException {
211212
return selectAll().asOf(wallclockTime);
@@ -222,8 +223,8 @@ public Query asOf(String wallclockTime) throws FeatureStoreException, ParseExcep
222223
* @param excludeUntil Datetime string. The String should be formatted in one of the
223224
* following formats `%Y%m%d`, `%Y%m%d%H`, `%Y%m%d%H%M`, or `%Y%m%d%H%M%S`.
224225
* @return Query. The query object with the applied time travel condition
225-
* @throws FeatureStoreException
226-
* @throws ParseException
226+
* @throws FeatureStoreException FeatureStoreException
227+
* @throws ParseException ParseException
227228
*/
228229
public Query asOf(String wallclockTime, String excludeUntil) throws FeatureStoreException, ParseException {
229230
return selectAll().asOf(wallclockTime, excludeUntil);
@@ -295,8 +296,9 @@ public void insert(Dataset<Row> featureData, boolean overwrite, Map<String, Stri
295296
*
296297
* @param featureData dataframe to be committed.
297298
* @param operation commit operation type, INSERT or UPSERT.
298-
* @throws FeatureStoreException
299-
* @throws IOException
299+
* @throws FeatureStoreException FeatureStoreException
300+
* @throws IOException IOException
301+
* @throws ParseException ParseException
300302
*/
301303
public void insert(Dataset<Row> featureData, HudiOperationType operation)
302304
throws FeatureStoreException, IOException, ParseException {
@@ -330,6 +332,13 @@ public void insert(Dataset<Row> featureData, Storage storage, boolean overwrite,
330332
/**
331333
* insert streaming dataframe in the Feature group.
332334
*
335+
* @param featureData Spark dataframe containing feature data
336+
* @return StreamingQuery
337+
* @throws StreamingQueryException StreamingQueryException
338+
* @throws IOException IOException
339+
* @throws FeatureStoreException FeatureStoreException
340+
* @throws TimeoutException TimeoutException
341+
* @throws ParseException ParseException
333342
* @deprecated
334343
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
335344
*/
@@ -342,6 +351,14 @@ public StreamingQuery insertStream(Dataset<Row> featureData)
342351
/**
343352
* insert streaming dataframe in the Feature group.
344353
*
354+
* @param featureData Spark dataframe containing feature data
355+
* @param queryName name of spark StreamingQuery
356+
* @return StreamingQuery
357+
* @throws StreamingQueryException StreamingQueryException
358+
* @throws IOException IOException
359+
* @throws FeatureStoreException FeatureStoreException
360+
* @throws TimeoutException TimeoutException
361+
* @throws ParseException ParseException
345362
* @deprecated
346363
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
347364
*/
@@ -354,6 +371,15 @@ public StreamingQuery insertStream(Dataset<Row> featureData, String queryName)
354371
/**
355372
* insert streaming dataframe in the Feature group.
356373
*
374+
* @param featureData Spark dataframe containing feature data
375+
* @param queryName name of spark StreamingQuery
376+
* @param outputMode outputMode
377+
* @return StreamingQuery
378+
* @throws StreamingQueryException StreamingQueryException
379+
* @throws IOException IOException
380+
* @throws FeatureStoreException FeatureStoreException
381+
* @throws TimeoutException TimeoutException
382+
* @throws ParseException ParseException
357383
* @deprecated
358384
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
359385
*/
@@ -366,6 +392,17 @@ public StreamingQuery insertStream(Dataset<Row> featureData, String queryName, S
366392
/**
367393
* insert streaming dataframe in the Feature group.
368394
*
395+
* @param featureData Spark dataframe containing feature data
396+
* @param queryName name of spark StreamingQuery
397+
* @param outputMode outputMode
398+
* @param awaitTermination whether or not to wait for query Termination
399+
* @param timeout timeout
400+
* @return StreamingQuery
401+
* @throws StreamingQueryException StreamingQueryException
402+
* @throws IOException IOException
403+
* @throws FeatureStoreException FeatureStoreException
404+
* @throws TimeoutException TimeoutException
405+
* @throws ParseException ParseException
369406
* @deprecated
370407
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
371408
*/
@@ -379,6 +416,17 @@ public StreamingQuery insertStream(Dataset<Row> featureData, String queryName, S
379416
/**
380417
* insert streaming dataframe in the Feature group.
381418
*
419+
* @param featureData Spark dataframe containing feature data
420+
* @param queryName name of spark StreamingQuery
421+
* @param outputMode outputMode
422+
* @param awaitTermination whether or not to wait for query Termination
423+
* @param checkpointLocation path to checkpoint location directory
424+
* @return StreamingQuery
425+
* @throws StreamingQueryException StreamingQueryException
426+
* @throws IOException IOException
427+
* @throws FeatureStoreException FeatureStoreException
428+
* @throws TimeoutException TimeoutException
429+
* @throws ParseException ParseException
382430
* @deprecated
383431
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
384432
*/
@@ -392,6 +440,19 @@ public StreamingQuery insertStream(Dataset<Row> featureData, String queryName, S
392440
/**
393441
* insert streaming dataframe in the Feature group.
394442
*
443+
* @param featureData Spark dataframe containing feature data
444+
* @param queryName name of spark StreamingQuery
445+
* @param outputMode outputMode
446+
* @param awaitTermination whether or not to wait for query Termination
447+
* @param timeout timeout
448+
* @param checkpointLocation path to checkpoint location directory
449+
* @param writeOptions Additional write options as key-value pairs, defaults to empty Map.
450+
* @return StreamingQuery
451+
* @throws StreamingQueryException StreamingQueryException
452+
* @throws IOException IOException
453+
* @throws FeatureStoreException FeatureStoreException
454+
* @throws TimeoutException TimeoutException
455+
* @throws ParseException ParseException
395456
* @deprecated
396457
* insertStream method is deprecated FeatureGroups. Full capability insertStream is available for StreamFeatureGroups.
397458
*/
@@ -424,8 +485,10 @@ public void commitDeleteRecord(Dataset<Row> featureData, Map<String, String> wri
424485
/**
425486
* Return commit details.
426487
*
427-
* @throws FeatureStoreException
428-
* @throws IOException
488+
* @return commit details.
489+
* @throws FeatureStoreException FeatureStoreException
490+
* @throws IOException IOException
491+
* @throws ParseException ParseException
429492
*/
430493
public Map<Long, Map<String, String>> commitDetails() throws IOException, FeatureStoreException, ParseException {
431494
return utils.commitDetails(this, null);
@@ -435,8 +498,10 @@ public Map<Long, Map<String, String>> commitDetails() throws IOException, Featur
435498
* Return commit details.
436499
*
437500
* @param limit number of commits to return.
438-
* @throws FeatureStoreException
439-
* @throws IOException
501+
* @return commit details.
502+
* @throws FeatureStoreException FeatureStoreException
503+
* @throws IOException IOException
504+
* @throws ParseException ParseException
440505
*/
441506
public Map<Long, Map<String, String>> commitDetails(Integer limit)
442507
throws IOException, FeatureStoreException, ParseException {
@@ -447,8 +512,10 @@ public Map<Long, Map<String, String>> commitDetails(Integer limit)
447512
* Return commit details.
448513
*
449514
* @param wallclockTime point in time.
450-
* @throws FeatureStoreException
451-
* @throws IOException
515+
* @return commit details.
516+
* @throws FeatureStoreException FeatureStoreException
517+
* @throws IOException IOException
518+
* @throws ParseException ParseException
452519
*/
453520
public Map<Long, Map<String, String>> commitDetails(String wallclockTime)
454521
throws IOException, FeatureStoreException, ParseException {
@@ -460,8 +527,10 @@ public Map<Long, Map<String, String>> commitDetails(String wallclockTime)
460527
*
461528
* @param wallclockTime point in time.
462529
* @param limit number of commits to return.
463-
* @throws FeatureStoreException
464-
* @throws IOException
530+
* @return commit details.
531+
* @throws FeatureStoreException FeatureStoreException
532+
* @throws IOException IOException
533+
* @throws ParseException ParseException
465534
*/
466535
public Map<Long, Map<String, String>> commitDetails(String wallclockTime, Integer limit)
467536
throws IOException, FeatureStoreException, ParseException {
@@ -498,8 +567,9 @@ public Schema getDeserializedAvroSchema() throws FeatureStoreException, IOExcept
498567
*
499568
* @param wallclockTime number of commits to return.
500569
* @return statistics object of computed statistics
501-
* @throws FeatureStoreException
502-
* @throws IOException
570+
* @throws FeatureStoreException FeatureStoreException
571+
* @throws IOException IOException
572+
* @throws ParseException ParseException
503573
*/
504574
public Statistics computeStatistics(String wallclockTime) throws FeatureStoreException, IOException, ParseException {
505575
if (statisticsConfig.getEnabled()) {

0 commit comments

Comments
 (0)