[Java] Fix return of java doc (#13601)

This commit is contained in:
Kai Yang
2021-01-21 23:57:20 +08:00
committed by GitHub
parent 587f207c2f
commit 92f1e0902e
67 changed files with 350 additions and 229 deletions
@@ -11,7 +11,7 @@ public interface Function extends Serializable {
* storage, and load it back when in fail-over through. {@link
* Function#loadCheckpoint(Serializable)}.
*
* <p>Returns A serializable object which represents function state.
* @return A serializable object which represents function state.
*/
default Serializable saveCheckpoint() {
return null;
@@ -14,8 +14,8 @@ public interface FilterFunction<T> extends Function {
/**
* The filter function that evaluates the predicate.
*
* @param value The value to be filtered. Returns True for values that should be retained, false
* for values to be filtered out.
* @param value The value to be filtered.
* @return True for values that should be retained, false for values to be filtered out.
*/
boolean filter(T value) throws Exception;
}
@@ -15,8 +15,8 @@ public interface Partition<T> extends Function {
* record.
*
* @param record The record.
* @param numPartition num of partitions Returns IDs of the downstream partitions that should
* receive the record.
* @param numPartition num of partitions
* @return IDs of the downstream partitions that should receive the record.
*/
int[] partition(T record, int numPartition);
}
@@ -59,7 +59,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
* Apply a map function to this stream.
*
* @param mapFunction The map function.
* @param <R> Type of data returned by the map function. Returns A new DataStream.
* @param <R> Type of data returned by the map function.
* @return A new DataStream.
*/
public <R> DataStream<R> map(MapFunction<T, R> mapFunction) {
return new DataStream<>(this, new MapOperator<>(mapFunction));
@@ -69,7 +70,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
* Apply a flat-map function to this stream.
*
* @param flatMapFunction The FlatMapFunction
* @param <R> Type of data returned by the flatmap function. Returns A new DataStream
* @param <R> Type of data returned by the flatmap function.
* @return A new DataStream
*/
public <R> DataStream<R> flatMap(FlatMapFunction<T, R> flatMapFunction) {
return new DataStream<>(this, new FlatMapOperator<>(flatMapFunction));
@@ -84,7 +86,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
* type with each other.
*
* @param stream The DataStream to union output with.
* @param others The other DataStreams to union output with. Returns A new UnionStream.
* @param others The other DataStreams to union output with.
* @return A new UnionStream.
*/
@SafeVarargs
public final DataStream<T> union(DataStream<T> stream, DataStream<T>... others) {
@@ -98,7 +101,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
* Apply union transformations to this stream by merging {@link DataStream} outputs of the same
* type with each other.
*
* @param streams The DataStreams to union output with. Returns A new UnionStream.
* @param streams The DataStreams to union output with.
* @return A new UnionStream.
*/
public final DataStream<T> union(List<DataStream<T>> streams) {
if (this instanceof UnionStream) {
@@ -115,7 +119,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
*
* @param other Another stream.
* @param <O> The type of the other stream data.
* @param <R> The type of the data in the joined stream. Returns A new JoinStream.
* @param <R> The type of the data in the joined stream.
* @return A new JoinStream.
*/
public <O, R> JoinStream<T, O, R> join(DataStream<O> other) {
return new JoinStream<>(this, other);
@@ -129,7 +134,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
/**
* Apply a sink function and get a StreamSink.
*
* @param sinkFunction The sink function. Returns A new StreamSink.
* @param sinkFunction The sink function.
* @return A new StreamSink.
*/
public DataStreamSink<T> sink(SinkFunction<T> sinkFunction) {
return new DataStreamSink<>(this, new SinkOperator<>(sinkFunction));
@@ -139,7 +145,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
* Apply a key-by function to this stream.
*
* @param keyFunction the key function.
* @param <K> The type of the key. Returns A new KeyDataStream.
* @param <K> The type of the key.
* @return A new KeyDataStream.
*/
public <K> KeyDataStream<K, T> keyBy(KeyFunction<T, K> keyFunction) {
checkPartitionCall();
@@ -149,7 +156,7 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
/**
* Apply broadcast to this stream.
*
* <p>Returns This stream.
* @return This stream.
*/
public DataStream<T> broadcast() {
checkPartitionCall();
@@ -159,7 +166,8 @@ public class DataStream<T> extends Stream<DataStream<T>, T> {
/**
* Apply a partition to this stream.
*
* @param partition The partitioning strategy. Returns This stream.
* @param partition The partitioning strategy.
* @return This stream.
*/
public DataStream<T> partitionBy(Partition<T> partition) {
checkPartitionCall();
@@ -27,7 +27,8 @@ public class DataStreamSource<T> extends DataStream<T> implements StreamSource<T
*
* @param context Stream context.
* @param values A collection of values.
* @param <T> The type of source data. Returns A DataStreamSource.
* @param <T> The type of source data.
* @return A DataStreamSource.
*/
public static <T> DataStreamSource<T> fromCollection(
StreamingContext context, Collection<T> values) {
@@ -33,7 +33,8 @@ public class KeyDataStream<K, T> extends DataStream<T> {
/**
* Apply a reduce function to this stream.
*
* @param reduceFunction The reduce function. Returns A new DataStream.
* @param reduceFunction The reduce function.
* @return A new DataStream.
*/
public DataStream<T> reduce(ReduceFunction reduceFunction) {
return new DataStream<>(this, new ReduceOperator(reduceFunction));
@@ -44,7 +45,8 @@ public class KeyDataStream<K, T> extends DataStream<T> {
*
* @param aggregateFunction The aggregate function
* @param <A> The type of aggregated intermediate data.
* @param <O> The type of result data. Returns A new DataStream.
* @param <O> The type of result data.
* @return A new DataStream.
*/
public <A, O> DataStream<O> aggregate(AggregateFunction<T, A, O> aggregateFunction) {
return new DataStream<>(this, null);
@@ -43,7 +43,7 @@ public class JobGraph implements Serializable {
* Generate direct-graph(made up of a set of vertices and connected by edges) by current job graph
* for simple log printing.
*
* <p>Returns Digraph in string type.
* @return Digraph in string type.
*/
public String generateDigraph() {
StringBuilder digraph = new StringBuilder();
@@ -51,7 +51,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a map function to this stream.
*
* @param func The python MapFunction. Returns A new PythonDataStream.
* @param func The python MapFunction.
* @return A new PythonDataStream.
*/
public PythonDataStream map(PythonFunction func) {
func.setFunctionInterface(FunctionInterface.MAP_FUNCTION);
@@ -65,7 +66,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a flat-map function to this stream.
*
* @param func The python FlapMapFunction. Returns A new PythonDataStream
* @param func The python FlapMapFunction.
* @return A new PythonDataStream
*/
public PythonDataStream flatMap(PythonFunction func) {
func.setFunctionInterface(FunctionInterface.FLAT_MAP_FUNCTION);
@@ -79,8 +81,9 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a filter function to this stream.
*
* @param func The python FilterFunction. Returns A new PythonDataStream that contains only the
* elements satisfying the given filter predicate.
* @param func The python FilterFunction.
* @return A new PythonDataStream that contains only the elements satisfying the given filter
* predicate.
*/
public PythonDataStream filter(PythonFunction func) {
func.setFunctionInterface(FunctionInterface.FILTER_FUNCTION);
@@ -92,7 +95,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
* same type with each other.
*
* @param stream The DataStream to union output with.
* @param others The other DataStreams to union output with. Returns A new UnionStream.
* @param others The other DataStreams to union output with.
* @return A new UnionStream.
*/
public final PythonDataStream union(PythonDataStream stream, PythonDataStream... others) {
List<PythonDataStream> streams = new ArrayList<>();
@@ -105,7 +109,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
* Apply union transformations to this stream by merging {@link PythonDataStream} outputs of the
* same type with each other.
*
* @param streams The DataStreams to union output with. Returns A new UnionStream.
* @param streams The DataStreams to union output with.
* @return A new UnionStream.
*/
public final PythonDataStream union(List<PythonDataStream> streams) {
if (this instanceof PythonUnionStream) {
@@ -124,7 +129,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a sink function and get a StreamSink.
*
* @param func The python SinkFunction. Returns A new StreamSink.
* @param func The python SinkFunction.
* @return A new StreamSink.
*/
public PythonStreamSink sink(PythonFunction func) {
func.setFunctionInterface(FunctionInterface.SINK_FUNCTION);
@@ -138,7 +144,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a key-by function to this stream.
*
* @param func the python keyFunction. Returns A new KeyDataStream.
* @param func the python keyFunction.
* @return A new KeyDataStream.
*/
public PythonKeyDataStream keyBy(PythonFunction func) {
checkPartitionCall();
@@ -149,7 +156,7 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply broadcast to this stream.
*
* <p>Returns This stream.
* @return This stream.
*/
public PythonDataStream broadcast() {
checkPartitionCall();
@@ -159,7 +166,8 @@ public class PythonDataStream extends Stream<PythonDataStream, Object> implement
/**
* Apply a partition to this stream.
*
* @param partition The partitioning strategy. Returns This stream.
* @param partition The partitioning strategy.
* @return This stream.
*/
public PythonDataStream partitionBy(PythonPartition partition) {
checkPartitionCall();
@@ -31,7 +31,8 @@ public class PythonKeyDataStream extends PythonDataStream implements PythonStrea
/**
* Apply a reduce function to this stream.
*
* @param func The reduce function. Returns A new DataStream.
* @param func The reduce function.
* @return A new DataStream.
*/
public PythonDataStream reduce(PythonFunction func) {
func.setFunctionInterface(FunctionInterface.REDUCE_FUNCTION);