[ https://issues.apache.org/jira/browse/HDFS-15448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149897#comment-17149897 ]
Xiaoqiao He commented on HDFS-15448: ------------------------------------ Hi [~linyiqun], As [~jianghuazhu] mentioned above, DataNode#runDatanodeDaemon() is invoked by the following three methods, before that corresponding DataNode instance (where has started BPServiceActor thread) has to initialize first, all of them do this in fact. So it is safe to remove starting again in #runDatanodeDaemon IMO. Please correct me if I miss something. Thanks. {code:java} DataNode.createDataNode(String[], Configuration, SecureResources) MiniDFSCluster.startDataNodes(Configuration, int, StorageType[][], boolean, StartupOption, String[], String[], ...) MiniDFSClusterWithNodeGroup.startDataNodes(Configuration, int, StorageType[][], boolean, StartupOption, String[], String[], ...) {code} > When starting a DataNode, call BlockPoolManager#startAll() twice. > ----------------------------------------------------------------- > > Key: HDFS-15448 > URL: https://issues.apache.org/jira/browse/HDFS-15448 > Project: Hadoop HDFS > Issue Type: Improvement > Affects Versions: 3.1.1 > Reporter: jianghua zhu > Assignee: jianghua zhu > Priority: Major > Attachments: HDFS-15448.001.patch, HDFS-15448.002.patch, > method_invoke_path.jpg > > > When starting a DataNode, call BlockPoolManager#startAll() twice. > The first call: > BlockPoolManager#doRefreshNamenodes() > private void doRefreshNamenodes( > Map<String, Map<String, InetSocketAddress>> addrMap, > Map<String, Map<String, InetSocketAddress>> lifelineAddrMap) > throws IOException { > ... > startAll(); > ... > } > The second call: > DataNode#runDatanodeDaemon() > public void runDatanodeDaemon() throws IOException { > blockPoolManager.startAll(); > ... > } -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org