@Deprecated public interface Bucketer extends Serializable
RollingSinkto put emitted elements into rolling files.
RollingSink has one active bucket that it is writing to at a time. Whenever
a new element arrives it will ask the
Bucketer if a new bucket should be started and
the old one closed. The
Bucketer can, for example, decide to start new buckets
based on system time.
|Modifier and Type||Method and Description|
boolean shouldStartNewBucket(org.apache.hadoop.fs.Path basePath, org.apache.hadoop.fs.Path currentBucketPath)
truewhen a new bucket should be started.
currentBucketPath- The bucket
Paththat is currently being used.
org.apache.hadoop.fs.Path getNextBucketPath(org.apache.hadoop.fs.Path basePath)
Pathof a new bucket file.
basePath- The base path containing all the buckets.
Pathof the new bucket. This should include the
basePathand also the
subtaskIndextp avoid clashes with parallel sinks.
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.