IN- The type of input elements.
BucketID- The type of the object returned by the
getBucketId(Object, BucketAssigner.Context). This has to have a correct
#equals(Object)method. In addition, the
Pathto the created bucket will be the result of the
#toString()of this method, appended to the
basePathspecified in the
@PublicEvolving public interface BucketAssigner<IN,BucketID> extends Serializable
StreamingFileSinkto determine the
Bucketeach incoming element should be put into.
StreamingFileSink can be writing to many buckets at a time, and it is responsible
for managing a set of active buckets. Whenever a new element arrives it will ask the
BucketAssigner for the bucket the element should fall in. The
BucketAssigner can, for
example, determine buckets based on system time.
|Modifier and Type||Interface and Description|
Context that the
BucketID getBucketId(IN element, BucketAssigner.Context context)
element- The current element being processed.
contextused by the
base pathprovided during the initialization of the
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.