hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1076081 - in /hadoop/hdfs/branches/HDFS-1052: ./ src/java/org/apache/hadoop/hdfs/server/namenode/ src/test/hdfs/org/apache/hadoop/hdfs/ src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/ src/test/hdfs/org/apache/hadoop/hdfs/server/namen...
Date Wed, 02 Mar 2011 01:43:50 GMT
Author: suresh
Date: Wed Mar  2 01:43:49 2011
New Revision: 1076081

URL: http://svn.apache.org/viewvc?rev=1076081&view=rev
Log:
HDFS-1678. Federation: Remove unnecessary #getBlockpool() for NameNodeMXBean in FSNameSystem.
Contributed by Tanping Wang.


Modified:
    hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
    hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestPipelines.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestMulitipleNNDataBlockScanner.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
    hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestOverReplicatedBlocks.java

Modified: hadoop/hdfs/branches/HDFS-1052/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/CHANGES.txt?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/CHANGES.txt (original)
+++ hadoop/hdfs/branches/HDFS-1052/CHANGES.txt Wed Mar  2 01:43:49 2011
@@ -120,6 +120,9 @@ Trunk (unreleased changes)
     HDFS-1677. Federation: Fix TestFsck and TestListCorruptFileBlocks 
     failures. (Tanping via suresh)
 
+    HDFS-1678. Federation: Remove unnecessary #getBlockpool() 
+    for NameNodeMXBean in FSNameSystem. (Tanping via Suresh)
+
   IMPROVEMENTS
 
     HDFS-1510. Added test-patch.properties required by test-patch.sh (nigel)

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Wed Mar  2 01:43:49 2011
@@ -537,7 +537,7 @@ public class FSNamesystem implements FSC
   NamespaceInfo getNamespaceInfo() {
     NamespaceInfo nsinfo = new NamespaceInfo(dir.fsImage.getNamespaceID(),
                              getClusterId(),
-                             getBlockpoolId(),
+                             getBlockPoolId(),
                              dir.fsImage.getCTime(),
                              getDistributedUpgradeVersion());
     return nsinfo;
@@ -5296,10 +5296,6 @@ public class FSNamesystem implements FSC
   }
   
   @Override  // NameNodeMXBean
-  public String getBlockpoolId() {
-    return dir.fsImage.getBlockPoolID();
-  }
-  
   public String getBlockPoolId() {
     return blockPoolId;
   }

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeMXBean.java
Wed Mar  2 01:43:49 2011
@@ -158,5 +158,5 @@ public interface NameNodeMXBean {
    * 
    * @return the block pool id
    */
-  public String getBlockpoolId();
+  public String getBlockPoolId();
 }

