public class JspHelper extends Object
限定符和类型 | 字段和说明 |
---|---|
static String |
CURRENT_CONF |
static String |
DELEGATION_PARAMETER_NAME |
static InetSocketAddress |
nameNodeAddr |
static String |
WEB_UGI_PROPERTY_NAME |
构造器和说明 |
---|
JspHelper() |
限定符和类型 | 方法和说明 |
---|---|
void |
addTableFooter(javax.servlet.jsp.JspWriter out) |
void |
addTableHeader(javax.servlet.jsp.JspWriter out) |
void |
addTableRow(javax.servlet.jsp.JspWriter out,
String[] columns) |
void |
addTableRow(javax.servlet.jsp.JspWriter out,
String[] columns,
int row) |
static DatanodeInfo |
bestNode(LocatedBlock blk) |
static void |
createTitle(javax.servlet.jsp.JspWriter out,
javax.servlet.http.HttpServletRequest req,
String file) |
void |
DFSNodesStatus(ArrayList<DatanodeDescriptor> live,
ArrayList<DatanodeDescriptor> dead) |
static int |
getDefaultChunkSize(Configuration conf)
Get the default chunk size.
|
static UserGroupInformation |
getDefaultWebUser(Configuration conf)
If security is turned off, what is the default web user?
|
static String |
getDelegationTokenUrlParam(String tokenString)
Returns the url parameter for the given token string.
|
static DFSClient |
getDFSClient(UserGroupInformation user,
InetSocketAddress addr,
Configuration conf) |
String |
getInodeLimitText() |
String |
getSafeModeText() |
static UserGroupInformation |
getUGI(javax.servlet.http.HttpServletRequest request,
Configuration conf)
Same as getUGI(null, request, conf).
|
static UserGroupInformation |
getUGI(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
Configuration conf)
Get
UserGroupInformation and possibly the delegation token out of
the request. |
static UserGroupInformation |
getUGI(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
Configuration conf,
UserGroupInformation.AuthenticationMethod secureAuthMethod,
boolean tryUgiParameter)
Get
UserGroupInformation and possibly the delegation token out of
the request. |
String |
getUpgradeStatusText() |
static String |
getVersionTable()
Return a table containing version information.
|
static String |
getWarningText(FSNamesystem fsn) |
static void |
printGotoForm(javax.servlet.jsp.JspWriter out,
int namenodeInfoPort,
String tokenString,
String file) |
static void |
printPathWithLinks(String dir,
javax.servlet.jsp.JspWriter out,
int namenodeInfoPort,
String tokenString) |
DatanodeID |
randomNode() |
void |
sortNodeList(ArrayList<DatanodeDescriptor> nodes,
String field,
String order) |
void |
streamBlockInAscii(InetSocketAddress addr,
long blockId,
Token<BlockTokenIdentifier> accessToken,
long genStamp,
long blockSize,
long offsetIntoBlock,
long chunkSizeToView,
javax.servlet.jsp.JspWriter out,
Configuration conf) |
static int |
string2ChunkSizeToView(String s,
int defaultValue)
Convert a String to chunk-size-to-view.
|
public static InetSocketAddress nameNodeAddr
public DatanodeID randomNode() throws IOException
IOException
public static DatanodeInfo bestNode(LocatedBlock blk) throws IOException
IOException
public void streamBlockInAscii(InetSocketAddress addr, long blockId, Token<BlockTokenIdentifier> accessToken, long genStamp, long blockSize, long offsetIntoBlock, long chunkSizeToView, javax.servlet.jsp.JspWriter out, Configuration conf) throws IOException
IOException
public void DFSNodesStatus(ArrayList<DatanodeDescriptor> live, ArrayList<DatanodeDescriptor> dead)
public void addTableHeader(javax.servlet.jsp.JspWriter out) throws IOException
IOException
public void addTableRow(javax.servlet.jsp.JspWriter out, String[] columns) throws IOException
IOException
public void addTableRow(javax.servlet.jsp.JspWriter out, String[] columns, int row) throws IOException
IOException
public void addTableFooter(javax.servlet.jsp.JspWriter out) throws IOException
IOException
public String getSafeModeText()
public static String getWarningText(FSNamesystem fsn)
public String getInodeLimitText()
public String getUpgradeStatusText()
public void sortNodeList(ArrayList<DatanodeDescriptor> nodes, String field, String order)
public static void printPathWithLinks(String dir, javax.servlet.jsp.JspWriter out, int namenodeInfoPort, String tokenString) throws IOException
IOException
public static void printGotoForm(javax.servlet.jsp.JspWriter out, int namenodeInfoPort, String tokenString, String file) throws IOException
IOException
public static void createTitle(javax.servlet.jsp.JspWriter out, javax.servlet.http.HttpServletRequest req, String file) throws IOException
IOException
public static UserGroupInformation getDefaultWebUser(Configuration conf) throws IOException
conf
- the configuration to look inIOException
public static UserGroupInformation getUGI(javax.servlet.http.HttpServletRequest request, Configuration conf) throws IOException
IOException
public static UserGroupInformation getUGI(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, Configuration conf) throws IOException
UserGroupInformation
and possibly the delegation token out of
the request.context
- the Servlet contextrequest
- the http requestconf
- configurationAccessControlException
- if the request has no tokenIOException
public static UserGroupInformation getUGI(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, Configuration conf, UserGroupInformation.AuthenticationMethod secureAuthMethod, boolean tryUgiParameter) throws IOException
UserGroupInformation
and possibly the delegation token out of
the request.context
- the Servlet contextrequest
- the http requestconf
- configurationsecureAuthMethod
- the AuthenticationMethod used in secure mode.tryUgiParameter
- Should it try the ugi parameter?AccessControlException
- if the request has no tokenIOException
public static DFSClient getDFSClient(UserGroupInformation user, InetSocketAddress addr, Configuration conf) throws IOException, InterruptedException
public static String getDelegationTokenUrlParam(String tokenString)
tokenString
- public static int string2ChunkSizeToView(String s, int defaultValue)
public static int getDefaultChunkSize(Configuration conf)
conf
- the configurationpublic static String getVersionTable()
Copyright © 2009 The Apache Software Foundation