|
@@ -154,7 +154,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
|
|
|
|
@@ -236,7 +236,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn0.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn0.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
|
|
|
|
@@ -278,7 +278,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
DatanodeCommand dnCmd =
|
|
DatanodeCommand dnCmd =
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
@@ -332,7 +332,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
printStats();
|
|
printStats();
|
|
@@ -368,7 +368,7 @@ public class TestBlockReport {
|
|
int randIndex = rand.nextInt(blocks.size());
|
|
int randIndex = rand.nextInt(blocks.size());
|
|
// Get a block and screw its GS
|
|
// Get a block and screw its GS
|
|
Block corruptedBlock = blocks.get(randIndex);
|
|
Block corruptedBlock = blocks.get(randIndex);
|
|
- String secondNode = cluster.getDataNodes().get(DN_N1).getStorageId();
|
|
|
|
|
|
+ String secondNode = cluster.getDataNodes().get(DN_N1).getDatanodeUuid();
|
|
if(LOG.isDebugEnabled()) {
|
|
if(LOG.isDebugEnabled()) {
|
|
LOG.debug("Working with " + secondNode);
|
|
LOG.debug("Working with " + secondNode);
|
|
LOG.debug("BlockGS before " + blocks.get(randIndex).getGenerationStamp());
|
|
LOG.debug("BlockGS before " + blocks.get(randIndex).getGenerationStamp());
|
|
@@ -383,7 +383,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
printStats();
|
|
printStats();
|
|
@@ -407,7 +407,7 @@ public class TestBlockReport {
|
|
}
|
|
}
|
|
|
|
|
|
report[0] = new StorageBlockReport(
|
|
report[0] = new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs());
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs());
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
printStats();
|
|
printStats();
|
|
@@ -459,7 +459,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
printStats();
|
|
printStats();
|
|
@@ -507,7 +507,7 @@ public class TestBlockReport {
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
String poolId = cluster.getNamesystem().getBlockPoolId();
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
DatanodeRegistration dnR = dn.getDNRegistrationForBP(poolId);
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
StorageBlockReport[] report = { new StorageBlockReport(
|
|
- new DatanodeStorage(dnR.getStorageID()),
|
|
|
|
|
|
+ new DatanodeStorage(dnR.getDatanodeUuid()),
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
new BlockListAsLongs(blocks, null).getBlockListAsLongs()) };
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
cluster.getNameNodeRpc().blockReport(dnR, poolId, report);
|
|
printStats();
|
|
printStats();
|