org.apache.hadoop.hdfs.tools.offlineImageViewer
Class WebImageViewer

java.lang.Object
  extended by org.apache.hadoop.hdfs.tools.offlineImageViewer.WebImageViewer

public class WebImageViewer
extends Object

WebImageViewer loads a fsimage and exposes read-only WebHDFS API for its namespace.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
WebImageViewer(InetSocketAddress address)
           
 
Method Summary
 int getPort()
          Get the listening port.
 void initServer(String fsimage)
          Start WebImageViewer.
 void initServerAndWait(String fsimage)
          Start WebImageViewer and wait until the thread is interrupted.
 void shutdown()
          Stop WebImageViewer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

WebImageViewer

public WebImageViewer(InetSocketAddress address)
Method Detail

initServerAndWait

public void initServerAndWait(String fsimage)
                       throws IOException
Start WebImageViewer and wait until the thread is interrupted.

Parameters:
fsimage - the fsimage to load.
Throws:
IOException - if failed to load the fsimage.

initServer

public void initServer(String fsimage)
                throws IOException
Start WebImageViewer.

Parameters:
fsimage - the fsimage to load.
Throws:
IOException - if fail to load the fsimage.

shutdown

public void shutdown()
Stop WebImageViewer.


getPort

public int getPort()
Get the listening port.

Returns:
the port WebImageViewer is listening on


Copyright © 2014 Apache Software Foundation. All Rights Reserved.