src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/HadoopWebServerMain.java
@VisibleForTesting
  public void init(
      ApplicationConfiguration conf,
      GSet<INode, INodeWithAdditionalFields> inodes,
      Configuration preloadedHadoopConf)
      throws Exception {
    // Initialize classes needed for NNA.
    SecurityContext securityContext = loadSecurityContext(conf);
    UsageMetrics usageMetrics = new UsageMetrics();

    // Start NameNodeAnalytics HTTP server.
    nnaHttpServer =
        new NameNodeAnalyticsHttpServer(
            preloadedHadoopConf,
            conf,
            getHttpServerBindAddress(conf),
            securityContext,
            nameNodeLoader,
            hsqlDriver,
            usageMetrics,
            runningQueries,
            runningOperations,
            internalService,
            operationService,
            queryLock,
            savingNamespace,
            cancelRequest);
    nnaHttpServer.start();

    // Bootstrap classes.
    nameNodeLoader.load(inodes, preloadedHadoopConf, conf);
    nameNodeLoader.initHistoryRecorder(hsqlDriver, conf, conf.getHistoricalEnabled());
    nameNodeLoader.initReloadThreads(internalService, conf);
  }
/**
   * Main method of initializing an NNA instance. Web server will start first. Then INodes will
   * load.
   *
   * @param conf the application configuration
   * @param inodes preloaded inodes (used by tests)
   * @param preloadedHadoopConf preloaded hadoop configuration (used by tests)
   * @throws Exception errors here will crash NNA
   */
Main method of initializing an NNA instance. Web server will start first. Then INodes will
load.

@param conf the application configuration
@param inodes preloaded inodes (used by tests)
@param preloadedHadoopConf preloaded hadoop configuration (used by tests)
@throws Exception errors here will crash NNA
Main method of initializing an NNA instance . Web server will start first . Then INodes will load . @param conf the application configuration @param inodes preloaded inodes ( used by tests ) @param preloadedHadoopConf preloaded hadoop configuration ( used by tests ) @throws Exception errors here will crash NNA
@VisibleForTesting
  public void init(
      ApplicationConfiguration conf,
      GSet<INode, INodeWithAdditionalFields> inodes,
      Configuration preloadedHadoopConf)
      throws Exception {
    SecurityContext securityContext = loadSecurityContext(conf);
    UsageMetrics usageMetrics = new UsageMetrics();
    nnaHttpServer =
        new NameNodeAnalyticsHttpServer(
            preloadedHadoopConf,
            conf,
            getHttpServerBindAddress(conf),
            securityContext,
            nameNodeLoader,
            hsqlDriver,
            usageMetrics,
            runningQueries,
            runningOperations,
            internalService,
            operationService,
            queryLock,
            savingNamespace,
            cancelRequest);
    nnaHttpServer.start();
    nameNodeLoader.load(inodes, preloadedHadoopConf, conf);
    nameNodeLoader.initHistoryRecorder(hsqlDriver, conf, conf.getHistoricalEnabled());
    nameNodeLoader.initReloadThreads(internalService, conf);
  }
@ VisibleForTesting public void init ( ApplicationConfiguration conf , GSet < INode , INodeWithAdditionalFields > inodes , Configuration preloadedHadoopConf ) throws Exception { SecurityContext securityContext = loadSecurityContext ( conf ) ; UsageMetrics usageMetrics = new UsageMetrics ( ) ; nnaHttpServer = new NameNodeAnalyticsHttpServer ( preloadedHadoopConf , conf , getHttpServerBindAddress ( conf ) , securityContext , nameNodeLoader , hsqlDriver , usageMetrics , runningQueries , runningOperations , internalService , operationService , queryLock , savingNamespace , cancelRequest ) ; nnaHttpServer . start ( ) ; nameNodeLoader . load ( inodes , preloadedHadoopConf , conf ) ; nameNodeLoader . initHistoryRecorder ( hsqlDriver , conf , conf . getHistoricalEnabled ( ) ) ; nameNodeLoader . initReloadThreads ( internalService , conf ) ; }
Main method of initializing an NNA instance.
Main method of initializing an NNA instance .
// Initialize classes needed for NNA. // Start NameNodeAnalytics HTTP server. // Bootstrap classes.