[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-06 Thread Jason Lowe (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Lowe updated MAPREDUCE-4822:
--

Status: Open  (was: Patch Available)

I see there's another unnecessary conversion category that we've missed, and 
that's the TaskIDs and TaskAttemptIDs.  They look like the following:

{code}
  public TaskAttemptID getAttemptId() {
return TaskAttemptID.forName(attemptId.toString());
  }
..
  /** Get task id */
  public TaskID getTaskId() { return TaskID.forName(taskid.toString()); }
  /** Get successful task attempt id */
  public TaskAttemptID getSuccessfulTaskAttemptId() {
if(successfulAttemptId != null)
{
  return TaskAttemptID.forName(successfulAttemptId.toString());
}
return null;
  }
{code}

Sorry I didn't catch this previously.

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-06 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: (was: MAPREDUCE-4822.patch)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-06 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-06 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Patch Available  (was: Open)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-06 Thread Jason Lowe (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Lowe updated MAPREDUCE-4822:
--

   Resolution: Fixed
Fix Version/s: (was: 0.24.0)
   0.23.7
   2.0.3-alpha
 Hadoop Flags: Reviewed
   Status: Resolved  (was: Patch Available)

Thanks, Chu!  I committed this to trunk, branch-2, and branch-0.23.

Note that for future JIRAs, the Fix Version field should only be set when the 
fix is finally committed.  The Target Version field should be used when 
indicating what version(s) a patch is targeting before it is committed.

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 2.0.3-alpha, 0.23.7

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-05 Thread Jason Lowe (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Lowe updated MAPREDUCE-4822:
--

Status: Open  (was: Patch Available)

Hi Chu, thanks for picking this up.

The original intent of the JIRA was to fix more than just the one example 
occurrence that Bobby pointed out.  Looking through the source, I can see more 
occurrences of unnecessary conversions in MapAttemptFinishedEvent and 
TaskFinishedEvent.

There's a number of other event classes, like TaskStartedEvent, that are 
converting back and forth between strings and enums since they store their 
internal state in a single {{datum}} Avro record.  We can refactor these to 
build the datum on-demand like TaskAttemptFinishedEvent does, but that's 
probably best left to another JIRA.  We can keep this one short and simple.

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-05 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: (was: MAPREDUCE-4822.patch)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-05 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

Changed all affected files under jobhistory directory

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-05 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Patch Available  (was: Open)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

Removed unnecessary conversion, please review.

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Priority: Trivial
 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: (was: MAPREDUCE-4822.patch)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial

 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


   Fix Version/s: 0.24.0
  Labels: patch  (was: )
Target Version/s: 0.23.4
  Status: Patch Available  (was: Open)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Open  (was: Patch Available)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: (was: MAPREDUCE-4822.patch)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Patch Available  (was: Open)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Open  (was: Patch Available)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: (was: MAPREDUCE-4822.patch)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Attachment: MAPREDUCE-4822.patch

No testcase is included as the change is trivial.

For JavaDoc warnings, it is false positive as the same number of warnings are 
generated on a clean build under my dev environment.


-1 overall.

+1 @author.  The patch does not contain any @author tags.

-1 tests included.  The patch doesn't appear to include any new or modified 
tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

-1 javadoc.  The javadoc tool appears to have generated 20 warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 eclipse:eclipse.  The patch built with eclipse:eclipse.

+1 findbugs.  The patch does not introduce any new Findbugs (version ) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.


 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2013-02-04 Thread Chu Tong (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chu Tong updated MAPREDUCE-4822:


Status: Patch Available  (was: Open)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Assignee: Chu Tong
Priority: Trivial
  Labels: patch
 Fix For: 0.24.0

 Attachments: MAPREDUCE-4822.patch


 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (MAPREDUCE-4822) Unnecessary conversions in History Events

2012-11-27 Thread Aaron T. Myers (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron T. Myers updated MAPREDUCE-4822:
--

Summary: Unnecessary conversions in History Events  (was: Unnessisary 
conversions in History Events)

 Unnecessary conversions in History Events
 -

 Key: MAPREDUCE-4822
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4822
 Project: Hadoop Map/Reduce
  Issue Type: Improvement
  Components: jobhistoryserver
Affects Versions: 0.23.4
Reporter: Robert Joseph Evans
Priority: Trivial

 There are a number of conversions in the Job History Event classes that are 
 totally unnecessary.  It appears that they were originally used to convert 
 from the internal avro format, but now many of them do not pull the values 
 from the avro they store them internally.
 For example:
 {code:title=TaskAttemptFinishedEvent.java}
   /** Get the task type */
   public TaskType getTaskType() {
 return TaskType.valueOf(taskType.toString());
   }
 {code}
 The code currently is taking an enum, converting it to a string and then 
 asking the same enum to convert it back to an enum.  If java work properly 
 this should be a noop and a reference to the original taskType should be 
 returned.
 There are several places that a string is having toString called on it, and 
 since strings are immutable it returns a reference to itself.
 The various ids are not immutable and probably should not be changed at this 
 point.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira