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:
Zhe Zhang 2015-03-24 11:39:36 -07:00 committed by Zhe Zhang
parent d0d75a8339
commit ea2e60fbcc
3 changed files with 7 additions and 4 deletions

View File

@ -1996,10 +1996,10 @@ private void removeZombieReplicas(BlockReportContext context,
"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.

View File

@ -185,9 +185,12 @@ public void testRemovingStorageDoesNotProduceZombies() throws Exception {
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();

View File

@ -269,7 +269,7 @@ public void testAddUCReplica() throws Exception {
StorageBlockReport[] reports = {new StorageBlockReport(storage,
bll)};
cluster.getNameNodeRpc().blockReport(dn.getDNRegistrationForBP(bpId),
bpId, reports);
bpId, reports, null);
}
BlockInfoStripedUnderConstruction ucBlock =