hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r540326 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/JobClient.java src/java/org/apache/hadoop/mapred/LocalJobRunner.java
Date Mon, 21 May 2007 22:31:26 GMT
Author: cutting
Date: Mon May 21 15:31:23 2007
New Revision: 540326

URL: http://svn.apache.org/viewvc?view=rev&rev=540326
Log:
HADOOP-1393.  Remove a potential unexpected negative number for uses of random number generator.
 Contributed by Owen.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=540326&r1=540325&r2=540326
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon May 21 15:31:23 2007
@@ -39,6 +39,9 @@
  12. HADOOP-1364.  Fix various inconsistent synchronization issues.
      (Devaraj Das via cutting)
 
+ 13. HADOOP-1393.  Remove a potential unexpected negative number from
+     uses of random number generator. (omalley via cutting)
+
 
 Branch 0.13 (unreleased changes)
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java?view=diff&rev=540326&r1=540325&r2=540326
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobClient.java Mon May 21 15:31:23
2007
@@ -271,7 +271,9 @@
     //
 
     // Create a number of filenames in the JobTracker's fs namespace
-    Path submitJobDir = new Path(job.getSystemDir(), "submit_" + Integer.toString(Math.abs(r.nextInt()),
36));
+    Path submitJobDir = new Path(job.getSystemDir(), "submit_" + 
+                                 Integer.toString(r.nextInt(Integer.MAX_VALUE), 
+                                                  36));
     Path submitJobFile = new Path(submitJobDir, "job.xml");
     Path submitJarFile = new Path(submitJobDir, "job.jar");
     Path submitSplitFile = new Path(submitJobDir, "job.split");

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java?view=diff&rev=540326&r1=540325&r2=540326
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java Mon May 21 15:31:23
2007
@@ -188,7 +188,7 @@
     }
     
     private String newId() {
-      return Integer.toString(Math.abs(random.nextInt()), 36);
+      return Integer.toString(random.nextInt(Integer.MAX_VALUE), 36);
     }
 
     // TaskUmbilicalProtocol methods



Mime
View raw message