List of usage examples for org.apache.hadoop.net DNS getDefaultHost
public static String getDefaultHost(@Nullable String strInterface) throws UnknownHostException
From source file:org.goldenorb.OrbPartitionManager.java
License:Apache License
/** * Constructor// w w w . j ava2 s . com * * @param OrbConfiguration conf * @param Class<M> clazz */ public OrbPartitionManager(OrbConfiguration conf, Class<M> clazz) { this.conf = conf; this.processClass = clazz; try { ipAddress = DNS.getDefaultHost(this.conf.getOrbLauncherNetworkDevice()); if (ipAddress.endsWith(".")) { ipAddress = ipAddress.substring(0, ipAddress.length() - 1); } logger.debug("setting ipAddress to " + ipAddress); } catch (UnknownHostException e) { logger.error(e.getMessage()); } }