@InterfaceAudience.Private public class ListPathsServlet extends javax.servlet.http.HttpServlet
HftpFileSystem,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static ThreadLocal<SimpleDateFormat> |
df |
| Constructor and Description |
|---|
ListPathsServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,String> |
buildRoot(javax.servlet.http.HttpServletRequest request,
org.znerd.xmlenc.XMLOutputter doc)
Build a map from the query string, setting values and defaults.
|
protected ClientProtocol |
createNameNodeProxy()
Create a
NameNode proxy from the current ServletContext. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service a GET request as described below.
|
protected UserGroupInformation |
getUGI(javax.servlet.http.HttpServletRequest request,
Configuration conf) |
protected void |
writeXml(Exception except,
String path,
org.znerd.xmlenc.XMLOutputter doc)
Write the object to XML format
|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static final ThreadLocal<SimpleDateFormat> df
protected Map<String,String> buildRoot(javax.servlet.http.HttpServletRequest request, org.znerd.xmlenc.XMLOutputter doc)
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
GET http://<nn>:<port>/listPaths[/<path>][<?option>[&option]*] HTTP/1.1
Where option (default) in:
recursive ("no")
filter (".*")
exclude ("\..*\.crc")
Response: A flat list of files/directories in the following format:
<listing path="..." recursive="(yes|no)" filter="..."
time="yyyy-MM-dd hh:mm:ss UTC" version="...">
<directory path="..." modified="yyyy-MM-dd hh:mm:ss"/>
<file path="..." modified="yyyy-MM-dd'T'hh:mm:ssZ" accesstime="yyyy-MM-dd'T'hh:mm:ssZ"
blocksize="..."
replication="..." size="..."/>
</listing>
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void writeXml(Exception except, String path, org.znerd.xmlenc.XMLOutputter doc) throws IOException
IOExceptionprotected ClientProtocol createNameNodeProxy() throws IOException
NameNode proxy from the current ServletContext.IOExceptionprotected UserGroupInformation getUGI(javax.servlet.http.HttpServletRequest request, Configuration conf) throws IOException
IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.