Bucketer
instead.@Deprecated public interface Bucketer extends Serializable
RollingSink
to put emitted elements into rolling files.
The 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 |
---|---|
org.apache.hadoop.fs.Path |
getNextBucketPath(org.apache.hadoop.fs.Path basePath)
Deprecated.
Returns the
Path of a new bucket file. |
boolean |
shouldStartNewBucket(org.apache.hadoop.fs.Path basePath,
org.apache.hadoop.fs.Path currentBucketPath)
Deprecated.
Returns
true when a new bucket should be started. |
boolean shouldStartNewBucket(org.apache.hadoop.fs.Path basePath, org.apache.hadoop.fs.Path currentBucketPath)
true
when a new bucket should be started.currentBucketPath
- The bucket Path
that is currently being used.org.apache.hadoop.fs.Path getNextBucketPath(org.apache.hadoop.fs.Path basePath)
Path
of a new bucket file.basePath
- The base path containing all the buckets.Path
of the new bucket. This should include the basePath
and also the subtaskIndex
tp avoid clashes with parallel sinks.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.