Hadoop Common
  1. Hadoop Common
  2. HADOOP-544

Replace the job, tip and task ids with objects.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.18.0
    • Fix Version/s: 0.18.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      Introduced new classes JobID, TaskID and TaskAttemptID, which should be used instead of their string counterparts. Deprecated functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments. Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
      Show
      Introduced new classes JobID, TaskID and TaskAttemptID, which should be used instead of their string counterparts. Deprecated functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments. Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.

      Description

      I think that it is silly to have tools parsing the strings that the framework builds for task ids. I propose:

      class JobId implements Writable {
      public int getJobId()

      {...}

      }

      class TaskId implements Writable {
      public JobId getJobId();
      public boolean isMap()

      { ... }
      public int getTaskId() { ... }

      }

      class TaskAttemptId implements Writable {
      public TaskId getTaskId();
      public int getAttemptId();
      }

      each of the classes will have a toString() method that generates the current string.

      1. id_v8.patch
        287 kB
        Enis Soztutar
      2. id_v7.patch
        278 kB
        Owen O'Malley
      3. id_v6.patch
        279 kB
        Enis Soztutar
      4. id_v5.patch
        278 kB
        Enis Soztutar
      5. id_v4.patch
        259 kB
        Enis Soztutar
      6. id_v3.patch
        213 kB
        Enis Soztutar
      7. id_v2.patch
        210 kB
        Enis Soztutar
      8. id_v1.patch
        193 kB
        Enis Soztutar
      9. id_wip1.patch
        8 kB
        Enis Soztutar

        Activity

        Owen O'Malley created issue -
        Sameer Paranjpye made changes -
        Field Original Value New Value
        Component/s mapred [ 12310690 ]
        Owen O'Malley made changes -
        Description I think that it is silly to have tools parsing the strings that the framework builds for task ids. I propose:

        class JobId implements Writable {
          private int;
          ...
        }

        class TaskId extends JobId {
          private boolean isMap;
          private int taskId;
          ...
        }

        class TaskAttemptId extends TaskId {
          private int attemptId;
          ...
        }

        each of the classes will have a toString() method that generates the current string.
        I think that it is silly to have tools parsing the strings that the framework builds for task ids. I propose:

        class JobId implements Writable {
           public int getJobId() {...}
        }

        class TaskId implements Writable {
          public JobId getJobId();
          public boolean isMap() { ... }
          public int getTaskId() { ... }
        }

        class TaskAttemptId implements Writable {
          public TaskId getTaskId();
          public int getAttemptId();
        }

        each of the classes will have a toString() method that generates the current string.
        Enis Soztutar made changes -
        Attachment id_wip1.patch [ 12369646 ]
        Enis Soztutar made changes -
        Assignee Owen O'Malley [ owen.omalley ] Enis Soztutar [ enis ]
        Enis Soztutar made changes -
        Attachment id_v1.patch [ 12371240 ]
        Enis Soztutar made changes -
        Fix Version/s 0.16.0 [ 12312740 ]
        Status Open [ 1 ] Patch Available [ 10002 ]
        Doug Cutting made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Attachment id_v2.patch [ 12371871 ]
        Enis Soztutar made changes -
        Affects Version/s 0.16.0 [ 12312740 ]
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.6.2 [ 12312058 ]
        Enis Soztutar made changes -
        Attachment id_v3.patch [ 12371930 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Attachment id_v4.patch [ 12372507 ]
        Enis Soztutar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Fix Version/s 0.17.0 [ 12312913 ]
        Affects Version/s 0.16.0 [ 12312740 ]
        Affects Version/s 0.17.0 [ 12312913 ]
        Fix Version/s 0.16.0 [ 12312740 ]
        Enis Soztutar made changes -
        Affects Version/s 0.18.0 [ 12312972 ]
        Fix Version/s 0.18.0 [ 12312972 ]
        Fix Version/s 0.17.0 [ 12312913 ]
        Affects Version/s 0.17.0 [ 12312913 ]
        Enis Soztutar made changes -
        Attachment id_v5.patch [ 12380681 ]
        Enis Soztutar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Enis Soztutar made changes -
        Hadoop Flags [Incompatible change]
        Release Note This issue introduces new classes JobID, TaskInProgressID and TaskID, which should be used instead of their string counterparts. Functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments are deprecated in favor of the corresponding ones that use ID objects.
        Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
        Owen O'Malley made changes -
        Attachment api-changes.tgz [ 12380804 ]
        Enis Soztutar made changes -
        Attachment id_v6.patch [ 12381106 ]
        Owen O'Malley made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Owen O'Malley made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Owen O'Malley made changes -
        Attachment api-changes.tgz [ 12380804 ]
        Owen O'Malley made changes -
        Attachment id_v7.patch [ 12381151 ]
        Owen O'Malley made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Owen O'Malley made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Devaraj Das made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Devaraj Das made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Enis Soztutar made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Enis Soztutar made changes -
        Attachment id_v8.patch [ 12381173 ]
        Enis Soztutar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Devaraj Das made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hadoop Flags [Incompatible change] [Incompatible change, Reviewed]
        Enis Soztutar made changes -
        Release Note This issue introduces new classes JobID, TaskInProgressID and TaskID, which should be used instead of their string counterparts. Functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments are deprecated in favor of the corresponding ones that use ID objects.
        Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
        This issue introduces new classes JobID, TaskID and TaskAttemptID, which should be used instead of their string counterparts. Functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments are deprecated in favor of the corresponding ones that use ID objects.
        Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
        Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
        Robert Chansler made changes -
        Release Note This issue introduces new classes JobID, TaskID and TaskAttemptID, which should be used instead of their string counterparts. Functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments are deprecated in favor of the corresponding ones that use ID objects.
        Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
        Introduced new classes JobID, TaskID and TaskAttemptID, which should be used instead of their string counterparts. Deprecated functions in JobClient, TaskReport, RunningJob, jobcontrol.Job and TaskCompletionEvent that use string arguments. Applications can use xxxID.toString() and xxxID.forName() methods to convert/restore objects to/from strings.
        Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
        Nigel Daley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Owen O'Malley made changes -
        Component/s mapred [ 12310690 ]

          People

          • Assignee:
            Enis Soztutar
            Reporter:
            Owen O'Malley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development