HDFS-7936. Erasure coding: resolving conflicts when merging with HDFS-7903, HDFS-7435, HDFS-7930, HDFS-7960 (this commit is for HDFS-7960)
This commit is contained in:
parent
d0d75a8339
commit
ea2e60fbcc
|
@ -1996,10 +1996,10 @@ public class BlockManager {
|
|||
"longer exists on the DataNode.",
|
||||
Long.toHexString(context.getReportId()), zombie.getStorageID());
|
||||
assert(namesystem.hasWriteLock());
|
||||
Iterator<BlockInfoContiguous> iter = zombie.getBlockIterator();
|
||||
Iterator<BlockInfo> iter = zombie.getBlockIterator();
|
||||
int prevBlocks = zombie.numBlocks();
|
||||
while (iter.hasNext()) {
|
||||
BlockInfoContiguous block = iter.next();
|
||||
BlockInfo block = iter.next();
|
||||
// We assume that a block can be on only one storage in a DataNode.
|
||||
// That's why we pass in the DatanodeDescriptor rather than the
|
||||
// DatanodeStorageInfo.
|
||||
|
|
|
@ -185,9 +185,12 @@ public class TestNameNodePrunesMissingStorages {
|
|||
String datanodeUuid;
|
||||
// Find the first storage which this block is in.
|
||||
try {
|
||||
BlockInfo storedBlock =
|
||||
cluster.getNamesystem().getBlockManager().
|
||||
getStoredBlock(block.getLocalBlock());
|
||||
Iterator<DatanodeStorageInfo> storageInfoIter =
|
||||
cluster.getNamesystem().getBlockManager().
|
||||
getStorages(block.getLocalBlock()).iterator();
|
||||
blocksMap.getStorages(storedBlock).iterator();
|
||||
assertTrue(storageInfoIter.hasNext());
|
||||
DatanodeStorageInfo info = storageInfoIter.next();
|
||||
storageIdToRemove = info.getStorageID();
|
||||
|
|
|
@ -269,7 +269,7 @@ public class TestAddStripedBlocks {
|
|||
StorageBlockReport[] reports = {new StorageBlockReport(storage,
|
||||
bll)};
|
||||
cluster.getNameNodeRpc().blockReport(dn.getDNRegistrationForBP(bpId),
|
||||
bpId, reports);
|
||||
bpId, reports, null);
|
||||
}
|
||||
|
||||
BlockInfoStripedUnderConstruction ucBlock =
|
||||
|
|
Loading…
Reference in New Issue