hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1311959 - in /hadoop/common/trunk/hadoop-mapreduce-project: ./ src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/ src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/ src/contrib/raid/src/java/org/apache/hadoop/...
Date Tue, 10 Apr 2012 19:46:45 GMT
Author: szetszwo
Date: Tue Apr 10 19:46:44 2012
New Revision: 1311959

URL: http://svn.apache.org/viewvc?rev=1311959&view=rev
Log:
MAPREDUCE-4057. Update RAID for the HA and fsdataset changes.  Contributed by Devaraj K

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java
    hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRaidUtil.java
    hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1311959&r1=1311958&r2=1311959&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Tue Apr 10 19:46:44 2012
@@ -224,6 +224,9 @@ Release 2.0.0 - UNRELEASED
     MAPREDUCE-3869. Fix classpath for DistributedShell application. (Devaraj K
     via sseth)
 
+    MAPREDUCE-4057. Update RAID for the HA and fsdataset changes.  (Devaraj K
+    via szetszwo)
+
 Release 0.23.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java?rev=1311959&r1=1311958&r2=1311959&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/datanode/RaidBlockSender.java
Tue Apr 10 19:46:44 2012
@@ -33,6 +33,7 @@ import org.apache.hadoop.fs.ChecksumExce
 import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
 import org.apache.hadoop.hdfs.protocol.HdfsConstants;
 import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader;
+import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.net.SocketOutputStream;
 import org.apache.hadoop.util.DataChecksum;
@@ -441,9 +442,9 @@ public class RaidBlockSender implements 
   
   private static class BlockInputStreamFactory implements InputStreamFactory {
     private final ExtendedBlock block;
-    private final FSDatasetInterface data;
+    private final FsDatasetSpi<?> data;
 
-    private BlockInputStreamFactory(ExtendedBlock block, FSDatasetInterface data) {
+    private BlockInputStreamFactory(ExtendedBlock block, FsDatasetSpi<?> data) {
       this.block = block;
       this.data = data;
     }

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRaidUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRaidUtil.java?rev=1311959&r1=1311958&r2=1311959&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRaidUtil.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRaidUtil.java
Tue Apr 10 19:46:44 2012
@@ -22,6 +22,7 @@ import java.io.*;
 import org.apache.hadoop.classification.*;
 import org.apache.hadoop.fs.*;
 import org.apache.hadoop.hdfs.protocol.*;
+import org.apache.hadoop.ipc.StandbyException;
 import org.apache.hadoop.security.AccessControlException;
 
 /** Utilities used by RAID for accessing NameNode. */
@@ -35,10 +36,11 @@ public class NameNodeRaidUtil {
     return dir.getFileInfo(src, resolveLink);
   }
 
-  /** Accessing FSNamesystem.getFileInfo(..) */
+  /** Accessing FSNamesystem.getFileInfo(..) 
+ * @throws StandbyException */
   public static HdfsFileStatus getFileInfo(final FSNamesystem namesystem,
       final String src, final boolean resolveLink
-      ) throws AccessControlException, UnresolvedLinkException {
+      ) throws AccessControlException, UnresolvedLinkException, StandbyException {
     return namesystem.getFileInfo(src, resolveLink);
   }
 

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java?rev=1311959&r1=1311958&r2=1311959&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/contrib/raid/src/java/org/apache/hadoop/raid/BlockFixer.java
Tue Apr 10 19:46:44 2012
@@ -622,8 +622,8 @@ public abstract class BlockFixer extends
         int idx = rand.nextInt(live.length);
         chosen = live[idx];
         for (DatanodeInfo avoid: locationsToAvoid) {
-          if (chosen.name.equals(avoid.name)) {
-            LOG.info("Avoiding " + avoid.name);
+          if (chosen.getName().equals(avoid.getName())) {
+            LOG.info("Avoiding " + avoid.getName());
             chosen = null;
             break;
           }
@@ -632,7 +632,7 @@ public abstract class BlockFixer extends
       if (chosen == null) {
         throw new IOException("Could not choose datanode");
       }
-      LOG.info("Choosing datanode " + chosen.name);
+      LOG.info("Choosing datanode " + chosen.getName());
       return chosen;
     }
 
@@ -736,7 +736,7 @@ public abstract class BlockFixer extends
                                 DataInputStream metadataIn,
                                 LocatedBlock block, long blockSize)
       throws IOException {
-      InetSocketAddress target = NetUtils.createSocketAddr(datanode.name);
+      InetSocketAddress target = NetUtils.createSocketAddr(datanode.getName());
       Socket sock = SocketChannel.open().socket();
       
       int readTimeout =
@@ -785,7 +785,7 @@ public abstract class BlockFixer extends
             1, 0L, blockSize, 0L, DataChecksum.newDataChecksum(metadataIn));
         blockSender.sendBlock(out, baseStream);
         
-        LOG.info("Sent block " + block.getBlock() + " to " + datanode.name);
+        LOG.info("Sent block " + block.getBlock() + " to " + datanode.getName());
       } finally {
         out.close();
       }



Mime
View raw message