浏览代码

HADOOP-326. Remove some dead code. Contributed by Owen.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@417574 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 19 年之前
父节点
当前提交
895532dec9

+ 1 - 3
src/java/org/apache/hadoop/mapred/TaskTracker.java

@@ -51,7 +51,6 @@ public class TaskTracker
     InetSocketAddress jobTrackAddr;
 
     int taskReportPort;
-    int mapOutputPort;
 
     Server taskReportServer = null;
     Server mapOutputServer = null;
@@ -123,7 +122,6 @@ public class TaskTracker
 
         // port numbers
         this.taskReportPort = this.fConf.getInt("mapred.task.tracker.report.port", 50050);
-        this.mapOutputPort = this.fConf.getInt("mapred.task.tracker.output.port", 50040);
 
         // RPC initialization
         while (true) {
@@ -320,7 +318,7 @@ public class TaskTracker
             
             TaskTrackerStatus status = 
               new TaskTrackerStatus(taskTrackerName, localHostname, 
-                                    mapOutputPort, httpPort, taskReports, 
+                                    httpPort, taskReports, 
                                     failures); 
             int resultCode = jobClient.emitHeartbeat(status, justStarted);
             justStarted = false;

+ 1 - 10
src/java/org/apache/hadoop/mapred/TaskTrackerStatus.java

@@ -40,7 +40,6 @@ class TaskTrackerStatus implements Writable {
 
     String trackerName;
     String host;
-    int port;
     int httpPort;
     int failures;
     Vector taskReports;
@@ -54,11 +53,10 @@ class TaskTrackerStatus implements Writable {
 
     /**
      */
-    public TaskTrackerStatus(String trackerName, String host, int port, 
+    public TaskTrackerStatus(String trackerName, String host, 
                              int httpPort, Vector taskReports, int failures) {
         this.trackerName = trackerName;
         this.host = host;
-        this.port = port;
         this.httpPort = httpPort;
 
         this.taskReports = new Vector();
@@ -76,11 +74,6 @@ class TaskTrackerStatus implements Writable {
     public String getHost() {
         return host;
     }
-    /**
-     */
-    public int getPort() {
-        return port;
-    }
 
     /**
      * Get the port that this task tracker is serving http requests on.
@@ -156,7 +149,6 @@ class TaskTrackerStatus implements Writable {
     public void write(DataOutput out) throws IOException {
         UTF8.writeString(out, trackerName);
         UTF8.writeString(out, host);
-        out.writeInt(port);
         out.writeInt(httpPort);
 
         out.writeInt(taskReports.size());
@@ -171,7 +163,6 @@ class TaskTrackerStatus implements Writable {
     public void readFields(DataInput in) throws IOException {
         this.trackerName = UTF8.readString(in);
         this.host = UTF8.readString(in);
-        this.port = in.readInt();
         this.httpPort = in.readInt();
 
         taskReports = new Vector();