|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.astyanax.test.TestKeyspace
public class TestKeyspace
| Constructor Summary | |
|---|---|
TestKeyspace(java.lang.String name)
|
|
| Method Summary | ||
|---|---|---|
|
createColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
Create a column family in this keyspace |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
createColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
Create a column family from the provided options |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
createColumnFamily(java.util.Properties props)
Create a column family in this keyspace using the provided properties. |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
Create the keyspace in cassandra. |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs)
Bulk create for a keyspace and a bunch of column famlies |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
createKeyspace(java.util.Properties properties)
Create the keyspace in cassandra. |
|
KeyspaceDefinition |
describeKeyspace()
Return a complete description of the keyspace and its column families |
|
java.lang.String |
describePartitioner()
Describe the partitioner used by the cluster |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing()
Get a list of all tokens and their endpoints. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(boolean cached)
Describe the ring but use the last locally cached version if available. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc)
Get a list of all tokens and their endpoints for a specific dc only. |
|
java.util.List<com.netflix.astyanax.connectionpool.TokenRange> |
describeRing(java.lang.String dc,
java.lang.String rack)
Get a list of tokens and their endpoints for a specific dc/rack combination. |
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
describeSchemaVersions()
List all schema versions in the cluster. |
|
|
dropColumnFamily(ColumnFamily<K,C> columnFamily)
Drop a column family from this keyspace |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
dropColumnFamily(java.lang.String columnFamilyName)
Drop a column family from this keyspace |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
dropKeyspace()
Drop this keyspace from cassandra |
|
java.util.Properties |
getColumnFamilyProperties(java.lang.String columnFamily)
Get the properties for a column family |
|
AstyanaxConfiguration |
getConfig()
Return the configuration object used to set up this keyspace |
|
com.netflix.astyanax.connectionpool.ConnectionPool<?> |
getConnectionPool()
Exposes the internal connection pool to the client. |
|
java.lang.String |
getKeyspaceName()
Returns keyspace name |
|
java.util.Properties |
getKeyspaceProperties()
Get this keyspace's configuration (including column families) as flattened properties |
|
com.netflix.astyanax.partitioner.Partitioner |
getPartitioner()
Return the partitioner for this keyspace. |
|
SerializerPackage |
getSerializerPackage(java.lang.String columnFamily,
boolean ignoreErrors)
Return the serializer package for a specific column family. |
|
|
prepareColumnMutation(ColumnFamily<K,C> columnFamily,
K rowKey,
C column)
Mutation for a single column |
|
CqlStatement |
prepareCqlStatement()
Prepare a CQL Statement on the keyspace |
|
MutationBatch |
prepareMutationBatch()
Prepare a batch mutation object. |
|
|
prepareQuery(ColumnFamily<K,C> cf)
Starting point for constructing a query. |
|
void |
setTokenRange(java.util.List<com.netflix.astyanax.connectionpool.TokenRange> tokens)
|
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation)
This method is used for testing purposes only. |
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation,
com.netflix.astyanax.retry.RetryPolicy retry)
This method is used for testing purposes only. |
|
|
truncateColumnFamily(ColumnFamily<K,C> columnFamily)
Delete all rows in a column family |
|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> |
truncateColumnFamily(java.lang.String columnFamily)
Delete all rows in a column family |
|
|
updateColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
Update the column family in cassandra |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
updateColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
Update the column family definition from a map of string to object |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
updateColumnFamily(java.util.Properties props)
Update the column family definition from properties |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
updateKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
Update the keyspace in cassandra. |
|
com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> |
updateKeyspace(java.util.Properties props)
Update the keyspace definition using properties. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestKeyspace(java.lang.String name)
| Method Detail |
|---|
public void setTokenRange(java.util.List<com.netflix.astyanax.connectionpool.TokenRange> tokens)
public java.lang.String getKeyspaceName()
Keyspace
getKeyspaceName in interface Keyspace
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic MutationBatch prepareMutationBatch()
Keyspace
prepareMutationBatch in interface Keyspacepublic <K,C> ColumnFamilyQuery<K,C> prepareQuery(ColumnFamily<K,C> cf)
Keyspace
prepareQuery in interface Keyspacecf - Column family to be used for the query. The key and column
serializers in the ColumnFamily are automatically used while
constructing the query and the response.
public <K,C> ColumnMutation prepareColumnMutation(ColumnFamily<K,C> columnFamily,
K rowKey,
C column)
Keyspace
prepareColumnMutation in interface Keyspacepublic AstyanaxConfiguration getConfig()
Keyspace
getConfig in interface Keyspace
public KeyspaceDefinition describeKeyspace()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeKeyspace in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public SerializerPackage getSerializerPackage(java.lang.String columnFamily,
boolean ignoreErrors)
Keyspace
getSerializerPackage in interface Keyspace
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
testOperation in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(ColumnFamily<K,C> columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.OperationException,
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
truncateColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.OperationException
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> testOperation(com.netflix.astyanax.connectionpool.Operation<?,?> operation,
com.netflix.astyanax.retry.RetryPolicy retry)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
testOperation in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(boolean cached)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(java.lang.String dc)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing in interface Keyspacedc - - null for all dcs
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.List<com.netflix.astyanax.connectionpool.TokenRange> describeRing(java.lang.String dc,
java.lang.String rack)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeRing in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Void> truncateColumnFamily(java.lang.String columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
truncateColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
com.netflix.astyanax.connectionpool.exceptions.OperationException
public java.lang.String describePartitioner()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describePartitioner in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> dropColumnFamily(java.lang.String columnFamilyName)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> dropColumnFamily(ColumnFamily<K,C> columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> dropKeyspace()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
dropKeyspace in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createColumnFamily in interface Keyspaceoptions - - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public <K,C> com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> updateColumnFamily(ColumnFamily<K,C> columnFamily,
java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateColumnFamily in interface Keyspaceoptions - - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createKeyspace in interface Keyspaceoptions - - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> updateKeyspace(java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateKeyspace in interface Keyspaceoptions - - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> describeSchemaVersions()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
describeSchemaVersions in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.ConnectionPool<?> getConnectionPool()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getConnectionPool in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic CqlStatement prepareCqlStatement()
Keyspace
prepareCqlStatement in interface Keyspace
public com.netflix.astyanax.partitioner.Partitioner getPartitioner()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getPartitioner in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createKeyspace(java.util.Map<java.lang.String,java.lang.Object> options,
java.util.Map<ColumnFamily,java.util.Map<java.lang.String,java.lang.Object>> cfs)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createKeyspace in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createColumnFamily(java.util.Properties props)
Keyspace
createColumnFamily in interface Keyspace
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createKeyspace(java.util.Properties properties)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createKeyspace in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> updateKeyspace(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateKeyspace in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.Properties getKeyspaceProperties()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getKeyspaceProperties in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public java.util.Properties getColumnFamilyProperties(java.lang.String columnFamily)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
getColumnFamilyProperties in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> updateColumnFamily(java.util.Properties props)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> updateColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
updateColumnFamily in interface Keyspacecom.netflix.astyanax.connectionpool.exceptions.ConnectionException
public com.netflix.astyanax.connectionpool.OperationResult<SchemaChangeResult> createColumnFamily(java.util.Map<java.lang.String,java.lang.Object> options)
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
Keyspace
createColumnFamily in interface Keyspaceoptions - - For list of options see http://www.datastax.com/docs/1.0/configuration/storage_configuration
com.netflix.astyanax.connectionpool.exceptions.ConnectionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||