HDFS-9372. Remove dead code in DataStorage.recoverTransitionRead. Contributed by Duo Zhang.
This commit is contained in:
parent
ff47f35dee
commit
efc73d7896
|
@ -1671,6 +1671,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-9308. Add truncateMeta() and deleteMeta() to MiniDFSCluster. (Tony Wu via lei)
|
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
|
BUG FIXES
|
||||||
|
|
||||||
HDFS-7501. TransactionsSinceLastCheckpoint can be negative on SBNs.
|
HDFS-7501. TransactionsSinceLastCheckpoint can be negative on SBNs.
|
||||||
|
|
|
@ -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.common.StorageInfo;
|
||||||
import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage;
|
import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage;
|
||||||
import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
|
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.Daemon;
|
||||||
import org.apache.hadoop.util.DiskChecker;
|
import org.apache.hadoop.util.DiskChecker;
|
||||||
|
|
||||||
|
@ -107,9 +106,6 @@ public class DataStorage extends Storage {
|
||||||
*/
|
*/
|
||||||
private String datanodeUuid = null;
|
private String datanodeUuid = null;
|
||||||
|
|
||||||
// Flag to ensure we only initialize storage once
|
|
||||||
private boolean initialized = false;
|
|
||||||
|
|
||||||
// Maps block pool IDs to block pool storage
|
// Maps block pool IDs to block pool storage
|
||||||
private final Map<String, BlockPoolSliceStorage> bpStorageMap
|
private final Map<String, BlockPoolSliceStorage> bpStorageMap
|
||||||
= Collections.synchronizedMap(new HashMap<String, BlockPoolSliceStorage>());
|
= Collections.synchronizedMap(new HashMap<String, BlockPoolSliceStorage>());
|
||||||
|
@ -462,14 +458,6 @@ public class DataStorage extends Storage {
|
||||||
*/
|
*/
|
||||||
void recoverTransitionRead(DataNode datanode, NamespaceInfo nsInfo,
|
void recoverTransitionRead(DataNode datanode, NamespaceInfo nsInfo,
|
||||||
Collection<StorageLocation> dataDirs, StartupOption startOpt) throws IOException {
|
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()) {
|
if (addStorageLocations(datanode, nsInfo, dataDirs, startOpt).isEmpty()) {
|
||||||
throw new IOException("All specified directories are failed to load.");
|
throw new IOException("All specified directories are failed to load.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue