hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject hadoop git commit: HDFS-9372. Remove dead code in DataStorage.recoverTransitionRead. Contributed by Duo Zhang.
Date Thu, 05 Nov 2015 18:01:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 37abd0e33 -> aa03030e4


HDFS-9372. Remove dead code in DataStorage.recoverTransitionRead. Contributed by Duo Zhang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/aa03030e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/aa03030e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/aa03030e

Branch: refs/heads/branch-2
Commit: aa03030e4a81ae75746391fbd2d3fc26ae5dd45c
Parents: 37abd0e
Author: Haohui Mai <wheat9@apache.org>
Authored: Thu Nov 5 10:00:01 2015 -0800
Committer: Haohui Mai <wheat9@apache.org>
Committed: Thu Nov 5 10:00:18 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt             |  3 +++
 .../apache/hadoop/hdfs/server/datanode/DataStorage.java | 12 ------------
 2 files changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/aa03030e/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index d3073a9..1f9fdbf 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -821,6 +821,9 @@ Release 2.8.0 - UNRELEASED
 
     HDFS-9308. Add truncateMeta() and deleteMeta() to MiniDFSCluster. (Tony Wu via lei)
 
+    HDFS-9372. Remove dead code in DataStorage.recoverTransitionRead.
+    (Duo Zhang via wheat9)
+
   BUG FIXES
 
     HDFS-8091: ACLStatus and XAttributes should be presented to

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aa03030e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
index 8b8c6c5..707f1a5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataStorage.java
@@ -44,7 +44,6 @@ import org.apache.hadoop.hdfs.server.common.Storage;
 import org.apache.hadoop.hdfs.server.common.StorageInfo;
 import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage;
 import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
-import org.apache.hadoop.io.nativeio.NativeIO;
 import org.apache.hadoop.util.Daemon;
 import org.apache.hadoop.util.DiskChecker;
 
@@ -106,9 +105,6 @@ public class DataStorage extends Storage {
    *  versions of Datanodes we cannot make this field a UUID.
    */
   private String datanodeUuid = null;
-
-  // Flag to ensure we only initialize storage once
-  private boolean initialized = false;
   
   // Maps block pool IDs to block pool storage
   private final Map<String, BlockPoolSliceStorage> bpStorageMap
@@ -462,14 +458,6 @@ public class DataStorage extends Storage {
    */
   void recoverTransitionRead(DataNode datanode, NamespaceInfo nsInfo,
       Collection<StorageLocation> dataDirs, StartupOption startOpt) throws IOException
{
-    if (this.initialized) {
-      LOG.info("DataNode version: " + HdfsServerConstants.DATANODE_LAYOUT_VERSION
-          + " and NameNode layout version: " + nsInfo.getLayoutVersion());
-      this.storageDirs = new ArrayList<StorageDirectory>(dataDirs.size());
-      // mark DN storage is initialized
-      this.initialized = true;
-    }
-
     if (addStorageLocations(datanode, nsInfo, dataDirs, startOpt).isEmpty()) {
       throw new IOException("All specified directories are failed to load.");
     }


Mime
View raw message