Details
-
Bug
-
Status: Patch Available
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Problem:
The data type of parameter `mapreduce.task.exit.timeout` is inconsistent in the code relevant to the parameter.
In `TaskAttemptFinishingMonitor.java`, getInt() is used to load the parameter value:
int expireIntvl = conf.getInt(MRJobConfig.TASK_EXIT_TIMEOUT,
MRJobConfig.TASK_EXIT_TIMEOUT_DEFAULT);
However, in `TaskHeartbeatHandler.java`, the code uses getLong() instead and stores the value in a long-type variable.
private long unregisterTimeOut; ... unregisterTimeOut = conf.getLong(MRJobConfig.TASK_EXIT_TIMEOUT, MRJobConfig.TASK_EXIT_TIMEOUT_DEFAULT);
Solution:
Convert the type explicitly to avoid inconsistency and potential problems:
unregisterTimeOut = (long)conf.getInt(MRJobConfig.TASK_EXIT_TIMEOUT,
MRJobConfig.TASK_EXIT_TIMEOUT_DEFAULT);