hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r425651 - /lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java
Date Wed, 26 Jul 2006 07:31:16 GMT
Author: cutting
Date: Wed Jul 26 00:31:15 2006
New Revision: 425651

URL: http://svn.apache.org/viewvc?rev=425651&view=rev
Log:
HADOOP-387.  Fix a potential task id collision in LocalTaskRunner.  Contributed by Sami Siren.

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

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?rev=425651&r1=425650&r2=425651&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/LocalJobRunner.java Wed Jul 26 00:31:15
2006
@@ -47,6 +47,7 @@
     private String file;
     private String id;
     private JobConf job;
+    private Random random = new Random();
 
     private JobStatus status = new JobStatus();
     private ArrayList mapIds = new ArrayList();
@@ -150,7 +151,7 @@
     }
 
     private String newId() {
-      return Integer.toString(Math.abs(new Random().nextInt()),36);
+      return Integer.toString(Math.abs(random.nextInt()),36);
     }
 
     // TaskUmbilicalProtocol methods



Mime
View raw message