hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r786278 - in /hadoop/core/trunk: CHANGES.txt src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Date Thu, 18 Jun 2009 21:08:55 GMT
Author: szetszwo
Date: Thu Jun 18 21:08:54 2009
New Revision: 786278

URL: http://svn.apache.org/viewvc?rev=786278&view=rev
Log:
HADOOP-6079. Serialize proxySource as DatanodeInfo in DataTransferProtocol.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=786278&r1=786277&r2=786278&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Jun 18 21:08:54 2009
@@ -841,6 +841,9 @@
     HADOOP-6004. Fixes BlockLocation deserialization.  (Jakob Homan via
     szetszwo)
 
+    HADOOP-6079. Serialize proxySource as DatanodeInfo in DataTransferProtocol.
+    (szetszwo)
+
 Release 0.20.1 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java?rev=786278&r1=786277&r2=786278&view=diff
==============================================================================
--- hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java (original)
+++ hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/balancer/Balancer.java Thu Jun
18 21:08:54 2009
@@ -372,7 +372,7 @@
       out.writeLong(block.getBlock().getBlockId());
       out.writeLong(block.getBlock().getGenerationStamp());
       Text.writeString(out, source.getStorageID());
-      proxySource.write(out);
+      proxySource.getDatanode().write(out);
       AccessToken accessToken = AccessToken.DUMMY_TOKEN;
       if (isAccessTokenEnabled) {
         accessToken = accessTokenHandler.generateToken(null, block.getBlock()
@@ -496,7 +496,7 @@
   }
   
   /* A class that keeps track of a datanode in Balancer */
-  private static class BalancerDatanode implements Writable {
+  private static class BalancerDatanode {
     final private static long MAX_SIZE_TO_MOVE = 10*1024*1024*1024L; //10GB
     protected DatanodeInfo datanode;
     private double utilization;
@@ -584,17 +584,6 @@
         PendingBlockMove pendingBlock) {
       return pendingBlocks.remove(pendingBlock);
     }
-
-    /** The following two methods support the Writable interface */
-    /** Deserialize */
-    public void readFields(DataInput in) throws IOException {
-      datanode.readFields(in);
-    }
-
-    /** Serialize */
-    public void write(DataOutput out) throws IOException {
-      datanode.write(out);
-    }
   }
   
   /** A node that can be the sources of a block move */



Mime
View raw message