|
@@ -109,6 +109,7 @@ import java.io.PrintWriter;
|
|
|
import java.io.StringWriter;
|
|
|
import java.lang.management.ManagementFactory;
|
|
|
import java.net.InetAddress;
|
|
|
+import java.net.InetSocketAddress;
|
|
|
import java.net.URI;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
@@ -534,6 +535,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
*/
|
|
|
private boolean manualSafeMode = false;
|
|
|
private boolean resourceLowSafeMode = false;
|
|
|
+ private String nameNodeHostName = null;
|
|
|
|
|
|
/**
|
|
|
* Notify that loading of this FSDirectory is complete, and
|
|
@@ -1104,6 +1106,9 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
dir.setINodeAttributeProvider(inodeAttributeProvider);
|
|
|
}
|
|
|
snapshotManager.registerMXBean();
|
|
|
+ InetSocketAddress serviceAddress = NameNode.getServiceAddress(conf, true);
|
|
|
+ this.nameNodeHostName = (serviceAddress != null) ?
|
|
|
+ serviceAddress.getHostName() : "";
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1371,7 +1376,7 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|
|
|
|
|
private SafeModeException newSafemodeException(String errorMsg) {
|
|
|
return new SafeModeException(errorMsg + ". Name node is in safe " +
|
|
|
- "mode.\n" + getSafeModeTip());
|
|
|
+ "mode.\n" + getSafeModeTip() + " NamenodeHostName:" + nameNodeHostName);
|
|
|
}
|
|
|
|
|
|
boolean isPermissionEnabled() {
|