hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1126673 - in /hadoop/hdfs/branches/yahoo-merge: ./ src/c++/libhdfs/ src/contrib/hdfsproxy/ src/java/ src/java/org/apache/hadoop/hdfs/server/datanode/ src/test/aop/org/apache/hadoop/fi/ src/test/hdfs/ src/webapps/datanode/ src/webapps/hdfs/...
Date Mon, 23 May 2011 19:14:30 GMT
Author: szetszwo
Date: Mon May 23 19:14:29 2011
New Revision: 1126673

URL: http://svn.apache.org/viewvc?rev=1126673&view=rev
Log:
svn merge -c 1101675 from trunk for HDFS-1908.

Modified:
    hadoop/hdfs/branches/yahoo-merge/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/CHANGES.txt
    hadoop/hdfs/branches/yahoo-merge/build.xml   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/c++/libhdfs/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/contrib/hdfsproxy/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/java/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java
  (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/DataTransferTestUtil.java
    hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/FiHFlushTestUtil.java
    hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/Pipeline.java
    hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/PipelineTest.java
    hadoop/hdfs/branches/yahoo-merge/src/test/hdfs/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/webapps/datanode/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/webapps/hdfs/   (props changed)
    hadoop/hdfs/branches/yahoo-merge/src/webapps/secondary/   (props changed)

Propchange: hadoop/hdfs/branches/yahoo-merge/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -2,4 +2,4 @@
 /hadoop/hdfs/branches/HDFS-1052:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265:796829-820463
 /hadoop/hdfs/branches/branch-0.21:820487
-/hadoop/hdfs/trunk:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1036738,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1036738,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Modified: hadoop/hdfs/branches/yahoo-merge/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/yahoo-merge/CHANGES.txt?rev=1126673&r1=1126672&r2=1126673&view=diff
==============================================================================
--- hadoop/hdfs/branches/yahoo-merge/CHANGES.txt (original)
+++ hadoop/hdfs/branches/yahoo-merge/CHANGES.txt Mon May 23 19:14:29 2011
@@ -391,6 +391,9 @@ Trunk (unreleased changes)
     HDFS-1827. Fix timeout problem in TestBlockReplacement.  (Matt Foley
     via szetszwo)
 
+    HDFS-1908. Fix a NullPointerException in fi.DataTransferTestUtil.
+    (szetszwo)
+
 Release 0.22.0 - Unreleased
 
   NEW FEATURES

Propchange: hadoop/hdfs/branches/yahoo-merge/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/build.xml:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/build.xml:796829-820463
 /hadoop/hdfs/branches/branch-0.21/build.xml:820487
-/hadoop/hdfs/trunk/build.xml:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/build.xml:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/c++/libhdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -1,4 +1,4 @@
 /hadoop/core/branches/branch-0.19/mapred/src/c++/libhdfs:713112
 /hadoop/core/trunk/src/c++/libhdfs:776175-784663
 /hadoop/hdfs/branches/HDFS-1052/src/c++/libhdfs:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
-/hadoop/hdfs/trunk/src/c++/libhdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/c++/libhdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/contrib/hdfsproxy/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/contrib/hdfsproxy:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/contrib/hdfsproxy:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/contrib/hdfsproxy:820487
-/hadoop/hdfs/trunk/src/contrib/hdfsproxy:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/contrib/hdfsproxy:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/java/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/java:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/java:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/java:820487
-/hadoop/hdfs/trunk/src/java:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/java:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -5,4 +5,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:820487
-/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInfo.java:1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Modified: hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/DataTransferTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/DataTransferTestUtil.java?rev=1126673&r1=1126672&r2=1126673&view=diff
==============================================================================
--- hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/DataTransferTestUtil.java
(original)
+++ hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/DataTransferTestUtil.java
Mon May 23 19:14:29 2011
@@ -27,7 +27,6 @@ import org.apache.hadoop.fi.FiTestUtil.C
 import org.apache.hadoop.fi.FiTestUtil.CountdownConstraint;
 import org.apache.hadoop.fi.FiTestUtil.MarkerConstraint;
 import org.apache.hadoop.hdfs.protocol.DatanodeID;
-import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
 import org.apache.hadoop.hdfs.protocol.LocatedBlock;
 import org.apache.hadoop.util.DiskChecker.DiskOutOfSpaceException;
 
@@ -55,7 +54,7 @@ public class DataTransferTestUtil {
    * and some actions.
    */
   public static class DataTransferTest implements PipelineTest {
-    private List<Pipeline> pipelines = new ArrayList<Pipeline>();
+    private final List<Pipeline> pipelines = new ArrayList<Pipeline>();
     private volatile boolean isSuccess = false;
 
     /** Simulate action for the receiverOpWriteBlock pointcut */
@@ -101,7 +100,8 @@ public class DataTransferTestUtil {
     }
 
     /** Initialize the pipeline. */
-    public Pipeline initPipeline(LocatedBlock lb) {
+    @Override
+    public synchronized Pipeline initPipeline(LocatedBlock lb) {
       final Pipeline pl = new Pipeline(lb);
       if (pipelines.contains(pl)) {
         throw new IllegalStateException("thepipeline != null");
@@ -110,20 +110,31 @@ public class DataTransferTestUtil {
       return pl;
     }
 
-    /** Return the pipeline. */
-    public Pipeline getPipeline(DatanodeID id) {
-      if (pipelines == null) {
-        throw new IllegalStateException("thepipeline == null");
-      }
-      StringBuilder dnString = new StringBuilder();
-      for (Pipeline pipeline : pipelines) {
-        for (DatanodeInfo dni : pipeline.getDataNodes())
-          dnString.append(dni.getStorageID());
-        if (dnString.toString().contains(id.getStorageID()))
-          return pipeline;
+    /** Return the pipeline for the datanode. */
+    @Override
+    public synchronized Pipeline getPipelineForDatanode(DatanodeID id) {
+      for (Pipeline p : pipelines) {
+        if (p.contains(id)){
+          return p;
+        }
       }
+      FiTestUtil.LOG.info("FI: pipeline not found; id=" + id
+          + ", pipelines=" + pipelines);
       return null;
     }
+
+    /**
+     * Is the test not yet success
+     * and the last pipeline contains the given datanode?
+     */
+    private synchronized boolean isNotSuccessAndLastPipelineContains(
+        int index, DatanodeID id) {
+      if (isSuccess()) {
+        return false;
+      }
+      final int n = pipelines.size();
+      return n == 0? false: pipelines.get(n-1).contains(index, id);
+    }
   }
 
   /** Action for DataNode */
@@ -171,8 +182,7 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID datanodeid) throws IOException {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(datanodeid);
-      if (p.contains(index, datanodeid)) {
+      if (test.isNotSuccessAndLastPipelineContains(index, datanodeid)) {
         marker.mark();
       }
     }
@@ -193,8 +203,7 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (!test.isSuccess() && p.contains(index, id)) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)) {
         final String s = toString(id);
         FiTestUtil.LOG.info(s);
         throw new OutOfMemoryError(s);
@@ -215,8 +224,8 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (p.contains(index, id) && countdown.isSatisfied()) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)
+          && countdown.isSatisfied()) {
         final String s = toString(id);
         FiTestUtil.LOG.info(s);
         throw new OutOfMemoryError(s);
@@ -234,8 +243,7 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) throws DiskOutOfSpaceException {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (p.contains(index, id)) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)) {
         final String s = toString(id);
         FiTestUtil.LOG.info(s);
         throw new DiskOutOfSpaceException(s);
@@ -256,8 +264,7 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) throws IOException {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (p.contains(index, id)) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)) {
         final String s = toString(id);
         FiTestUtil.LOG.info(s);
         throw new IOException(s);
@@ -284,8 +291,8 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) throws DiskOutOfSpaceException {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (p.contains(index, id) && countdown.isSatisfied()) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)
+          && countdown.isSatisfied()) {
         final String s = toString(id);
         FiTestUtil.LOG.info(s);
         throw new DiskOutOfSpaceException(s);
@@ -339,8 +346,7 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (!test.isSuccess() && p.contains(index, id)) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)) {
         FiTestUtil.LOG.info(toString(id));
         if (maxDuration <= 0) {
           for(; FiTestUtil.sleep(1000); ); //sleep forever until interrupt
@@ -385,8 +391,8 @@ public class DataTransferTestUtil {
     @Override
     public void run(DatanodeID id) {
       final DataTransferTest test = getDataTransferTest();
-      final Pipeline p = test.getPipeline(id);
-      if (p.contains(index, id) && countdown.isSatisfied()) {
+      if (test.isNotSuccessAndLastPipelineContains(index, id)
+          && countdown.isSatisfied()) {
         final String s = toString(id) + ", duration = ["
         + minDuration + "," + maxDuration + ")";
         FiTestUtil.LOG.info(s);

Modified: hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/FiHFlushTestUtil.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/FiHFlushTestUtil.java?rev=1126673&r1=1126672&r2=1126673&view=diff
==============================================================================
--- hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/FiHFlushTestUtil.java
(original)
+++ hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/FiHFlushTestUtil.java
Mon May 23 19:14:29 2011
@@ -44,9 +44,8 @@ public class FiHFlushTestUtil extends Da
 
     /** {@inheritDoc} */
     public void run(DatanodeID id) throws IOException {
-      final Pipeline p = getPipelineTest().getPipeline(id);
+      final Pipeline p = getPipelineTest().getPipelineForDatanode(id);
       if (p == null) {
-        FiTestUtil.LOG.info("FI: couldn't find a pipeline for " + id);
         return;
       }
       if (p.contains(index, id)) {

Modified: hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/Pipeline.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/Pipeline.java?rev=1126673&r1=1126672&r2=1126673&view=diff
==============================================================================
--- hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/Pipeline.java (original)
+++ hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/Pipeline.java Mon May
23 19:14:29 2011
@@ -26,13 +26,16 @@ import java.util.ArrayList;
 
 public class Pipeline {
   private final List<String> datanodes = new ArrayList<String>();
-  private DatanodeInfo[] nodes;
 
   Pipeline(LocatedBlock lb) {
     for(DatanodeInfo d : lb.getLocations()) {
       datanodes.add(d.getName());
     }
-    nodes = lb.getLocations();
+  }
+
+  /** Does the pipeline contains d? */
+  public boolean contains(DatanodeID d) {
+    return datanodes.contains(d.getName());
   }
 
   /** Does the pipeline contains d at the n th position? */
@@ -40,12 +43,7 @@ public class Pipeline {
     return d.getName().equals(datanodes.get(n));
   }
 
-  /** Returns DatanodeInfo[] of the nodes of the constructed pipiline*/
-  public DatanodeInfo[] getDataNodes () {
-    return nodes;
-  }
-
-  /** {@inheritDoc} */
+  @Override
   public String toString() {
     return getClass().getSimpleName() + datanodes;
   }

Modified: hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/PipelineTest.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/PipelineTest.java?rev=1126673&r1=1126672&r2=1126673&view=diff
==============================================================================
--- hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/PipelineTest.java (original)
+++ hadoop/hdfs/branches/yahoo-merge/src/test/aop/org/apache/hadoop/fi/PipelineTest.java Mon
May 23 19:14:29 2011
@@ -23,5 +23,5 @@ import org.apache.hadoop.hdfs.protocol.L
 /** A pipeline contains a list of datanodes. */
 public interface PipelineTest {
   public Pipeline initPipeline(LocatedBlock lb);
-  public Pipeline getPipeline(DatanodeID id);
+  public Pipeline getPipelineForDatanode(DatanodeID id);
 }

Propchange: hadoop/hdfs/branches/yahoo-merge/src/test/hdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/test/hdfs:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/test/hdfs:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/test/hdfs:820487
-/hadoop/hdfs/trunk/src/test/hdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/test/hdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/webapps/datanode/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/webapps/datanode:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/webapps/datanode:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/datanode:820487
-/hadoop/hdfs/trunk/src/webapps/datanode:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/webapps/datanode:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/webapps/hdfs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/webapps/hdfs:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/webapps/hdfs:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/hdfs:820487
-/hadoop/hdfs/trunk/src/webapps/hdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/webapps/hdfs:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576

Propchange: hadoop/hdfs/branches/yahoo-merge/src/webapps/secondary/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon May 23 19:14:29 2011
@@ -3,4 +3,4 @@
 /hadoop/hdfs/branches/HDFS-1052/src/webapps/secondary:1078924,1078943,1080331,1080391,1080402,1081603,1082326,1084245,1086788,1090419
 /hadoop/hdfs/branches/HDFS-265/src/webapps/secondary:796829-820463
 /hadoop/hdfs/branches/branch-0.21/src/webapps/secondary:820487
-/hadoop/hdfs/trunk/src/webapps/secondary:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101753,1104395,1104407,1124576
+/hadoop/hdfs/trunk/src/webapps/secondary:987665-1004788,1026178-1028906,1032470-1033639,1034073,1034082-1034181,1034501-1034544,1035386,1035508,1039957,1040005,1049193,1052823,1060619,1061067,1062020,1062045,1062052,1067288,1071518,1074282,1080095,1080380,1080836,1081580,1082263,1083951,1085509,1086654,1087080,1087115,1087437,1090357,1091515,1091619,1091874,1092432,1092507,1092584,1094748,1095245,1095461,1095789,1096846,1097648,1097969,1098781,1098867,1099285,1099640-1099641,1101282,1101293,1101324,1101675,1101753,1104395,1104407,1124576



Mime
View raw message