org.apache.hadoop.hdfs.server.datanode.DataNode.register()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.apache.hadoop.hdfs.server.datanode.DataNode.register()方法的一些代码示例,展示了DataNode.register()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataNode.register()方法的具体详情如下:
包路径:org.apache.hadoop.hdfs.server.datanode.DataNode
类名称:DataNode
方法名:register

DataNode.register介绍

[英]Register datanode

The datanode needs to register with the namenode on startup in order 1) to report which storage it is serving now and 2) to receive a registrationID issued by the namenode to recognize registered datanodes.
[中]注册数据节点
datanode需要在启动时向namenode注册,以便1)报告它现在为哪个存储提供服务,2)接收namenode发出的注册ID以识别已注册的datanodes。

代码示例

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

/** Start a single datanode daemon and wait for it to finish.
 *  If this thread is specifically interrupted, it will stop waiting.
 */
public static void runDatanodeDaemon(DataNode dn) throws IOException {
 if (dn != null) {
  //register datanode
  dn.register();
  dn.dataNodeThread = new Thread(dn, dnThreadName);
  dn.dataNodeThread.setDaemon(true); // needed for JUnit testing
  dn.dataNodeThread.start();
 }
}

代码示例来源:origin: io.fabric8/fabric-hadoop

/** Start a single datanode daemon and wait for it to finish.
 *  If this thread is specifically interrupted, it will stop waiting.
 */
public static void runDatanodeDaemon(DataNode dn) throws IOException {
 if (dn != null) {
  //register datanode
  dn.register();
  dn.dataNodeThread = new Thread(dn, dnThreadName);
  dn.dataNodeThread.setDaemon(true); // needed for JUnit testing
  dn.dataNodeThread.start();
 }
}

代码示例来源:origin: io.fabric8/fabric-hadoop

register();

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

register();

相关文章

DataNode类方法