HDFS-15448. Remove duplicate BlockPoolManager starting when run DataNode. Contriubted by jianghua zhu.
This commit is contained in:
parent
960fb0aa4f
commit
a7830423c5
|
@ -2710,7 +2710,11 @@ public class DataNode extends ReconfigurableBase
|
|||
* If this thread is specifically interrupted, it will stop waiting.
|
||||
*/
|
||||
public void runDatanodeDaemon() throws IOException {
|
||||
blockPoolManager.startAll();
|
||||
|
||||
// Verify that blockPoolManager has been started.
|
||||
if (!isDatanodeUp()) {
|
||||
throw new IOException("Failed to instantiate DataNode.");
|
||||
}
|
||||
|
||||
// start dataXceiveServer
|
||||
dataXceiverServer.start();
|
||||
|
|
|
@ -82,6 +82,17 @@ public class TestDataNodeExit {
|
|||
dn.getBpOsCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBPServiceState() {
|
||||
List<DataNode> dataNodes = cluster.getDataNodes();
|
||||
for (DataNode dataNode : dataNodes) {
|
||||
List<BPOfferService> bposList = dataNode.getAllBpOs();
|
||||
for (BPOfferService bpOfferService : bposList) {
|
||||
assertTrue(bpOfferService.isAlive());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test BPService Thread Exit
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue