|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.service.KeyspaceServiceImpl
me.prettyprint.cassandra.service.VirtualKeyspaceServiceImpl
public class VirtualKeyspaceServiceImpl
| Field Summary |
|---|
| Fields inherited from interface me.prettyprint.cassandra.service.KeyspaceService |
|---|
CF_TYPE, CF_TYPE_STANDARD, CF_TYPE_SUPER |
| Constructor Summary | |
|---|---|
VirtualKeyspaceServiceImpl(String keyspaceName,
E keyPrefix,
Serializer<E> keyPrefixSerializer,
ConsistencyLevelPolicy consistencyLevel,
HConnectionManager connectionManager,
FailoverPolicy failoverPolicy)
|
|
VirtualKeyspaceServiceImpl(String keyspaceName,
E keyPrefix,
Serializer<E> keyPrefixSerializer,
ConsistencyLevelPolicy consistencyLevel,
HConnectionManager connectionManager,
FailoverPolicy failoverPolicy,
Map<String,String> credentials)
|
|
| Method Summary | |
|---|---|
void |
addCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.CounterColumn counterColumn)
Add a counter with CL.ONE |
void |
batchMutate(BatchMutation batchMutate)
Call batch mutate with the BatchMutation object which encapsulates some of the complexity of the batch_mutate API signature |
void |
batchMutate(Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> mutationMap)
Call batch mutate with the assembled mutationMap. |
org.apache.cassandra.thrift.Column |
getColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
Get the Column at the given columnPath. |
int |
getCount(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Counts the columns present in columnParent. |
org.apache.cassandra.thrift.CounterColumn |
getCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
Get the Counter Column at the given columnPath. |
List<org.apache.cassandra.thrift.CounterColumn> |
getCounterSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Get the group of counter columns contained by columnParent. |
List<org.apache.cassandra.thrift.CounterSuperColumn> |
getCounterSuperSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Get the group of superColumn contained by columnParent. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> |
getIndexedSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.IndexClause indexClause,
org.apache.cassandra.thrift.SlicePredicate predicate)
returns a subset of columns for a range of keys. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> |
getRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
returns a subset of counter columns for a range of keys |
Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> |
getRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
returns a subset of columns for a range of keys. |
List<org.apache.cassandra.thrift.Column> |
getSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Get the group of columns contained by columnParent. |
org.apache.cassandra.thrift.SuperColumn |
getSuperColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
Get the SuperColumn at the given columnPath. |
org.apache.cassandra.thrift.SuperColumn |
getSuperColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath,
boolean reversed,
int size)
Get the SuperColumn at the given columnPath. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> |
getSuperRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
returns a subset of counter super columns for a range of keys |
Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> |
getSuperRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
returns a subset of super columns for a range of keys. |
List<org.apache.cassandra.thrift.SuperColumn> |
getSuperSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Get the group of superColumn contained by columnParent. |
void |
insert(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.Column column)
Inserts a column. |
Map<ByteBuffer,Integer> |
multigetCount(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate slicePredicate)
Returns a map of key to column count |
Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> |
multigetCounterSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Performs a get_slice for columnParent and predicate for the given keys in parallel. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> |
multigetCounterSuperSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> |
multigetSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Performs a get_slice for columnParent and predicate for the given keys in parallel. |
Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> |
multigetSuperSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
Performs a get_slice for a superColumn columnParent and predicate for the given keys in parallel. |
org.apache.cassandra.thrift.KeyRange |
prefixKeyRange(org.apache.cassandra.thrift.KeyRange unprefixed)
|
void |
remove(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath,
long timestamp)
Same as two argument version, but the caller must specify their own clock |
void |
removeCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
|
org.apache.cassandra.thrift.KeyRange |
unprefixKeyRange(org.apache.cassandra.thrift.KeyRange prefixed)
|
| Methods inherited from class me.prettyprint.cassandra.service.KeyspaceServiceImpl |
|---|
addCounter, getCassandraHost, getColumn, getConsistencyLevel, getCounter, getCounterSlice, getCounterSuperSlice, getName, getSlice, getSuperColumn, getSuperSlice, insert, insert, multigetSuperColumn, multigetSuperColumn, remove, remove, remove, removeCounter, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public VirtualKeyspaceServiceImpl(String keyspaceName,
E keyPrefix,
Serializer<E> keyPrefixSerializer,
ConsistencyLevelPolicy consistencyLevel,
HConnectionManager connectionManager,
FailoverPolicy failoverPolicy)
throws HectorTransportException
HectorTransportException
public VirtualKeyspaceServiceImpl(String keyspaceName,
E keyPrefix,
Serializer<E> keyPrefixSerializer,
ConsistencyLevelPolicy consistencyLevel,
HConnectionManager connectionManager,
FailoverPolicy failoverPolicy,
Map<String,String> credentials)
throws HectorTransportException
HectorTransportException| Method Detail |
|---|
public org.apache.cassandra.thrift.KeyRange prefixKeyRange(org.apache.cassandra.thrift.KeyRange unprefixed)
public org.apache.cassandra.thrift.KeyRange unprefixKeyRange(org.apache.cassandra.thrift.KeyRange prefixed)
public void batchMutate(Map<ByteBuffer,Map<String,List<org.apache.cassandra.thrift.Mutation>>> mutationMap)
throws HectorException
KeyspaceService
batchMutate in interface KeyspaceServicebatchMutate in class KeyspaceServiceImplHectorException
public void batchMutate(BatchMutation batchMutate)
throws HectorException
KeyspaceService
batchMutate in interface KeyspaceServicebatchMutate in class KeyspaceServiceImplHectorException
public int getCount(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getCount in interface KeyspaceServicegetCount in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
throws HectorException
KeyspaceService
getRangeSlices in interface KeyspaceServicegetRangeSlices in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> getRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
throws HectorException
KeyspaceService
getRangeCounterSlices in interface KeyspaceServicegetRangeCounterSlices in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> getSuperRangeSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
throws HectorException
KeyspaceService
getSuperRangeSlices in interface KeyspaceServicegetSuperRangeSlices in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> getSuperRangeCounterSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate,
org.apache.cassandra.thrift.KeyRange keyRange)
throws HectorException
KeyspaceService
getSuperRangeCounterSlices in interface KeyspaceServicegetSuperRangeCounterSlices in class KeyspaceServiceImplHectorException
public List<org.apache.cassandra.thrift.Column> getSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getSlice in interface KeyspaceServicegetSlice in class KeyspaceServiceImplHectorException
public List<org.apache.cassandra.thrift.CounterColumn> getCounterSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getCounterSlice in interface KeyspaceServicegetCounterSlice in class KeyspaceServiceImplHectorException
public org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
throws HectorException
KeyspaceService
getSuperColumn in interface KeyspaceServicegetSuperColumn in class KeyspaceServiceImplHectorException - if any other error occurs (including HNotFoundException if no value is present)
public org.apache.cassandra.thrift.SuperColumn getSuperColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath,
boolean reversed,
int size)
throws HectorException
KeyspaceService
getSuperColumn in interface KeyspaceServicegetSuperColumn in class KeyspaceServiceImplreversed - the result Column sortsize - the result column size
HectorException - if any other error occurs (including HNotFoundException if no value is present)
public List<org.apache.cassandra.thrift.SuperColumn> getSuperSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getSuperSlice in interface KeyspaceServicegetSuperSlice in class KeyspaceServiceImplHectorException
public void insert(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.Column column)
throws HectorException
KeyspaceService
insert in interface KeyspaceServiceinsert in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> multigetSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
multigetSlice in interface KeyspaceServicemultigetSlice in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterColumn>> multigetCounterSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
multigetCounterSlice in interface KeyspaceServicemultigetCounterSlice in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.SuperColumn>> multigetSuperSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
multigetSuperSlice in interface KeyspaceServicemultigetSuperSlice in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.CounterSuperColumn>> multigetCounterSuperSlice(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
multigetCounterSuperSlice in interface KeyspaceServicemultigetCounterSuperSlice in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,List<org.apache.cassandra.thrift.Column>> getIndexedSlices(org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.IndexClause indexClause,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getIndexedSlices in interface KeyspaceServicegetIndexedSlices in class KeyspaceServiceImplHectorException
public Map<ByteBuffer,Integer> multigetCount(List<ByteBuffer> keys,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate slicePredicate)
throws HectorException
KeyspaceService
multigetCount in interface KeyspaceServicemultigetCount in class KeyspaceServiceImplHectorException
public void remove(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath,
long timestamp)
throws HectorException
KeyspaceService
remove in interface KeyspaceServiceremove in class KeyspaceServiceImplHectorException
public org.apache.cassandra.thrift.Column getColumn(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
throws HectorException
KeyspaceService
getColumn in interface KeyspaceServicegetColumn in class KeyspaceServiceImplHectorException - if any other error occurs (including HNotFoundException if no value is present)
public org.apache.cassandra.thrift.CounterColumn getCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
throws HectorException
KeyspaceService
getCounter in interface KeyspaceServicegetCounter in class KeyspaceServiceImplHectorException - if any other error occurs (including HNotFoundException if no value is present)
public void addCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.CounterColumn counterColumn)
throws HectorException
KeyspaceService
addCounter in interface KeyspaceServiceaddCounter in class KeyspaceServiceImplHectorException
public List<org.apache.cassandra.thrift.CounterSuperColumn> getCounterSuperSlice(ByteBuffer key,
org.apache.cassandra.thrift.ColumnParent columnParent,
org.apache.cassandra.thrift.SlicePredicate predicate)
throws HectorException
KeyspaceService
getCounterSuperSlice in interface KeyspaceServicegetCounterSuperSlice in class KeyspaceServiceImplHectorException
public void removeCounter(ByteBuffer key,
org.apache.cassandra.thrift.ColumnPath columnPath)
throws HectorException
removeCounter in interface KeyspaceServiceremoveCounter in class KeyspaceServiceImplHectorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||