HDFS-12605. [READ] TestNameNodeProvidedImplementation#testProvidedDatanodeFailures fails after rebase
This commit is contained in:
parent
17052c4aff
commit
d6a9a89973
@ -489,6 +489,18 @@ void injectStorage(DatanodeStorageInfo s) {
|
||||
synchronized (storageMap) {
|
||||
DatanodeStorageInfo storage = storageMap.get(s.getStorageID());
|
||||
if (null == storage) {
|
||||
LOG.info("Adding new storage ID {} for DN {}", s.getStorageID(),
|
||||
getXferAddr());
|
||||
DFSTopologyNodeImpl parent = null;
|
||||
if (getParent() instanceof DFSTopologyNodeImpl) {
|
||||
parent = (DFSTopologyNodeImpl) getParent();
|
||||
}
|
||||
StorageType type = s.getStorageType();
|
||||
if (!hasStorageType(type) && parent != null) {
|
||||
// we are about to add a type this node currently does not have,
|
||||
// inform the parent that a new type is added to this datanode
|
||||
parent.childAddStorage(getName(), type);
|
||||
}
|
||||
storageMap.put(s.getStorageID(), s);
|
||||
} else {
|
||||
assert storage == s : "found " + storage + " expected " + s;
|
||||
|
@ -481,13 +481,13 @@ public void testProvidedDatanodeFailures() throws Exception {
|
||||
assertEquals(providedDatanode2.getDatanodeUuid(),
|
||||
dnInfos[0].getDatanodeUuid());
|
||||
|
||||
//stop the 2nd provided datanode
|
||||
cluster.stopDataNode(1);
|
||||
// stop the 2nd provided datanode
|
||||
MiniDFSCluster.DataNodeProperties providedDNProperties2 =
|
||||
cluster.stopDataNode(0);
|
||||
// make NameNode detect that datanode is down
|
||||
BlockManagerTestUtil.noticeDeadDatanode(
|
||||
cluster.getNameNode(),
|
||||
providedDatanode2.getDatanodeId().getXferAddr());
|
||||
|
||||
getAndCheckBlockLocations(client, filename, 0);
|
||||
|
||||
//restart the provided datanode
|
||||
|
Loading…
Reference in New Issue
Block a user