public class CountSyncPolicy extends Object implements SyncPolicy
SyncPolicy implementation that will trigger a file system sync after a certain number of tuples have been processed.
| Constructor and Description | 
|---|
| CountSyncPolicy(int count) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | mark(TridentTuple tuple,
    long offset)Called for every tuple the HdfsBolt executes. | 
| void | reset()Called after the HdfsBolt performs a sync. | 
public boolean mark(TridentTuple tuple, long offset)
SyncPolicyCalled for every tuple the HdfsBolt executes.
mark in interface SyncPolicytuple - The tuple executed.offset - current offset for the file being writtenpublic void reset()
SyncPolicyCalled after the HdfsBolt performs a sync.
reset in interface SyncPolicyCopyright © 2019 The Apache Software Foundation. All Rights Reserved.