Class NameNodeHttpServer
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer
Encapsulates the HTTP server started by the NameNode.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.http.HttpServer2Returns the httpServer.static InetSocketAddressgetNameNodeAddressFromContext(javax.servlet.ServletContext context) static NameNodegetNameNodeFromContext(javax.servlet.ServletContext context) static org.apache.hadoop.ha.HAServiceProtocol.HAServiceStategetNameNodeStateFromContext(javax.servlet.ServletContext context) static TokenVerifiergetTokenVerifierFromContext(javax.servlet.ServletContext context) static voidinitWebHdfs(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.http.HttpServer2 httpServer2, String jerseyResourcePackage) voidjoin()Joins the httpserver.
-
Field Details
-
NAMENODE_ADDRESS_ATTRIBUTE_KEY
- See Also:
-
FSIMAGE_ATTRIBUTE_KEY
- See Also:
-
NAMENODE_ATTRIBUTE_KEY
- See Also:
-
STARTUP_PROGRESS_ATTRIBUTE_KEY
- See Also:
-
ALIASMAP_ATTRIBUTE_KEY
- See Also:
-
-
Method Details
-
initWebHdfs
public static void initWebHdfs(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.http.HttpServer2 httpServer2, String jerseyResourcePackage) throws IOException - Throws:
IOException
-
join
Joins the httpserver.- Throws:
InterruptedException
-
getNameNodeFromContext
-
getTokenVerifierFromContext
-
getNameNodeAddressFromContext
-
getNameNodeStateFromContext
public static org.apache.hadoop.ha.HAServiceProtocol.HAServiceState getNameNodeStateFromContext(javax.servlet.ServletContext context) -
getHttpServer
@VisibleForTesting public org.apache.hadoop.http.HttpServer2 getHttpServer()Returns the httpServer.- Returns:
- HttpServer2
-