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 @@ void closeBlock(ExtendedBlock block, String delHint, String storageUuid,
|
|||||||
* If this thread is specifically interrupted, it will stop waiting.
|
* If this thread is specifically interrupted, it will stop waiting.
|
||||||
*/
|
*/
|
||||||
public void runDatanodeDaemon() throws IOException {
|
public void runDatanodeDaemon() throws IOException {
|
||||||
blockPoolManager.startAll();
|
|
||||||
|
// Verify that blockPoolManager has been started.
|
||||||
|
if (!isDatanodeUp()) {
|
||||||
|
throw new IOException("Failed to instantiate DataNode.");
|
||||||
|
}
|
||||||
|
|
||||||
// start dataXceiveServer
|
// start dataXceiveServer
|
||||||
dataXceiverServer.start();
|
dataXceiverServer.start();
|
||||||
|
@ -82,6 +82,17 @@ private void stopBPServiceThreads(int numStopThreads, DataNode dn)
|
|||||||
dn.getBpOsCount());
|
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
|
* Test BPService Thread Exit
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user