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(Tuple tuple,
    long offset)
Called for every tuple the HdfsBolt executes. 
 | 
void | 
reset()
Called after the HdfsBolt performs a sync. 
 | 
public boolean mark(Tuple 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 © 2022 The Apache Software Foundation. All rights reserved.