org.apache.hadoop.hbase.rest
Class GenericHandler
java.lang.Object
org.apache.hadoop.hbase.rest.GenericHandler
- Direct Known Subclasses:
- MetaHandler, RowHandler, ScannerHandler, TableHandler
public abstract class GenericHandler
- extends Object
GenericHandler contains some basic common stuff that all the individual
REST handler types take advantage of.
Method Summary |
protected void |
doElement(org.znerd.xmlenc.XMLOutputter outputter,
String name,
String value)
|
static void |
doMethodNotAllowed(javax.servlet.http.HttpServletResponse response,
String message)
|
static void |
doNotAcceptable(javax.servlet.http.HttpServletResponse response)
|
static void |
doNotAcceptable(javax.servlet.http.HttpServletResponse response,
String message)
|
static void |
doNotFound(javax.servlet.http.HttpServletResponse response)
|
static void |
doNotFound(javax.servlet.http.HttpServletResponse response,
String msg)
|
protected HTable |
getTable(String tableName)
|
protected String |
getTableName(String[] pathSegments)
|
protected org.znerd.xmlenc.XMLOutputter |
getXMLOutputter(PrintWriter o)
|
protected String |
makeColumnName(String column)
|
protected void |
outputCellXml(org.znerd.xmlenc.XMLOutputter outputter,
Cell c)
|
protected void |
outputColumnsWithMultiVersionsXml(javax.servlet.http.HttpServletRequest request,
org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell[]> m)
|
protected void |
outputColumnsWithMultiVersionsXml(org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell[]> m)
|
protected void |
outputColumnsXml(javax.servlet.http.HttpServletRequest request,
org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell> m)
|
protected void |
outputColumnsXml(org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell> m)
|
static void |
setResponseHeader(javax.servlet.http.HttpServletResponse response,
int status,
String contentType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conf
protected HBaseConfiguration conf
admin
protected HBaseAdmin admin
ACCEPT
protected static final String ACCEPT
- See Also:
- Constant Field Values
COLUMN
protected static final String COLUMN
- See Also:
- Constant Field Values
TIMESTAMP
protected static final String TIMESTAMP
- See Also:
- Constant Field Values
START_ROW
protected static final String START_ROW
- See Also:
- Constant Field Values
END_ROW
protected static final String END_ROW
- See Also:
- Constant Field Values
CONTENT_TYPE
protected static final String CONTENT_TYPE
- See Also:
- Constant Field Values
ROW
protected static final String ROW
- See Also:
- Constant Field Values
REGIONS
protected static final String REGIONS
- See Also:
- Constant Field Values
VERSION
protected static final String VERSION
- See Also:
- Constant Field Values
OFFSET
protected static final String OFFSET
- See Also:
- Constant Field Values
LIMIT
protected static final String LIMIT
- See Also:
- Constant Field Values
LOG
protected final org.apache.commons.logging.Log LOG
GenericHandler
public GenericHandler(HBaseConfiguration conf,
HBaseAdmin admin)
getXMLOutputter
protected org.znerd.xmlenc.XMLOutputter getXMLOutputter(PrintWriter o)
throws IllegalStateException,
IOException
- Throws:
IllegalStateException
IOException
doElement
protected void doElement(org.znerd.xmlenc.XMLOutputter outputter,
String name,
String value)
throws IllegalStateException,
IOException
- Throws:
IllegalStateException
IOException
setResponseHeader
public static void setResponseHeader(javax.servlet.http.HttpServletResponse response,
int status,
String contentType)
doNotAcceptable
public static void doNotAcceptable(javax.servlet.http.HttpServletResponse response)
throws IOException
- Throws:
IOException
doNotAcceptable
public static void doNotAcceptable(javax.servlet.http.HttpServletResponse response,
String message)
throws IOException
- Throws:
IOException
doNotFound
public static void doNotFound(javax.servlet.http.HttpServletResponse response)
throws IOException
- Throws:
IOException
doNotFound
public static void doNotFound(javax.servlet.http.HttpServletResponse response,
String msg)
throws IOException
- Throws:
IOException
doMethodNotAllowed
public static void doMethodNotAllowed(javax.servlet.http.HttpServletResponse response,
String message)
throws IOException
- Throws:
IOException
getTableName
protected String getTableName(String[] pathSegments)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
outputColumnsXml
protected void outputColumnsXml(org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell> m)
throws IllegalStateException,
IllegalArgumentException,
IOException
- Throws:
IllegalStateException
IllegalArgumentException
IOException
outputColumnsXml
protected void outputColumnsXml(javax.servlet.http.HttpServletRequest request,
org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell> m)
throws IllegalStateException,
IllegalArgumentException,
IOException
- Throws:
IllegalStateException
IllegalArgumentException
IOException
outputColumnsWithMultiVersionsXml
protected void outputColumnsWithMultiVersionsXml(org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell[]> m)
throws IllegalStateException,
IllegalArgumentException,
IOException
- Throws:
IllegalStateException
IllegalArgumentException
IOException
outputColumnsWithMultiVersionsXml
protected void outputColumnsWithMultiVersionsXml(javax.servlet.http.HttpServletRequest request,
org.znerd.xmlenc.XMLOutputter outputter,
Map<byte[],Cell[]> m)
throws IllegalStateException,
IllegalArgumentException,
IOException
- Throws:
IllegalStateException
IllegalArgumentException
IOException
outputCellXml
protected void outputCellXml(org.znerd.xmlenc.XMLOutputter outputter,
Cell c)
throws IllegalStateException,
IllegalArgumentException,
IOException
- Throws:
IllegalStateException
IllegalArgumentException
IOException
getTable
protected HTable getTable(String tableName)
throws IOException
- Throws:
IOException
makeColumnName
protected String makeColumnName(String column)
Copyright © 2008 The Apache Software Foundation