@PublicEvolving public class BasePathBucketAssigner<T> extends Object implements BucketAssigner<T,String>
BucketAssigner
that does not perform any bucketing of files. All files are written to
the base path.BucketAssigner.Context
Constructor and Description |
---|
BasePathBucketAssigner() |
Modifier and Type | Method and Description |
---|---|
String |
getBucketId(T element,
BucketAssigner.Context context)
Returns the identifier of the bucket the provided element should be put into.
|
SimpleVersionedSerializer<String> |
getSerializer() |
String |
toString() |
public String getBucketId(T element, BucketAssigner.Context context)
BucketAssigner
getBucketId
in interface BucketAssigner<T,String>
element
- The current element being processed.context
- The context
used by the sink
.base path
provided during the initialization of the sink
.public SimpleVersionedSerializer<String> getSerializer()
getSerializer
in interface BucketAssigner<T,String>
SimpleVersionedSerializer
capable of serializing/deserializing the elements
of type BucketID
. That is the type of the objects returned by the BucketAssigner.getBucketId(Object, BucketAssigner.Context)
.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.