src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/web/NamenodeAnalyticsMethods.java
@GET
  @Path("/reloadNamespace")
  @Produces({MediaType.TEXT_PLAIN})
  public Response reloadNamespace() {
    final NameNodeLoader nnLoader = (NameNodeLoader) context.getAttribute(NNA_NN_LOADER);
    final ReentrantReadWriteLock queryLock =
        (ReentrantReadWriteLock) context.getAttribute(NNA_QUERY_LOCK);
    final ApplicationConfiguration conf =
        (ApplicationConfiguration) context.getAttribute(NNA_APP_CONF);
    try {
      before();
      queryLock.writeLock().lock();
      StringWriter writer = new StringWriter();
      try {
        nnLoader.clear(true);
        nnLoader.load(null, null, conf);
        writer.write("Reload complete.");
      } catch (Throwable e) {
        writer.write("Reload failed: " + e);
      } finally {
        queryLock.writeLock().unlock();
      }
      return Response.ok(writer.toString(), MediaType.TEXT_PLAIN).build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
/**
   * RELOADNAMESPACE endpoint is an admin-level endpoint meant to clear the current in-memory INode
   * set and reload it from the latest FSImage found in the NNA instance's configured namespace
   * directory.
   */
RELOADNAMESPACE endpoint is an admin-level endpoint meant to clear the current in-memory INode
set and reload it from the latest FSImage found in the NNA instance's configured namespace
directory.
RELOADNAMESPACE endpoint is an admin - level endpoint meant to clear the current in - memory INode set and reload it from the latest FSImage found in the NNA instance ' s configured namespace directory .
@GET
  @Path("/reloadNamespace")
  @Produces({MediaType.TEXT_PLAIN})
  public Response reloadNamespace() {
    final NameNodeLoader nnLoader = (NameNodeLoader) context.getAttribute(NNA_NN_LOADER);
    final ReentrantReadWriteLock queryLock =
        (ReentrantReadWriteLock) context.getAttribute(NNA_QUERY_LOCK);
    final ApplicationConfiguration conf =
        (ApplicationConfiguration) context.getAttribute(NNA_APP_CONF);
    try {
      before();
      queryLock.writeLock().lock();
      StringWriter writer = new StringWriter();
      try {
        nnLoader.clear(true);
        nnLoader.load(null, null, conf);
        writer.write("Reload complete.");
      } catch (Throwable e) {
        writer.write("Reload failed: " + e);
      } finally {
        queryLock.writeLock().unlock();
      }
      return Response.ok(writer.toString(), MediaType.TEXT_PLAIN).build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
@ GET @ Path ( "/reloadNamespace" ) @ Produces ( { MediaType . TEXT_PLAIN } ) public Response reloadNamespace ( ) { final NameNodeLoader nnLoader = ( NameNodeLoader ) context . getAttribute ( NNA_NN_LOADER ) ; final ReentrantReadWriteLock queryLock = ( ReentrantReadWriteLock ) context . getAttribute ( NNA_QUERY_LOCK ) ; final ApplicationConfiguration conf = ( ApplicationConfiguration ) context . getAttribute ( NNA_APP_CONF ) ; try { before ( ) ; queryLock . writeLock ( ) . lock ( ) ; StringWriter writer = new StringWriter ( ) ; try { nnLoader . clear ( true ) ; nnLoader . load ( null , null , conf ) ; writer . write ( "Reload complete." ) ; } catch ( Throwable e ) { writer . write ( "Reload failed: " + e ) ; } finally { queryLock . writeLock ( ) . unlock ( ) ; } return Response . ok ( writer . toString ( ) , MediaType . TEXT_PLAIN ) . build ( ) ; } catch ( Exception ex ) { return handleException ( ex ) ; } finally { after ( ) ; } }
RELOADNAMESPACE endpoint is an admin-level endpoint meant to clear the current in-memory INode
 set and reload it from the latest FSImage found in the NNA instance's configured namespace
 directory.
RELOADNAMESPACE endpoint is an admin - level endpoint meant to clear the current in - memory INode set and reload it from the latest FSImage found in the NNA instance ' s configured namespace directory .