|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.rest.model.ScannerModel
public class ScannerModel
A representation of Scanner parameters.
<complexType name="Scanner"> <sequence> <element name="column" type="base64Binary" minOccurs="0" maxOccurs="unbounded"/> </sequence> <element name="filter" type="string" minOccurs="0" maxOccurs="1"></element> <attribute name="startRow" type="base64Binary"></attribute> <attribute name="endRow" type="base64Binary"></attribute> <attribute name="batch" type="int"></attribute> <attribute name="startTime" type="int"></attribute> <attribute name="endTime" type="int"></attribute> <attribute name="maxVersions" type="int"></attribute> </complexType>
Constructor Summary | |
---|---|
ScannerModel()
Default constructor |
|
ScannerModel(byte[] startRow,
byte[] endRow,
List<byte[]> columns,
int batch,
long endTime,
int maxVersions,
String filter)
Constructor |
|
ScannerModel(byte[] startRow,
byte[] endRow,
List<byte[]> columns,
int batch,
long startTime,
long endTime,
String filter)
Constructor |
Method Summary | |
---|---|
void |
addColumn(byte[] column)
Add a column to the column set |
static Filter |
buildFilter(String s)
|
byte[] |
createProtobufOutput()
|
static ScannerModel |
fromScan(Scan scan)
|
int |
getBatch()
|
List<byte[]> |
getColumns()
|
byte[] |
getEndRow()
|
long |
getEndTime()
|
String |
getFilter()
|
int |
getMaxVersions()
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation. |
byte[] |
getStartRow()
|
long |
getStartTime()
|
boolean |
hasEndRow()
|
boolean |
hasStartRow()
|
void |
setBatch(int batch)
|
void |
setColumns(List<byte[]> columns)
|
void |
setEndRow(byte[] endRow)
|
void |
setEndTime(long endTime)
|
void |
setFilter(String filter)
|
void |
setMaxVersions(int maxVersions)
|
void |
setStartRow(byte[] startRow)
|
void |
setStartTime(long startTime)
|
static String |
stringifyFilter(Filter filter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScannerModel()
public ScannerModel(byte[] startRow, byte[] endRow, List<byte[]> columns, int batch, long endTime, int maxVersions, String filter)
startRow
- the start key of the row-rangeendRow
- the end key of the row-rangecolumns
- the columns to scanbatch
- the number of values to return in batchendTime
- the upper bound on timestamps of values of interestmaxVersions
- the maximum number of versions to returnfilter
- a filter specification
(values with timestamps later than this are excluded)public ScannerModel(byte[] startRow, byte[] endRow, List<byte[]> columns, int batch, long startTime, long endTime, String filter)
startRow
- the start key of the row-rangeendRow
- the end key of the row-rangecolumns
- the columns to scanbatch
- the number of values to return in batchstartTime
- the lower bound on timestamps of values of interest
(values with timestamps earlier than this are excluded)endTime
- the upper bound on timestamps of values of interest
(values with timestamps later than this are excluded)filter
- a filter specificationMethod Detail |
---|
public static Filter buildFilter(String s) throws Exception
s
- the JSON representation of the filter
Exception
public static String stringifyFilter(Filter filter) throws Exception
filter
- the filter
Exception
public static ScannerModel fromScan(Scan scan) throws Exception
scan
- the scan specification
Exception
public void addColumn(byte[] column)
column
- the column name, as <column>(:<qualifier>)?public boolean hasStartRow()
public byte[] getStartRow()
public boolean hasEndRow()
public byte[] getEndRow()
public List<byte[]> getColumns()
public int getBatch()
public long getStartTime()
public long getEndTime()
public int getMaxVersions()
public String getFilter()
public void setStartRow(byte[] startRow)
startRow
- start rowpublic void setEndRow(byte[] endRow)
endRow
- end rowpublic void setColumns(List<byte[]> columns)
columns
- list of columns of interest in column:qualifier format, or empty for allpublic void setBatch(int batch)
batch
- the number of cells to return in batchpublic void setMaxVersions(int maxVersions)
maxVersions
- maximum number of versions to returnpublic void setStartTime(long startTime)
startTime
- the lower bound on timestamps of values of interestpublic void setEndTime(long endTime)
endTime
- the upper bound on timestamps of values of interestpublic void setFilter(String filter)
filter
- the filter specificationpublic byte[] createProtobufOutput()
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf message
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |