|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.server.common.JspHelper
@InterfaceAudience.Private public class JspHelper
Field Summary | |
---|---|
static String |
CURRENT_CONF
|
static String |
DELEGATION_PARAMETER_NAME
|
static String |
WEB_UGI_PROPERTY_NAME
|
Method Summary | |
---|---|
static void |
addTableFooter(javax.servlet.jsp.JspWriter out)
|
static void |
addTableHeader(javax.servlet.jsp.JspWriter out)
|
static void |
addTableRow(javax.servlet.jsp.JspWriter out,
String[] columns)
|
static void |
addTableRow(javax.servlet.jsp.JspWriter out,
String[] columns,
int row)
|
static DatanodeInfo |
bestNode(DatanodeInfo[] nodes,
boolean doRandom)
|
static DatanodeInfo |
bestNode(LocatedBlock blk)
|
static DatanodeInfo |
bestNode(LocatedBlocks blks)
|
static void |
createTitle(javax.servlet.jsp.JspWriter out,
javax.servlet.http.HttpServletRequest req,
String file)
|
static org.apache.hadoop.security.UserGroupInformation |
getDefaultWebUser(org.apache.hadoop.conf.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 org.apache.hadoop.security.UserGroupInformation |
getUGI(javax.servlet.http.HttpServletRequest request,
org.apache.hadoop.conf.Configuration conf)
Get UserGroupInformation and possibly the delegation token out of
the request. |
static String |
getUrlParam(String name,
String val)
Returns the url parameter for the given string, prefixed with '&'. |
static String |
getUrlParam(String name,
String val,
boolean firstParam)
Returns the url parameter for the given string, prefixed with '?' if firstParam is true, prefixed with '&' if firstParam is false. |
static String |
getUrlParam(String name,
String val,
String paramSeparator)
Returns the url parameter for the given string, prefixed with paramSeparator. |
static String |
getVersionTable()
Return a table containing version information. |
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)
|
static void |
sortNodeList(ArrayList<DatanodeDescriptor> nodes,
String field,
String order)
|
static void |
streamBlockInAscii(InetSocketAddress addr,
long blockId,
org.apache.hadoop.security.token.Token<BlockTokenIdentifier> blockToken,
long genStamp,
long blockSize,
long offsetIntoBlock,
long chunkSizeToView,
javax.servlet.jsp.JspWriter out,
org.apache.hadoop.conf.Configuration conf)
|
static int |
string2ChunkSizeToView(String s,
int defaultValue)
Convert a String to chunk-size-to-view. |
static Long |
validateLong(String value)
Validate a long value. |
static String |
validatePath(String p)
Validate filename. |
static String |
validateURL(String value)
Validate a URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CURRENT_CONF
public static final String WEB_UGI_PROPERTY_NAME
public static final String DELEGATION_PARAMETER_NAME
Method Detail |
---|
public static DatanodeInfo bestNode(LocatedBlocks blks) throws IOException
IOException
public static DatanodeInfo bestNode(LocatedBlock blk) throws IOException
IOException
public static DatanodeInfo bestNode(DatanodeInfo[] nodes, boolean doRandom) throws IOException
IOException
public static void streamBlockInAscii(InetSocketAddress addr, long blockId, org.apache.hadoop.security.token.Token<BlockTokenIdentifier> blockToken, long genStamp, long blockSize, long offsetIntoBlock, long chunkSizeToView, javax.servlet.jsp.JspWriter out, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static void addTableHeader(javax.servlet.jsp.JspWriter out) throws IOException
IOException
public static void addTableRow(javax.servlet.jsp.JspWriter out, String[] columns) throws IOException
IOException
public static void addTableRow(javax.servlet.jsp.JspWriter out, String[] columns, int row) throws IOException
IOException
public static void addTableFooter(javax.servlet.jsp.JspWriter out) throws IOException
IOException
public static 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 int string2ChunkSizeToView(String s, int defaultValue)
public static String getVersionTable()
public static String validatePath(String p)
public static Long validateLong(String value)
public static String validateURL(String value)
public static org.apache.hadoop.security.UserGroupInformation getDefaultWebUser(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- the configuration to look in
IOException
public static org.apache.hadoop.security.UserGroupInformation getUGI(javax.servlet.http.HttpServletRequest request, org.apache.hadoop.conf.Configuration conf) throws IOException
UserGroupInformation
and possibly the delegation token out of
the request.
request
- the http request
org.apache.hadoop.security.AccessControlException
- if the request has no token
IOException
public static String getDelegationTokenUrlParam(String tokenString)
tokenString
-
public static String getUrlParam(String name, String val, String paramSeparator)
name
- parameter nameval
- parameter valueparamSeparator
- URL parameter prefix, i.e. either '?' or '&'
public static String getUrlParam(String name, String val, boolean firstParam)
name
- parameter nameval
- parameter valuefirstParam
- true if this is the first parameter in the list, false otherwise
public static String getUrlParam(String name, String val)
name
- parameter nameval
- parameter value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |