public class FileDataServlet
extends javax.servlet.http.HttpServlet
HftpFileSystem
,
序列化表格构造器和说明 |
---|
FileDataServlet() |
限定符和类型 | 方法和说明 |
---|---|
protected ClientProtocol |
createNameNodeProxy()
Create a
NameNode proxy from the current ServletContext . |
protected URI |
createRedirectUri(String servletpath,
UserGroupInformation ugi,
DatanodeID host,
javax.servlet.http.HttpServletRequest request,
String tokenString)
Create a URI for redirecting request
|
protected URI |
createUri(String parent,
HdfsFileStatus i,
UserGroupInformation ugi,
ClientProtocol nnproxy,
javax.servlet.http.HttpServletRequest request,
String dt)
Create a redirection URI
|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service a GET request as described below.
|
protected String |
getFilename(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get filename from the request
|
protected UserGroupInformation |
getUGI(javax.servlet.http.HttpServletRequest request,
Configuration conf)
Get
UserGroupInformation from request
* @throws IOException |
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, service
protected URI createUri(String parent, HdfsFileStatus i, UserGroupInformation ugi, ClientProtocol nnproxy, javax.servlet.http.HttpServletRequest request, String dt) throws IOException, URISyntaxException
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
GET http://<nn>:<port>/data[/<path>] HTTP/1.1
doGet
在类中 javax.servlet.http.HttpServlet
IOException
protected void writeXml(Exception except, String path, org.znerd.xmlenc.XMLOutputter doc) throws IOException
IOException
protected UserGroupInformation getUGI(javax.servlet.http.HttpServletRequest request, Configuration conf) throws IOException
UserGroupInformation
from request
* @throws IOExceptionIOException
protected ClientProtocol createNameNodeProxy() throws IOException
NameNode
proxy from the current ServletContext
.IOException
protected URI createRedirectUri(String servletpath, UserGroupInformation ugi, DatanodeID host, javax.servlet.http.HttpServletRequest request, String tokenString) throws URISyntaxException
protected String getFilename(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
IOException
Copyright © 2009 The Apache Software Foundation