Package org.apache.pinot.common.minion
Class RealtimeToOfflineSegmentsTaskMetadata
- java.lang.Object
-
- org.apache.pinot.common.minion.BaseTaskMetadata
-
- org.apache.pinot.common.minion.RealtimeToOfflineSegmentsTaskMetadata
-
public class RealtimeToOfflineSegmentsTaskMetadata extends BaseTaskMetadata
Metadata for the minion task of typeRealtimeToOfflineSegmentsTask. ThewatermarkMsdenotes the time (exclusive) upto which tasks have been executed. This gets serialized and stored in zookeeper under the path MINION_TASK_METADATA/${tableNameWithType}/RealtimeToOfflineSegmentsTask PinotTaskGenerator: ThewatermarkMs> is used by theRealtimeToOfflineSegmentsTaskGenerator, to determine the window of execution for the task it is generating. The window of execution will be [watermarkMs, watermarkMs + bucketSize) PinotTaskExecutor: The same watermark is used by theRealtimeToOfflineSegmentsTaskExecutor, to: - Verify that is is running the latest task scheduled by the task generator - Update the watermark as the end of the window that it executed for
-
-
Constructor Summary
Constructors Constructor Description RealtimeToOfflineSegmentsTaskMetadata(String tableNameWithType, long watermarkMs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RealtimeToOfflineSegmentsTaskMetadatafromZNRecord(org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)StringgetTableNameWithType()longgetWatermarkMs()Get the watermark in millisorg.apache.helix.zookeeper.datamodel.ZNRecordtoZNRecord()-
Methods inherited from class org.apache.pinot.common.minion.BaseTaskMetadata
toJsonString, toString
-
-
-
-
Constructor Detail
-
RealtimeToOfflineSegmentsTaskMetadata
public RealtimeToOfflineSegmentsTaskMetadata(String tableNameWithType, long watermarkMs)
-
-
Method Detail
-
getTableNameWithType
public String getTableNameWithType()
- Specified by:
getTableNameWithTypein classBaseTaskMetadata- Returns:
- table name appended with its type. E.g. MyTable_OFFLINE
-
getWatermarkMs
public long getWatermarkMs()
Get the watermark in millis
-
fromZNRecord
public static RealtimeToOfflineSegmentsTaskMetadata fromZNRecord(org.apache.helix.zookeeper.datamodel.ZNRecord znRecord)
-
toZNRecord
public org.apache.helix.zookeeper.datamodel.ZNRecord toZNRecord()
- Specified by:
toZNRecordin classBaseTaskMetadata- Returns:
ZNRecordcontaining the task metadata
-
-