本文整理汇总了Java中org.apache.hadoop.mapred.TaskTracker.TaskInProgress.getRunState方法的典型用法代码示例。如果您正苦于以下问题:Java TaskInProgress.getRunState方法的具体用法?Java TaskInProgress.getRunState怎么用?Java TaskInProgress.getRunState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.mapred.TaskTracker.TaskInProgress
的用法示例。
在下文中一共展示了TaskInProgress.getRunState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isKillable
import org.apache.hadoop.mapred.TaskTracker.TaskInProgress; //导入方法依赖的package包/类
/**
* Check if a task can be killed to increase free memory
* @param tid task attempt ID
* @return true if the task can be killed
*/
private boolean isKillable(TaskAttemptID tid) {
TaskInProgress tip = taskTracker.getRunningTask(tid);
return tip != null && !tip.wasKilled() &&
(tip.getRunState() == TaskStatus.State.RUNNING ||
tip.getRunState() == TaskStatus.State.COMMIT_PENDING);
}
示例2: isKillable
import org.apache.hadoop.mapred.TaskTracker.TaskInProgress; //导入方法依赖的package包/类
/**
* Check if a task can be killed to increase free memory
* @param tid task attempt ID
* @return true if the task can be killed
*/
private boolean isKillable(TaskAttemptID tid) {
TaskInProgress tip = taskTracker.runningTasks.get(tid);
return tip != null && !tip.wasKilled() &&
(tip.getRunState() == TaskStatus.State.RUNNING ||
tip.getRunState() == TaskStatus.State.COMMIT_PENDING);
}
示例3: isKillable
import org.apache.hadoop.mapred.TaskTracker.TaskInProgress; //导入方法依赖的package包/类
/**
* Check if a task can be killed to increase free memory
* @param tid task attempt ID
* @return true if the task can be killed
*/
private boolean isKillable(TaskAttemptID tid) {
TaskInProgress tip = taskTracker.runningTasks.get(tid);
return tip != null && !tip.wasKilled() &&
(tip.getRunState() == TaskStatus.State.RUNNING ||
tip.getRunState() == TaskStatus.State.COMMIT_PENDING);
}