Bläddra i källkod

HDFS-1439. HDFS Federation: Fix compilation error in TestFiHftp. Contributed by Suresh Srinivas.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/branches/HDFS-1052@1004439 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 15 år sedan
förälder
incheckning
253c25f894
2 ändrade filer med 7 tillägg och 5 borttagningar
  1. 4 2
      CHANGES.txt
  2. 3 3
      src/test/aop/org/apache/hadoop/hdfs/TestFiHftp.java

+ 4 - 2
CHANGES.txt

@@ -37,7 +37,7 @@ Trunk (unreleased changes)
 
     HDFS-1361. Add -fileStatus operation to NNThroughputBenchmark. (shv)
 
-    HDFS-1365.HDFS federation: propose ClusterID and BlockPoolID format 
+    HDFS-1365. HDFS federation: propose ClusterID and BlockPoolID format 
     (tanping via boryas)
 
     HDFS-1394. modify -format option for namenode to generated new blockpool id 
@@ -290,7 +290,7 @@ Trunk (unreleased changes)
     HDFS-1357. HFTP traffic served by DataNode shouldn't use service port 
     on NameNode. (Kan Zhang via jghoman)
 
-    HDFS-1419. Federation: Three test cases need minor modification after 
+    HDFS-1419. HDFS Federation: Three test cases need minor modification after 
     the new block id change (Tanping Wang via suresh)
 
     HDFS-96. HDFS supports blocks larger than 2 GB.
@@ -343,6 +343,8 @@ Trunk (unreleased changes)
     error message on the screen when cat a directory or a 
     non-existent file. (hairong)
 
+    HDFS-1439. HDFS Federation: Fix compilation error in TestFiHftp. (suresh)
+
   NEW FEATURES
 
     HDFS-1134. Large-scale Automated Framework. (cos)

+ 3 - 3
src/test/aop/org/apache/hadoop/hdfs/TestFiHftp.java

@@ -31,7 +31,7 @@ import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hdfs.protocol.Block;
+import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
 import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
 import org.apache.hadoop.hdfs.protocol.LocatedBlock;
 import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
@@ -154,14 +154,14 @@ public class TestFiHftp {
     Assert.assertEquals((filesize - 1)/blocksize + 1,
         locatedblocks.locatedBlockCount());
     final LocatedBlock lb = locatedblocks.get(1);
-    final Block blk = lb.getBlock();
+    final ExtendedBlock blk = lb.getBlock();
     Assert.assertEquals(blocksize, lb.getBlockSize());
     final DatanodeInfo[] datanodeinfos = lb.getLocations();
     Assert.assertEquals(DATANODE_NUM, datanodeinfos.length);
     final DataNode dn = cluster.getDataNode(datanodeinfos[0].getIpcPort());
     LOG.info("dn=" + dn + ", blk=" + blk + " (length=" + blk.getNumBytes() + ")");
     final FSDataset data = (FSDataset)dn.getFSDataset();
-    final File blkfile = data.getBlockFile(blk);
+    final File blkfile = data.getBlockFile(blk.getLocalBlock());
     Assert.assertTrue(blkfile.delete());
 
     //read again by hftp, should get an exception