This project has retired. For details please refer to its
Attic page.
PartitionQueryImpl (Apache Gora 0.2 API)
org.apache.gora.query.impl
Class PartitionQueryImpl<K,T extends Persistent>
java.lang.Object
org.apache.gora.query.impl.QueryBase<K,T>
org.apache.gora.query.impl.PartitionQueryImpl<K,T>
- All Implemented Interfaces:
- PartitionQuery<K,T>, Query<K,T>, org.apache.hadoop.conf.Configurable, org.apache.hadoop.io.Writable
- Direct Known Subclasses:
- FileSplitPartitionQuery
public class PartitionQueryImpl<K,T extends Persistent>
- extends QueryBase<K,T>
- implements PartitionQuery<K,T>
Implementation for PartitionQuery
.
Methods inherited from class org.apache.gora.query.impl.QueryBase |
execute, getConf, getEndKey, getKey, getStartKey, hashCode, setConf, setDataStore, setEndKey, setKey, setKeyRange, setStartKey, toString |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf, setConf |
baseQuery
protected Query<K,T extends Persistent> baseQuery
locations
protected String[] locations
PartitionQueryImpl
public PartitionQueryImpl()
PartitionQueryImpl
public PartitionQueryImpl(Query<K,T> baseQuery,
String... locations)
PartitionQueryImpl
public PartitionQueryImpl(Query<K,T> baseQuery,
K startKey,
K endKey,
String... locations)
getLocations
public String[] getLocations()
- Description copied from interface:
PartitionQuery
- Returns the locations on which this partial query will run locally.
- Specified by:
getLocations
in interface PartitionQuery<K,T extends Persistent>
- Returns:
- the addresses of machines
getBaseQuery
public Query<K,T> getBaseQuery()
getFields
public String[] getFields()
- Specified by:
getFields
in interface Query<K,T extends Persistent>
- Overrides:
getFields
in class QueryBase<K,T extends Persistent>
getDataStore
public DataStore<K,T> getDataStore()
- Description copied from interface:
Query
- Returns the DataStore, that this Query is associated with.
- Specified by:
getDataStore
in interface Query<K,T extends Persistent>
- Overrides:
getDataStore
in class QueryBase<K,T extends Persistent>
- Returns:
- the DataStore of the Query
getTimestamp
public long getTimestamp()
- Specified by:
getTimestamp
in interface Query<K,T extends Persistent>
- Overrides:
getTimestamp
in class QueryBase<K,T extends Persistent>
getStartTime
public long getStartTime()
- Specified by:
getStartTime
in interface Query<K,T extends Persistent>
- Overrides:
getStartTime
in class QueryBase<K,T extends Persistent>
getEndTime
public long getEndTime()
- Specified by:
getEndTime
in interface Query<K,T extends Persistent>
- Overrides:
getEndTime
in class QueryBase<K,T extends Persistent>
getLimit
public long getLimit()
- Description copied from interface:
Query
- Returns the maximum number of results
- Specified by:
getLimit
in interface Query<K,T extends Persistent>
- Overrides:
getLimit
in class QueryBase<K,T extends Persistent>
- Returns:
- the limit if it is set, otherwise a negative number
setFields
public void setFields(String... fields)
- Specified by:
setFields
in interface Query<K,T extends Persistent>
- Overrides:
setFields
in class QueryBase<K,T extends Persistent>
setTimestamp
public void setTimestamp(long timestamp)
- Specified by:
setTimestamp
in interface Query<K,T extends Persistent>
- Overrides:
setTimestamp
in class QueryBase<K,T extends Persistent>
setStartTime
public void setStartTime(long startTime)
- Specified by:
setStartTime
in interface Query<K,T extends Persistent>
- Overrides:
setStartTime
in class QueryBase<K,T extends Persistent>
setEndTime
public void setEndTime(long endTime)
- Specified by:
setEndTime
in interface Query<K,T extends Persistent>
- Overrides:
setEndTime
in class QueryBase<K,T extends Persistent>
setTimeRange
public void setTimeRange(long startTime,
long endTime)
- Specified by:
setTimeRange
in interface Query<K,T extends Persistent>
- Overrides:
setTimeRange
in class QueryBase<K,T extends Persistent>
setLimit
public void setLimit(long limit)
- Description copied from interface:
Query
- Sets the maximum number of results to return.
- Specified by:
setLimit
in interface Query<K,T extends Persistent>
- Overrides:
setLimit
in class QueryBase<K,T extends Persistent>
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class QueryBase<K,T extends Persistent>
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class QueryBase<K,T extends Persistent>
- Throws:
IOException
equals
public boolean equals(Object obj)
- Overrides:
equals
in class QueryBase<K,T extends Persistent>
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.