hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1077403 - in /hadoop/common/branches/branch-0.20-security-patches/src: contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/ contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/ tools/org/apache/hadoop/tools/rumen/
Date Fri, 04 Mar 2011 04:11:27 GMT
Author: omalley
Date: Fri Mar  4 04:11:27 2011
New Revision: 1077403

URL: http://svn.apache.org/viewvc?rev=1077403&view=rev
Log:
commit 655eb8ec5b82222c246bfab862c052d43fa4633c
Author: Hong Tang <htang@yahoo-inc.com>
Date:   Fri Apr 16 14:35:38 2010 -0700

    MAPREDUCE-1656. JobStory should provide queue info.
    
    From https://issues.apache.org/jira/secure/attachment/12441905/mr-1656-yhadoop-20.1xx.patch.
    
    +++ b/YAHOO-CHANGES.txt
    +    MAPREDUCE-1656. JobStory should provide queue info. (htang)
    +

Modified:
    hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
    hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java
    hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/JobStory.java
    hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java

Modified: hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobFactory.java?rev=1077403&r1=1077402&r2=1077403&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/JobFactory.java
Fri Mar  4 04:11:27 2011
@@ -161,6 +161,9 @@ abstract class JobFactory<T> implements 
     public Values getOutcome() {
       return job.getOutcome();
     }
+    public String getQueueName() {
+      return job.getQueueName();
+    }
   }
 
   protected abstract Thread createReaderThread() ;

Modified: hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java?rev=1077403&r1=1077402&r2=1077403&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/contrib/gridmix/src/test/org/apache/hadoop/mapred/gridmix/DebugJobProducer.java
Fri Mar  4 04:11:27 2011
@@ -26,6 +26,7 @@ import org.apache.hadoop.tools.rumen.Tas
 import org.apache.hadoop.tools.rumen.TaskAttemptInfo;
 import org.apache.hadoop.tools.rumen.Pre21JobHistoryConstants.Values;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapreduce.JobID;
 import org.apache.hadoop.mapreduce.TaskType;
 import org.apache.hadoop.mapreduce.InputSplit;
@@ -287,6 +288,11 @@ public class DebugJobProducer implements
       throw new UnsupportedOperationException();
     }
 
+    @Override
+    public String getQueueName() {
+      return JobConf.DEFAULT_QUEUE_NAME;
+    }
+    
     public static void reset() {
       seq.set(0);
       timestamp.set(System.currentTimeMillis() - TimeUnit.MILLISECONDS.convert(

Modified: hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/JobStory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/JobStory.java?rev=1077403&r1=1077402&r2=1077403&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/JobStory.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/JobStory.java
Fri Mar  4 04:11:27 2011
@@ -115,4 +115,10 @@ public interface JobStory {
    * @return The outcome of the job execution.
    */
   public Values getOutcome();
+  
+  /**
+   * Get the queue where the job is submitted.
+   * @return the queue where the job is submitted.
+   */
+  public String getQueueName();
 }

Modified: hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java?rev=1077403&r1=1077402&r2=1077403&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java
(original)
+++ hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/rumen/ZombieJob.java
Fri Mar  4 04:11:27 2011
@@ -125,6 +125,7 @@ public class ZombieJob implements JobSto
       jobConf.setUser(getUser());
       jobConf.setNumMapTasks(getNumberMaps());
       jobConf.setNumReduceTasks(getNumberReduces());
+      jobConf.setQueueName(getQueueName());
     }
     return jobConf;
   }
@@ -252,6 +253,12 @@ public class ZombieJob implements JobSto
     return job.getSubmitTime() - job.getRelativeTime();
   }
 
+  @Override
+  public String getQueueName() {
+    String queue = job.getQueue();
+    return (queue == null)? JobConf.DEFAULT_QUEUE_NAME : queue;
+  }
+  
   /**
    * Getting the number of map tasks that are actually logged in the trace.
    * @return The number of map tasks that are actually logged in the trace.



Mime
View raw message