Class WebImageViewer
java.lang.Object
org.apache.hadoop.hdfs.tools.offlineImageViewer.WebImageViewer
- All Implemented Interfaces:
Closeable,AutoCloseable
WebImageViewer loads a fsimage and exposes read-only WebHDFS API for its
namespace.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWebImageViewer(InetSocketAddress address) WebImageViewer(InetSocketAddress address, org.apache.hadoop.conf.Configuration conf) -
Method Summary
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
WebImageViewer
-
WebImageViewer
-
-
Method Details
-
start
Start WebImageViewer and wait until the thread is interrupted.- Parameters:
fsimage- the fsimage to load.- Throws:
IOException- if failed to load the fsimage.RuntimeException- if security is enabled in configuration.
-
initServer
Start WebImageViewer.- Parameters:
fsimage- the fsimage to load.- Throws:
IOException- if fail to load the fsimage.InterruptedException
-
getPort
@VisibleForTesting public int getPort()Get the listening port.- Returns:
- the port WebImageViewer is listening on
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-