Package org.apache.pinot.common.minion
Class TaskGeneratorMostRecentRunInfo
- java.lang.Object
-
- org.apache.pinot.common.minion.BaseTaskGeneratorInfo
-
- org.apache.pinot.common.minion.TaskGeneratorMostRecentRunInfo
-
public class TaskGeneratorMostRecentRunInfo extends BaseTaskGeneratorInfo
a task generator running history which keeps the most recent several success run timestamp and the most recent several error run messages.
-
-
Method Summary
Modifier and Type Method Description voidaddErrorRunMessage(long ts, String message)Adds an error run messagevoidaddSuccessRunTs(long ts)Adds a success task generating run timestampTreeMap<String,String>getMostRecentErrorRunMessages()Gets the timestamp to error message map of the most recent several error runsList<String>getMostRecentSuccessRunTS()Gets the timestamp of the most recent several success runsStringgetTableNameWithType()Returns the table name with typeStringgetTaskType()static TaskGeneratorMostRecentRunInfonewInstance(String tableNameWithType, String taskType)Creates a new emptyTaskGeneratorMostRecentRunInfo-
Methods inherited from class org.apache.pinot.common.minion.BaseTaskGeneratorInfo
toJsonString, toString
-
-
-
-
Method Detail
-
getTableNameWithType
public String getTableNameWithType()
Returns the table name with type
-
getTaskType
public String getTaskType()
- Specified by:
getTaskTypein classBaseTaskGeneratorInfo- Returns:
- task type
-
getMostRecentErrorRunMessages
public TreeMap<String,String> getMostRecentErrorRunMessages()
Gets the timestamp to error message map of the most recent several error runs
-
addErrorRunMessage
public void addErrorRunMessage(long ts, String message)Adds an error run message- Parameters:
ts- A timestampmessage- An error message.
-
getMostRecentSuccessRunTS
public List<String> getMostRecentSuccessRunTS()
Gets the timestamp of the most recent several success runs
-
addSuccessRunTs
public void addSuccessRunTs(long ts)
Adds a success task generating run timestamp- Parameters:
ts- A timestamp
-
newInstance
public static TaskGeneratorMostRecentRunInfo newInstance(String tableNameWithType, String taskType)
Creates a new emptyTaskGeneratorMostRecentRunInfo- Parameters:
tableNameWithType- the table name with typetaskType- the task type.- Returns:
- a new empty
TaskGeneratorMostRecentRunInfo
-
-