Only works as root and should only be called by the HostsEdit RMI Server

@param hostName
@throws Exception
185543
public static void disableHost(String hostName) throws Exception {
        changeHost(hostName, false, true, false, false, false);
    }
1344189
@Override
    public Server addServer(String serverName, String hostAddress, int port) throws Exception {
        return addServer(serverName, hostAddress, port, IpChannelType.SCTP, false, 0, null);
    }
728421
public void initialize(
            final int clusterIndex,
            final long siteId,
            final int partitionId,
            final int sitesPerHost,
            final int hostId,
            final String hostname,
            final int drClusterId,
            final int defaultDrBufferSize,
            final long tempTableMemory,
            final HashinatorConfig hashinatorConfig,
            final boolean createDrReplicatedStream,
            final long exportFlushTimeout)
    {
        synchronized(printLockObject) {
            System.out.println("Initializing an IPC EE " + this + " for hostId " + hostId + " siteId " + siteId + " from thread " + Thread.currentThread().getId());
        }
        int result = ExecutionEngine.ERRORCODE_ERROR;
        m_data.clear();
        m_data.putInt(Commands.Initialize.m_id);
        m_data.putInt(clusterIndex);
        m_data.putLong(siteId);
        m_data.putInt(partitionId);
        m_data.putInt(sitesPerHost);
        m_data.putInt(hostId);
        m_data.putInt(drClusterId);
        m_data.putInt(defaultDrBufferSize);
        m_data.putLong(EELoggers.getLogLevels());
        m_data.putLong(tempTableMemory);
        m_data.putInt(createDrReplicatedStream ? 1 : 0);
        m_data.putInt((short)hostname.length());
        m_data.put(hostname.getBytes(Charsets.UTF_8));
        try {
            m_data.flip();
            m_connection.write();
            result = m_connection.readStatusByte();
        } catch (final IOException e) {
            System.out.println("Exception: " + e.getMessage());
            throw new RuntimeException(e);
        }
        checkErrorCode(result);
        updateHashinator(hashinatorConfig);
    }
958231
def set_hostname(self, hostname):
        
        self.oem_init()
        try:
            return self._oem.set_hostname(hostname)
        except exc.UnsupportedFunctionality:
            return self.set_mci(hostname)
1113214
public final void flushAll(String host)
      throws TimeoutException, InterruptedException, MemcachedException {
    this.flushAll(AddrUtil.getOneAddress(host), this.opTimeout);
  }
882248
@Override
	public synchronized void removeHost(Host host) {

        if( log.isDebugEnabled() )
            log.debug("Removing host[" + host.getName() + "]");

        // Is this Host actually among those that are defined?
        boolean found = false;
        for (int i = 0; i < engines.length; i++) {
            Container hosts[] = engines[i].findChildren();
            for (int j = 0; j < hosts.length; j++) {
                if (host == (Host) hosts[j]) {
                    found = true;
                    break;

                }
            }
            if (found)
                break;
        }
        if (!found)
            return;

        // Remove this Host from the associated Engine
        if( log.isDebugEnabled() )
            log.debug(" Removing this Host");
        host.getParent().removeChild(host);

    }
291081
public void setServerName(String serverName) {
    if (serverName == null || serverName.equals("")) {
      this.serverName = "localhost";
    } else {
      this.serverName = serverName;
    }
  }
619728
public void removeHostName(String hostName) {
		if(logger.isDebugEnabled()) {
			logger.debug("Removing hostname "+ hostName);
		}
		hostNames.remove(hostName);
		if(dnsServerLocator != null) {
			dnsServerLocator.removeLocalHostName(hostName);
		}
	}
11772
public static void setJVMProxy(String host, String port) {
		System.setProperty(JVM_PROXY_HOST_PROPERTY, host);
		System.setProperty(JVM_PROXY_PORT_PROPERTY, port);
	}
496206
@Activate
    protected void activate(Map<String, Object> properties) throws Exception {
        this.host = (String) properties.get("host");
        Integer iiopPort = (Integer) properties.get("iiopPort");
        this.iiopPort = iiopPort == null ? -1 : iiopPort;

        iiopsOptions = Nester.nest("iiopsOptions", properties);
    }
