Search in sources :

Example 1 with DatanodeHttpServer

use of org.apache.hadoop.hdfs.server.datanode.web.DatanodeHttpServer in project hadoop by apache.

the class DataNode method startInfoServer.

/**
   * @see DFSUtil#getHttpPolicy(org.apache.hadoop.conf.Configuration)
   * for information related to the different configuration options and
   * Http Policy is decided.
   */
private void startInfoServer() throws IOException {
    // SecureDataNodeStarter will bind the privileged port to the channel if
    // the DN is started by JSVC, pass it along.
    ServerSocketChannel httpServerChannel = secureResources != null ? secureResources.getHttpServerChannel() : null;
    httpServer = new DatanodeHttpServer(getConf(), this, httpServerChannel);
    httpServer.start();
    if (httpServer.getHttpAddress() != null) {
        infoPort = httpServer.getHttpAddress().getPort();
    }
    if (httpServer.getHttpsAddress() != null) {
        infoSecurePort = httpServer.getHttpsAddress().getPort();
    }
}
Also used : ServerSocketChannel(java.nio.channels.ServerSocketChannel) DatanodeHttpServer(org.apache.hadoop.hdfs.server.datanode.web.DatanodeHttpServer)

Aggregations

ServerSocketChannel (java.nio.channels.ServerSocketChannel)1 DatanodeHttpServer (org.apache.hadoop.hdfs.server.datanode.web.DatanodeHttpServer)1