Guest
Seltsame Hostnamen der HDFS -Knoten
Post
by Guest » 09 Feb 2025, 08:29
Warum Hadoop-Knoten einen Knotennamen wie diesen hatte: IZIB208XFVBHMYX1RHA3GQZ auf einem Alicloud Ecs < /p>
Code: Select all
[root@worker1 hadoop-3.4.1]# hdfs namenode -format
2025-01-23 10:13:46,887 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = iZib208xfvbhmyx1rha3gqZ/10.1.0.92
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 3.4.1
[root@worker1 javademo]# hostname
worker1
[root@worker1 javademo]# hostname -A
worker1.cluster.local worker1 worker1 worker1 worker1 worker1
# I think I've configured hostname for the hdfs namenode correctly.
hdfs getconf -namenodes # worker1
< /code>
Der relevante Ausschnitt von Hadoop 3.4.1 zeigt eine widersprüchliche Sache < /p>
public static String createStartupShutdownMessage(String classname,
String hostname, String[] args) {
return toStartupShutdownString("STARTUP_MSG: ", new String[] {
"Starting " + classname,
" host = " + hostname,
" args = " + (args != null ? Arrays.asList(args) : new ArrayList()),
" version = " + VersionInfo.getVersion(),
" classpath = " + System.getProperty("java.class.path"),
" build = " + VersionInfo.getUrl() + " -r "
+ VersionInfo.getRevision()
+ "; compiled by '" + VersionInfo.getUser()
+ "' on " + VersionInfo.getDate(),
" java = " + System.getProperty("java.version") }
);
}
protected static String startupShutdownMessage(String classname,
List args) {
final String hostname = NetUtils.getHostname();
return StringUtils.createStartupShutdownMessage(classname, hostname,
args.toArray(new String[args.size()]));
}
public static String getHostname() {
try {return "" + InetAddress.getLocalHost();} // import java.net.InetAddress;
catch(UnknownHostException uhe) {return "" + uhe;}
}
Ich gehe davon aus>
1739086141
Guest
Warum Hadoop-Knoten einen Knotennamen wie diesen hatte: IZIB208XFVBHMYX1RHA3GQZ auf einem Alicloud Ecs < /p> [code][root@worker1 hadoop-3.4.1]# hdfs namenode -format 2025-01-23 10:13:46,887 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: host = iZib208xfvbhmyx1rha3gqZ/10.1.0.92 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 3.4.1 [root@worker1 javademo]# hostname worker1 [root@worker1 javademo]# hostname -A worker1.cluster.local worker1 worker1 worker1 worker1 worker1 # I think I've configured hostname for the hdfs namenode correctly. hdfs getconf -namenodes # worker1 < /code> Der relevante Ausschnitt von Hadoop 3.4.1 zeigt eine widersprüchliche Sache < /p> public static String createStartupShutdownMessage(String classname, String hostname, String[] args) { return toStartupShutdownString("STARTUP_MSG: ", new String[] { "Starting " + classname, " host = " + hostname, " args = " + (args != null ? Arrays.asList(args) : new ArrayList()), " version = " + VersionInfo.getVersion(), " classpath = " + System.getProperty("java.class.path"), " build = " + VersionInfo.getUrl() + " -r " + VersionInfo.getRevision() + "; compiled by '" + VersionInfo.getUser() + "' on " + VersionInfo.getDate(), " java = " + System.getProperty("java.version") } ); } protected static String startupShutdownMessage(String classname, List args) { final String hostname = NetUtils.getHostname(); return StringUtils.createStartupShutdownMessage(classname, hostname, args.toArray(new String[args.size()])); } public static String getHostname() { try {return "" + InetAddress.getLocalHost();} // import java.net.InetAddress; catch(UnknownHostException uhe) {return "" + uhe;} } [/code] Ich gehe davon aus>