51643
private void setUp() throws Exception {
    try {
      fileSystem = (DistributedFileSystem) FileSystem.get(
          StorageServiceConfigKeys.translateToOldSchema(conf, nameserviceId), conf);
      InetSocketAddress nameNodeAddr = fileSystem.getClient().getNameNodeAddr();
      metaInfo = new RequestMetaInfo(clusterId, nameserviceId, RequestMetaInfo.NO_NAMESPACE_ID,
          RequestMetaInfo.NO_APPLICATION_ID, (UnixUserGroupInformation) UserGroupInformation.getUGI(
          this.conf));

      directClientProtocol = RPC.getProxy(ClientProtocol.class, ClientProtocol.versionID,
          nameNodeAddr, conf);

      directClientProxyProtocol = RPC.getProxy(ClientProxyProtocol.class,
          ClientProxyProtocol.versionID, nameNodeAddr, conf);

      clientManager = new ThriftClientManager();
      FramedClientConnector connector = new FramedClientConnector(HostAndPort.fromParts(
          proxyHostname, proxyPortThrift));
      proxyTClientProxyProtocol = clientManager.createClient(connector, TClientProxyProtocol.class)
          .get();

      proxyClientProxyProtocol = RPC.getProxy(ClientProxyProtocol.class,
          ClientProxyProtocol.versionID, new InetSocketAddress(proxyHostname, proxyPortRPC), conf);

      fileSystem.mkdirs(new Path(ROOT));
    } catch (Exception e) {
      tearDown();
      throw e;
    }
  }
1265369
protected void save(String fileName) throws Exception {
	    configuration.save(new File(fileName));
		if (isNewState()) {
		    model.moveSessionDb(fileName);
		} else {
		    if (!this.fileName.equals(fileName)) {
		        // copy file to new fileName
		        model.copySessionDb(this.fileName, fileName);
		    }
		}
	    this.fileName = fileName;
		
    	if (! Constant.isLowMemoryOptionSet()) {
			synchronized (siteTree) {
			    saveSiteTree(siteTree.getRoot());
			}
    	}
		
		model.getDb().getTableSession().update(getSessionId(), getSessionName());
	}
1200905
public void connect(String hostName, int port) throws UnknownHostException, IOException {
        if (!sslHelper.isSocketAvailable()) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                Tr.event(tc, "creating/recreating socket connection to " + hostName + ":" + port);

            SSLSocket socket = sslHelper.createSocket(hostName, port);
            in = new BufferedInputStream(socket.getInputStream());
            out = new BufferedOutputStream(socket.getOutputStream());

            // seqNumber must only be reset to 1 when connection is initialized (as in this case)
            seqNumber = 1;

            // new connection - reset lastUsedTime
            lastUsedTime = System.currentTimeMillis();
        }
    }
1358697
public void init(String host, String defaultPrefixString, boolean debug) throws Exception {

        try {

            initInternal(host, defaultPrefixString, debug);

            LOGGER.debug("ZookeeperMgr init.");

        } catch (Exception e) {

            throw new Exception("zookeeper init failed. ", e);
        }
    }
778946
public function addServer(string $hostname, Server $server)
    {
        if (isset($this->servers[$hostname])) {
            throw ClusterException::serverHostnameDuplicate($hostname);
        }

        $this->servers[$hostname] = $server;
    }
1275504
public static void removeDnsCache(String host) {
        try {
            InetAddressCacheUtil.removeInetAddressCache(host);
        } catch (Exception e) {
            final String message = String.format("Fail to removeDnsCache for host %s, cause: %s", host, e.toString());
            throw new DnsCacheManipulatorException(message, e);
        }
    }
1339323
public static function parse(string $hostname): HostnameInterface
    {
        if (!self::myParse($hostname, $domainParts, $tld, $error)) {
            throw new HostnameInvalidArgumentException($error);
        }

        return new self($domainParts, $tld);
    }