Interface SyncPolicy
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CountSyncPolicy
public interface SyncPolicy extends Serializable
Interface for controlling when the HdfsBolt syncs and flushes the filesystem.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
mark(TridentTuple tuple, long offset)
Called for every tuple the HdfsBolt executes.void
reset()
Called after the HdfsBolt performs a sync.
-
-
-
Method Detail
-
mark
boolean mark(TridentTuple tuple, long offset)
Called for every tuple the HdfsBolt executes.- Parameters:
tuple
- The tuple executed.offset
- current offset for the file being written- Returns:
- true if a sync should be performed
-
reset
void reset()
Called after the HdfsBolt performs a sync.
-
-