You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/04/18 19:22:11 UTC
svn commit: r394987 - in /lucene/hadoop/trunk: CHANGES.txt
src/java/org/apache/hadoop/dfs/DFSClient.java
src/java/org/apache/hadoop/mapred/TaskTracker.java
Author: cutting
Date: Tue Apr 18 10:22:10 2006
New Revision: 394987
URL: http://svn.apache.org/viewcvs?rev=394987&view=rev
Log:
Fix HADOOP-144. Use mapred task id as dfs client id to faciliate debugging. Contributed by Owen O'Malley.
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/CHANGES.txt?rev=394987&r1=394986&r2=394987&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Apr 18 10:22:10 2006
@@ -34,6 +34,9 @@
lists of directories, no longer be space-separated. This fixes
several bugs on Windows. (cutting)
+ 9. Fix HADOOP-144. Use mapred task id for dfs client id, to
+ facilitate debugging. (omalley via cutting)
+
Release 0.1.1 - 2006-04-08
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java?rev=394987&r1=394986&r2=394987&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/DFSClient.java Tue Apr 18 10:22:10 2006
@@ -60,7 +60,12 @@
} catch (UnknownHostException uhe) {
this.localName = "";
}
- this.clientName = "DFSClient_" + r.nextInt();
+ String taskId = conf.get("mapred.task.id");
+ if (taskId != null) {
+ this.clientName = "DFSClient_" + taskId;
+ } else {
+ this.clientName = "DFSClient_" + r.nextInt();
+ }
this.leaseChecker = new Daemon(new LeaseChecker());
this.leaseChecker.start();
}
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java
URL: http://svn.apache.org/viewcvs/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java?rev=394987&r1=394986&r2=394987&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/TaskTracker.java Tue Apr 18 10:22:10 2006
@@ -398,6 +398,7 @@
t.setJobFile(localJobFile.toString());
JobConf jc = new JobConf(localJobFile);
+ jc.set("mapred.task.id", task.getTaskId());
String jarFile = jc.getJar();
if (jarFile != null) {
fs.copyToLocalFile(new Path(jarFile), localJarFile);