public abstract class QueryBase<K,T extends PersistentBase> extends Object implements Query<K,T>, org.apache.hadoop.io.Writable, org.apache.hadoop.conf.Configurable
| Modifier and Type | Field and Description |
|---|---|
protected DataStoreBase<K,T> |
dataStore |
protected K |
endKey |
protected long |
endTime |
protected String[] |
fields |
protected Filter<K,T> |
filter |
protected long |
limit |
protected boolean |
localFilterEnabled |
protected String |
queryString |
protected K |
startKey |
protected long |
startTime |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Result<K,T> |
execute()
Executes the Query on the DataStore and returns the results.
|
org.apache.hadoop.conf.Configuration |
getConf() |
DataStore<K,T> |
getDataStore()
Returns the DataStore, that this Query is associated with.
|
K |
getEndKey() |
long |
getEndTime() |
String[] |
getFields() |
Filter<K,T> |
getFilter() |
K |
getKey() |
long |
getLimit()
Returns the maximum number of results
|
K |
getStartKey() |
long |
getStartTime() |
long |
getTimestamp() |
int |
hashCode() |
boolean |
isLocalFilterEnabled() |
void |
readFields(DataInput in) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
setDataStore(DataStore<K,T> dataStore)
Sets the dataStore of this query.
|
void |
setEndKey(K endKey) |
void |
setEndTime(long endTime) |
void |
setFields(String... fields) |
void |
setFilter(Filter<K,T> filter) |
void |
setKey(K key) |
void |
setKeyRange(K startKey,
K endKey)
Set the range of keys over which the query will execute.
|
void |
setLimit(long limit)
Sets the maximum number of results to return.
|
void |
setLocalFilterEnabled(boolean enable)
Set whether the local filter is enabled.
|
void |
setStartKey(K startKey) |
void |
setStartTime(long startTime) |
void |
setTimeRange(long startTime,
long endTime) |
void |
setTimestamp(long timestamp) |
String |
toString() |
void |
write(DataOutput out) |
protected DataStoreBase<K,T extends PersistentBase> dataStore
protected String queryString
protected String[] fields
protected K startKey
protected K endKey
protected long startTime
protected long endTime
protected Filter<K,T extends PersistentBase> filter
protected boolean localFilterEnabled
protected long limit
public Result<K,T> execute()
Querypublic void setDataStore(DataStore<K,T> dataStore)
QuerysetDataStore in interface Query<K,T extends PersistentBase>dataStore - the dataStore of the querypublic DataStore<K,T> getDataStore()
QuerygetDataStore in interface Query<K,T extends PersistentBase>public void setFields(String... fields)
setFields in interface Query<K,T extends PersistentBase>public String[] getFields()
getFields in interface Query<K,T extends PersistentBase>public Filter<K,T> getFilter()
getFilter in interface Query<K,T extends PersistentBase>null if none.public void setFilter(Filter<K,T> filter)
setFilter in interface Query<K,T extends PersistentBase>public boolean isLocalFilterEnabled()
isLocalFilterEnabled in interface Query<K,T extends PersistentBase>Query.setLocalFilterEnabled(boolean).public void setLocalFilterEnabled(boolean enable)
QuerysetLocalFilterEnabled in interface Query<K,T extends PersistentBase>public void setKey(K key)
setKey in interface Query<K,T extends PersistentBase>public void setStartKey(K startKey)
setStartKey in interface Query<K,T extends PersistentBase>startKey - an inclusive start keypublic void setEndKey(K endKey)
setEndKey in interface Query<K,T extends PersistentBase>endKey - an inclusive end keypublic void setKeyRange(K startKey, K endKey)
QuerysetKeyRange in interface Query<K,T extends PersistentBase>startKey - an inclusive start keyendKey - an inclusive end keypublic K getStartKey()
getStartKey in interface Query<K,T extends PersistentBase>public K getEndKey()
getEndKey in interface Query<K,T extends PersistentBase>public void setTimestamp(long timestamp)
setTimestamp in interface Query<K,T extends PersistentBase>public void setStartTime(long startTime)
setStartTime in interface Query<K,T extends PersistentBase>public void setEndTime(long endTime)
setEndTime in interface Query<K,T extends PersistentBase>public void setTimeRange(long startTime,
long endTime)
setTimeRange in interface Query<K,T extends PersistentBase>public long getTimestamp()
getTimestamp in interface Query<K,T extends PersistentBase>public long getStartTime()
getStartTime in interface Query<K,T extends PersistentBase>public long getEndTime()
getEndTime in interface Query<K,T extends PersistentBase>public void setLimit(long limit)
QuerysetLimit in interface Query<K,T extends PersistentBase>public long getLimit()
QuerygetLimit in interface Query<K,T extends PersistentBase>public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.