Modified: hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
Wed Mar  2 01:43:49 2011
@@ -134,7 +134,7 @@ class NamenodeJspHelper {
         + getUpgradeStatusText(fsn) 
         + "\n  <tr><td id='col1'>Cluster ID:</td><td>" + fsn.getClusterId()
         + "</td></tr>\n" 
-        + "\n  <tr><td id='col1'>Block Pool ID:</td><td>" + fsn.getBlockpoolId()
+        + "\n  <tr><td id='col1'>Block Pool ID:</td><td>" + fsn.getBlockPoolId()
         + "</td></tr>\n" 
         + "\n</table></div>";
   }

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestDataTransferProtocol.java
Wed Mar  2 01:43:49 2011
@@ -195,7 +195,7 @@ public class TestDataTransferProtocol ex
     MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(numDataNodes).build();
     try {
       cluster.waitActive();
-      String poolId = cluster.getNamesystem().getBlockpoolId(); 
+      String poolId = cluster.getNamesystem().getBlockPoolId(); 
       datanode = TestDatanodeUtils.getDNRegistrationForBP(
           cluster.getDataNodes().get(0), poolId);
       dnAddr = NetUtils.createSocketAddr(datanode.getName());

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestHftpFileSystem.java
Wed Mar  2 01:43:49 2011
@@ -70,7 +70,7 @@ public class TestHftpFileSystem extends 
 
     cluster = new MiniDFSCluster.Builder(config).numDataNodes(2).build();
     hdfs = cluster.getFileSystem();
-    blockPoolId = cluster.getNamesystem().getBlockpoolId();
+    blockPoolId = cluster.getNamesystem().getBlockPoolId();
     final String hftpuri = 
       "hftp://" + config.get(DFSConfigKeys.DFS_NAMENODE_HTTP_ADDRESS_KEY);
     hftpFs = (HftpFileSystem) new Path(hftpuri).getFileSystem(config);

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestPipelines.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestPipelines.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestPipelines.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/TestPipelines.java
Wed Mar  2 01:43:49 2011
@@ -104,7 +104,7 @@ public class TestPipelines {
       filePath.toString(), FILE_SIZE - 1, FILE_SIZE).getLocatedBlocks();
 
     String bpid = cluster.getNamesystem().getBlockPoolId();
-    Replica r = DataNodeAdapter.fetchReplicaInfo(cluster.getDataNodes().get(0),
+    Replica r = DataNodeAdapter.fetchReplicaInfo(cluster.getDataNodes().get(1),
         bpid, lb.get(0).getBlock().getBlockId());
     assertTrue("Replica shouldn'e be null", r != null);
     assertEquals(

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestMulitipleNNDataBlockScanner.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestMulitipleNNDataBlockScanner.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestMulitipleNNDataBlockScanner.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/datanode/TestMulitipleNNDataBlockScanner.java
Wed Mar  2 01:43:49 2011
@@ -50,7 +50,7 @@ public class TestMulitipleNNDataBlockSca
       cluster.waitActive(i);
     }
     for (int i = 0; i < 3; i++) {
-      bpids[i] = cluster.getNamesystem(i).getBlockpoolId();
+      bpids[i] = cluster.getNamesystem(i).getBlockPoolId();
     }
     for (int i = 0; i < 3; i++) {
       fs[i] = cluster.getFileSystem(i);
@@ -93,7 +93,7 @@ public class TestMulitipleNNDataBlockSca
       Configuration conf = new HdfsConfiguration();
       StringBuilder namenodesBuilder = new StringBuilder();
 
-      String bpidToShutdown = cluster.getNamesystem(2).getBlockpoolId();
+      String bpidToShutdown = cluster.getNamesystem(2).getBlockPoolId();
       for (int i = 0; i < 2; i++) {
         FileSystem fs = cluster.getFileSystem(i);
         namenodesBuilder.append(fs.getUri());

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestHeartbeatHandling.java
Wed Mar  2 01:43:49 2011
@@ -50,7 +50,7 @@ public class TestHeartbeatHandling exten
     try {
       cluster.waitActive();
       final FSNamesystem namesystem = cluster.getNamesystem();
-      final String poolId = namesystem.getBlockpoolId();
+      final String poolId = namesystem.getBlockPoolId();
       final DatanodeRegistration nodeReg = 
         TestDatanodeUtils.getDNRegistrationForBP(cluster.getDataNodes().get(0), poolId);
         

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestListCorruptFileBlocks.java
Wed Mar  2 01:43:49 2011
@@ -70,7 +70,7 @@ public class TestListCorruptFileBlocks e
           + " corrupt files. Expecting None.", badFiles.size() == 0);
 
       // Now deliberately corrupt one block
-      String bpid = cluster.getNamesystem().getBlockpoolId();
+      String bpid = cluster.getNamesystem().getBlockPoolId();
       File storageDir = MiniDFSCluster.getStorageDir(0, 1);
       File data_dir = MiniDFSCluster.getFinalizedDir(storageDir, bpid);
       assertTrue("data directory does not exist", data_dir.exists());

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java
Wed Mar  2 01:43:49 2011
@@ -49,9 +49,10 @@ public class TestNameNodeMXBean {
       // get attribute "ClusterId"
       String clusterId = (String) mbs.getAttribute(mxbeanName, "ClusterId");
       Assert.assertEquals(fsn.getClusterId(), clusterId);
-      // get attribute "BlockpoolId"
-      String blockpoolId = (String) mbs.getAttribute(mxbeanName, "BlockpoolId");
-      Assert.assertEquals(fsn.getBlockpoolId(), blockpoolId);
+      // get attribute "BlockPoolId"
+      String blockpoolId = (String) mbs.getAttribute(mxbeanName, 
+          "BlockPoolId");
+      Assert.assertEquals(fsn.getBlockPoolId(), blockpoolId);
       // get attribute "Version"
       String version = (String) mbs.getAttribute(mxbeanName, "Version");
       Assert.assertEquals(fsn.getVersion(), version);

Modified: hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestOverReplicatedBlocks.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestOverReplicatedBlocks.java?rev=1076081&r1=1076080&r2=1076081&view=diff
==============================================================================
--- hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestOverReplicatedBlocks.java
(original)
+++ hadoop/hdfs/branches/HDFS-1052/src/test/hdfs/org/apache/hadoop/hdfs/server/namenode/TestOverReplicatedBlocks.java
Wed Mar  2 01:43:49 2011
@@ -78,7 +78,7 @@ public class TestOverReplicatedBlocks ex
       cluster.restartDataNode(dnProps);
       DFSTestUtil.waitReplication(fs, fileName, (short)2);
       
-      String blockPoolId = cluster.getNamesystem().getBlockpoolId();
+      String blockPoolId = cluster.getNamesystem().getBlockPoolId();
       final DatanodeID corruptDataNode = 
         TestDatanodeUtils.getDNRegistrationForBP(
             cluster.getDataNodes().get(2), blockPoolId);



Mime
View raw message