本文整理了Java中org.apache.hadoop.hdfs.server.datanode.DataNode.getNameNodeAddr()
方法的一些代码示例,展示了DataNode.getNameNodeAddr()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DataNode.getNameNodeAddr()
方法的具体详情如下:
包路径:org.apache.hadoop.hdfs.server.datanode.DataNode
类名称:DataNode
方法名:getNameNodeAddr
[英]This method returns the address namenode uses to communicate with datanodes. If this address is not configured the default NameNode address is used, as it is running only one RPC server. If it is running multiple servers this address cannot be used by clients!!
[中]此方法返回namenode用于与datanodes通信的地址。如果未配置此地址,将使用默认的NameNode地址,因为它只运行一个RPC服务器。如果它运行多台服务器,则客户端无法使用此地址!!
代码示例来源:origin: io.fabric8/fabric-hadoop
private void notifyNamenode(int dpCode, String msg) {
//inform NameNode
try {
namenode.errorReport(
dnRegistration, dpCode, msg);
} catch( SocketTimeoutException e ) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
} catch(IOException ignored) {
}
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
break;
} catch(SocketTimeoutException e) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
try {
Thread.sleep(1000);
DatanodeProtocol.NOTIFY, errorMsg );
} catch( SocketTimeoutException e ) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
public JspHelper() {
if (DataNode.getDataNode() != null) {
nameNodeAddr = DataNode.getDataNode().getNameNodeAddr();
}
else {
fsn = FSNamesystem.getFSNamesystem();
nameNodeAddr = new InetSocketAddress(fsn.getDFSNameNodeMachine(),
fsn.getDFSNameNodePort());
}
UnixUserGroupInformation.saveToConf(conf,
UnixUserGroupInformation.UGI_PROPERTY_NAME, webUGI);
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
} catch(SocketTimeoutException e) { // namenode is busy
DataNode.LOG.info("Problem connecting to server: "
+ dataNode.getNameNodeAddr());
代码示例来源:origin: io.fabric8/fabric-hadoop
break;
} catch(SocketTimeoutException e) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
try {
Thread.sleep(1000);
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
break;
} catch(SocketTimeoutException e) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
try {
Thread.sleep(1000);
代码示例来源:origin: io.fabric8/fabric-hadoop
break;
} catch(SocketTimeoutException e) { // namenode is busy
LOG.info("Problem connecting to server: " + getNameNodeAddr());
try {
Thread.sleep(1000);
内容来源于网络,如有侵权,请联系作者删除!