Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7299

data type of parameter 'mapreduce.task.exit.timeout' is inconsistent

    XMLWordPrintableJSON

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);

      Attachments

        1. MAPREDUCE-7299-001.patch
          1 kB
          leafeonia

        Activity

          People

            Unassigned Unassigned
            leafeonia leafeonia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: