[jira] [Updated] (MAPREDUCE-5288) ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero issues

2013-07-24 Thread Alejandro Abdelnur (JIRA)

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

Alejandro Abdelnur updated MAPREDUCE-5288:
--

   Resolution: Fixed
Fix Version/s: 1.3.0
 Hadoop Flags: Reviewed
   Status: Resolved  (was: Patch Available)

Thanks Karthik. Thanks Harsh for reviewing it. Committed to branch-1.

 ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero 
 issues
 ---

 Key: MAPREDUCE-5288
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5288
 Project: Hadoop Map/Reduce
  Issue Type: Bug
  Components: mrv1
Affects Versions: 1.2.0
Reporter: Harsh J
Assignee: Karthik Kambatla
 Fix For: 1.3.0

 Attachments: mr-5288-1.patch


 The computation in the above mentioned class-method is below:
 {code}
   long estimate = Math.round(((double)inputSize * 
   completedMapsOutputSize * 2.0)/completedMapsInputSize);
 {code}
 Given 
 http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#round(double), 
 its possible that the returned estimate could be Long.MAX_VALUE if 
 completedMapsInputSize is determined to be zero.
 This can be proven with a simple code snippet:
 {code}
 class Foo {
 public static void main(String... args) {
 long inputSize = 600L + 2;
 long estimate = Math.round(((double)inputSize *
   1L * 2.0)/0L);
 System.out.println(estimate);
 }
 }
 {code}
 The above conveniently prints out: {{9223372036854775807}}, which is 
 Long.MAX_VALUE (or 8 Exbibytes per MapReduce).

--
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-5288) ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero issues

2013-06-05 Thread Karthik Kambatla (JIRA)

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

Karthik Kambatla updated MAPREDUCE-5288:


Attachment: mr-5288-1.patch

Uploading a patch that sets the {{thresholdToUse}} value to at least 1. This 
value is used in {{getEstimatedTotalMapOutputSize()}} to decide whether to 
estimate or not.

 ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero 
 issues
 ---

 Key: MAPREDUCE-5288
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5288
 Project: Hadoop Map/Reduce
  Issue Type: Bug
  Components: mrv1
Affects Versions: 1.2.0
Reporter: Harsh J
Assignee: Karthik Kambatla
 Attachments: mr-5288-1.patch


 The computation in the above mentioned class-method is below:
 {code}
   long estimate = Math.round(((double)inputSize * 
   completedMapsOutputSize * 2.0)/completedMapsInputSize);
 {code}
 Given 
 http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#round(double), 
 its possible that the returned estimate could be Long.MAX_VALUE if 
 completedMapsInputSize is determined to be zero.
 This can be proven with a simple code snippet:
 {code}
 class Foo {
 public static void main(String... args) {
 long inputSize = 600L + 2;
 long estimate = Math.round(((double)inputSize *
   1L * 2.0)/0L);
 System.out.println(estimate);
 }
 }
 {code}
 The above conveniently prints out: {{9223372036854775807}}, which is 
 Long.MAX_VALUE (or 8 Exbibytes per MapReduce).

--
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-5288) ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero issues

2013-06-05 Thread Karthik Kambatla (JIRA)

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

Karthik Kambatla updated MAPREDUCE-5288:


Status: Patch Available  (was: Open)

 ResourceEstimator#getEstimatedTotalMapOutputSize suffers from divide by zero 
 issues
 ---

 Key: MAPREDUCE-5288
 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5288
 Project: Hadoop Map/Reduce
  Issue Type: Bug
  Components: mrv1
Affects Versions: 1.2.0
Reporter: Harsh J
Assignee: Karthik Kambatla
 Attachments: mr-5288-1.patch


 The computation in the above mentioned class-method is below:
 {code}
   long estimate = Math.round(((double)inputSize * 
   completedMapsOutputSize * 2.0)/completedMapsInputSize);
 {code}
 Given 
 http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#round(double), 
 its possible that the returned estimate could be Long.MAX_VALUE if 
 completedMapsInputSize is determined to be zero.
 This can be proven with a simple code snippet:
 {code}
 class Foo {
 public static void main(String... args) {
 long inputSize = 600L + 2;
 long estimate = Math.round(((double)inputSize *
   1L * 2.0)/0L);
 System.out.println(estimate);
 }
 }
 {code}
 The above conveniently prints out: {{9223372036854775807}}, which is 
 Long.MAX_VALUE (or 8 Exbibytes per MapReduce).

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