org.apache.storm.hdfs.trident.rotation
Class TimedRotationPolicy

java.lang.Object
  extended by org.apache.storm.hdfs.trident.rotation.TimedRotationPolicy
All Implemented Interfaces:
Serializable, FileRotationPolicy

public class TimedRotationPolicy
extends Object
implements FileRotationPolicy

See Also:
Serialized Form

Nested Class Summary
static class TimedRotationPolicy.TimeUnit
           
 
Constructor Summary
TimedRotationPolicy(float count, TimedRotationPolicy.TimeUnit units)
           
 
Method Summary
 long getInterval()
           
 boolean mark(TridentTuple tuple, long offset)
          Called for every tuple the HdfsBolt executes.
 void reset()
          Called after the HdfsBolt rotates a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimedRotationPolicy

public TimedRotationPolicy(float count,
                           TimedRotationPolicy.TimeUnit units)
Method Detail

mark

public boolean mark(TridentTuple tuple,
                    long offset)
Called for every tuple the HdfsBolt executes.

Specified by:
mark in interface FileRotationPolicy
Parameters:
tuple - The tuple executed.
offset - current offset of file being written
Returns:
true if a file rotation should be performed

reset

public void reset()
Called after the HdfsBolt rotates a file.

Specified by:
reset in interface FileRotationPolicy

getInterval

public long getInterval()


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.