|
@@ -713,12 +713,12 @@ public class TestBlockManager {
|
|
reset(node);
|
|
reset(node);
|
|
|
|
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
- BlockListAsLongs.EMPTY, null, false);
|
|
|
|
|
|
+ BlockListAsLongs.EMPTY, null);
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
// send block report again, should NOT be processed
|
|
// send block report again, should NOT be processed
|
|
reset(node);
|
|
reset(node);
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
- BlockListAsLongs.EMPTY, null, false);
|
|
|
|
|
|
+ BlockListAsLongs.EMPTY, null);
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
|
|
|
|
// re-register as if node restarted, should update existing node
|
|
// re-register as if node restarted, should update existing node
|
|
@@ -729,7 +729,7 @@ public class TestBlockManager {
|
|
// send block report, should be processed after restart
|
|
// send block report, should be processed after restart
|
|
reset(node);
|
|
reset(node);
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
- BlockListAsLongs.EMPTY, null, false);
|
|
|
|
|
|
+ BlockListAsLongs.EMPTY, null);
|
|
// Reinitialize as registration with empty storage list pruned
|
|
// Reinitialize as registration with empty storage list pruned
|
|
// node.storageMap.
|
|
// node.storageMap.
|
|
ds = node.getStorageInfos()[0];
|
|
ds = node.getStorageInfos()[0];
|
|
@@ -758,7 +758,7 @@ public class TestBlockManager {
|
|
reset(node);
|
|
reset(node);
|
|
doReturn(1).when(node).numBlocks();
|
|
doReturn(1).when(node).numBlocks();
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
- BlockListAsLongs.EMPTY, null, false);
|
|
|
|
|
|
+ BlockListAsLongs.EMPTY, null);
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -832,7 +832,7 @@ public class TestBlockManager {
|
|
assertEquals(0, ds.getBlockReportCount());
|
|
assertEquals(0, ds.getBlockReportCount());
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
builder.build(),
|
|
builder.build(),
|
|
- new BlockReportContext(1, 0, System.nanoTime(), 0, true), false);
|
|
|
|
|
|
+ new BlockReportContext(1, 0, System.nanoTime(), 0, true));
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
|
|
|
|
// verify the storage info is correct
|
|
// verify the storage info is correct
|
|
@@ -871,8 +871,7 @@ public class TestBlockManager {
|
|
assertEquals(0, ds.getBlockReportCount());
|
|
assertEquals(0, ds.getBlockReportCount());
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
generateReport(blocks),
|
|
generateReport(blocks),
|
|
- new BlockReportContext(1, 0, System.nanoTime(), 0, false),
|
|
|
|
- false);
|
|
|
|
|
|
+ new BlockReportContext(1, 0, System.nanoTime(), 0, false));
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
assertEquals(1, ds.getBlockReportCount());
|
|
// verify the storage info is correct
|
|
// verify the storage info is correct
|
|
for (BlockInfo block : blocks) {
|
|
for (BlockInfo block : blocks) {
|
|
@@ -882,8 +881,7 @@ public class TestBlockManager {
|
|
// Send unsorted report
|
|
// Send unsorted report
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
generateReport(blocks),
|
|
generateReport(blocks),
|
|
- new BlockReportContext(1, 0, System.nanoTime(), 0, false),
|
|
|
|
- false);
|
|
|
|
|
|
+ new BlockReportContext(1, 0, System.nanoTime(), 0, false));
|
|
assertEquals(2, ds.getBlockReportCount());
|
|
assertEquals(2, ds.getBlockReportCount());
|
|
// verify the storage info is correct
|
|
// verify the storage info is correct
|
|
for (BlockInfo block : blocks) {
|
|
for (BlockInfo block : blocks) {
|
|
@@ -894,8 +892,7 @@ public class TestBlockManager {
|
|
Collections.sort(blocks);
|
|
Collections.sort(blocks);
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
bm.processReport(node, new DatanodeStorage(ds.getStorageID()),
|
|
generateReport(blocks),
|
|
generateReport(blocks),
|
|
- new BlockReportContext(1, 0, System.nanoTime(), 0, true),
|
|
|
|
- false);
|
|
|
|
|
|
+ new BlockReportContext(1, 0, System.nanoTime(), 0, true));
|
|
assertEquals(3, ds.getBlockReportCount());
|
|
assertEquals(3, ds.getBlockReportCount());
|
|
// verify the storage info is correct
|
|
// verify the storage info is correct
|
|
for (BlockInfo block : blocks) {
|
|
for (BlockInfo block : blocks) {
|