瀏覽代碼

HADOOP-618. Make JobSubmissionProtocol public. Contributed by Arun.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@486339 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 年之前
父節點
當前提交
ea09c242f8

+ 3 - 0
CHANGES.txt

@@ -63,6 +63,9 @@ Trunk (unreleased changes)
 18. HADOOP-806. Include link to datanodes on front page of namenode
     web interface.  (Raghu Angadi via cutting)
 
+19. HADOOP-618.  Make JobSubmissionProtocol public.
+    (Arun C Murthy via cutting)
+
 
 Release 0.9.1 - 2006-12-06
 

+ 13 - 2
src/java/org/apache/hadoop/mapred/JobProfile.java

@@ -28,7 +28,7 @@ import java.net.*;
  *
  * @author Mike Cafarella
  **************************************************/
-class JobProfile implements Writable {
+public class JobProfile implements Writable {
 
     static {                                      // register a ctor
       WritableFactories.setFactory
@@ -45,11 +45,20 @@ class JobProfile implements Writable {
     String name;
 
     /**
+     * Construct an empty {@link JobProfile}.
      */
     public JobProfile() {
     }
 
     /**
+     * Construct a {@link JobProfile} the userid, jobid, 
+     * job config-file, job-details url and job name. 
+     * 
+     * @param user userid of the person who submitted the job.
+     * @param jobid id of the job.
+     * @param jobFile job configuration file. 
+     * @param url link to the web-ui for details of the job.
+     * @param name user-specified job name.
      */
     public JobProfile(String user, String jobid, String jobFile, String url,
                       String name) {
@@ -68,19 +77,21 @@ class JobProfile implements Writable {
     }
     
     /**
+     * Get the job id.
      */
     public String getJobId() {
         return jobid;
     }
 
     /**
+     * Get the configuration file for the job.
      */
     public String getJobFile() {
         return jobFile;
     }
 
-
     /**
+     * Get the link to the web-ui for details of the job.
      */
     public URL getURL() {
         try {

+ 6 - 2
src/java/org/apache/hadoop/mapred/JobSubmissionProtocol.java

@@ -27,7 +27,7 @@ import org.apache.hadoop.ipc.VersionedProtocol;
  * JobClient can use these methods to submit a Job for execution, and learn about
  * the current system status.
  */ 
-interface JobSubmissionProtocol extends VersionedProtocol {
+public interface JobSubmissionProtocol extends VersionedProtocol {
     public static final long versionID = 1L;
     /**
      * Submit a Job for execution.  Returns the latest profile for
@@ -57,9 +57,13 @@ interface JobSubmissionProtocol extends VersionedProtocol {
     public JobStatus getJobStatus(String jobid) throws IOException;
 
     /**
-     * Grab a bunch of info on the tasks that make up the job
+     * Grab a bunch of info on the map tasks that make up the job
      */
     public TaskReport[] getMapTaskReports(String jobid) throws IOException;
+
+    /**
+     * Grab a bunch of info on the reduce tasks that make up the job
+     */
     public TaskReport[] getReduceTaskReports(String jobid) throws IOException;
 
     /**