Class BasePathBucketAssigner<T>
java.lang.Object
org.apache.flink.streaming.api.functions.sink.filesystem.bucketassigners.BasePathBucketAssigner<T>
- All Implemented Interfaces:
Serializable,BucketAssigner<T,String>
@PublicEvolving
public class BasePathBucketAssigner<T>
extends Object
implements BucketAssigner<T,String>
A
BucketAssigner that does not perform any bucketing of files. All files are written to
the base path.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.sink.filesystem.BucketAssigner
BucketAssigner.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBucketId(T element, BucketAssigner.Context context) Returns the identifier of the bucket the provided element should be put into.org.apache.flink.core.io.SimpleVersionedSerializer<String>toString()
-
Constructor Details
-
BasePathBucketAssigner
public BasePathBucketAssigner()
-
-
Method Details
-
getBucketId
Description copied from interface:BucketAssignerReturns the identifier of the bucket the provided element should be put into.- Specified by:
getBucketIdin interfaceBucketAssigner<T,String> - Parameters:
element- The current element being processed.context- The context used by the current bucket assigner.- Returns:
- A string representing the identifier of the bucket the element should be put into.
The actual path to the bucket will result from the concatenation of the returned string
and the
base pathprovided during the initialization of the file sink.
-
getSerializer
- Specified by:
getSerializerin interfaceBucketAssigner<T,String> - Returns:
- A
SimpleVersionedSerializercapable of serializing/deserializing the elements of typeBucketID. That is the type of the objects returned by theBucketAssigner.getBucketId(Object, BucketAssigner.Context).
-
toString
-