hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r437846 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/JobStatus.java src/java/org/apache/hadoop/mapred/JobTracker.java
Date Mon, 28 Aug 2006 21:29:39 GMT
Author: cutting
Date: Mon Aug 28 14:29:39 2006
New Revision: 437846

URL: http://svn.apache.org/viewvc?rev=437846&view=rev
Log:
HADOOP-486.  Add the job username to JobStatus instances returned by JobClient.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobStatus.java
    lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=437846&r1=437845&r2=437846&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Mon Aug 28 14:29:39 2006
@@ -83,6 +83,9 @@
 20. HADOOP-281.  Prohibit DFS files that are also directories.
     (Wendy Chien via cutting)
 
+21. HADOOP-486.  Add the job username to JobStatus instances returned
+    by JobClient.  (Mahadev Konar via cutting)
+
 
 Release 0.5.0 - 2006-08-04
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobStatus.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobStatus.java?rev=437846&r1=437845&r2=437846&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobStatus.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobStatus.java Mon Aug 28 14:29:39
2006
@@ -46,6 +46,7 @@
     float reduceProgress;
     int runState;
     long startTime;
+    String user;
     /**
      */
     public JobStatus() {
@@ -63,6 +64,7 @@
         this.mapProgress = mapProgress;
         this.reduceProgress = reduceProgress;
         this.runState = runState;
+        this.user = "nobody";
     }
 
     /**
@@ -107,6 +109,16 @@
      * @return start time of the job
      */
     public long getStartTime() { return startTime;};
+
+    /**
+      * @param user The username of the job
+      */
+    void setUsername(String userName) { this.user = userName;};
+
+    /**
+      * @return the username of the job
+      */
+    public String getUsername() { return this.user;};
     ///////////////////////////////////////
     // Writable
     ///////////////////////////////////////
@@ -116,6 +128,7 @@
         out.writeFloat(reduceProgress);
         out.writeInt(runState);
         out.writeLong(startTime);
+        UTF8.writeString(out, user);
     }
     public void readFields(DataInput in) throws IOException {
         this.jobid = UTF8.readString(in);
@@ -123,5 +136,6 @@
         this.reduceProgress = in.readFloat();
         this.runState = in.readInt();
         this.startTime = in.readLong();
+        this.user = UTF8.readString(in);
     }
 }

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=437846&r1=437845&r2=437846&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/mapred/JobTracker.java Mon Aug 28 14:29:39
2006
@@ -1109,6 +1109,7 @@
             if (status.getRunState() == JobStatus.RUNNING 
 		|| status.getRunState() == JobStatus.PREP) {
 		status.setStartTime(jip.getStartTime());
+                status.setUsername(jip.getProfile().getUser());
                 v.add(status);
             }
         }



Mime
View raw message