public interface Cluster
| Modifier and Type | Method and Description |
|---|---|
String |
addColumnFamily(ColumnFamilyDefinition cfdef)
Add a column family and returns without waiting for schema cluster agreement.
|
String |
addColumnFamily(ColumnFamilyDefinition cfdef,
boolean waitForSchemaAgreement)
Add a column family and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
void |
addHost(CassandraHost cassandraHost,
boolean skipApplyConfig)
Adds the host to this Cluster.
|
String |
addKeyspace(KeyspaceDefinition ksdef)
Add a keyspace and does not wait for schema agreement.
|
String |
addKeyspace(KeyspaceDefinition ksdef,
boolean waitForSchemaAgreement)
Add a keyspace and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
describeClusterName() |
KeyspaceDefinition |
describeKeyspace(String keyspace) |
List<KeyspaceDefinition> |
describeKeyspaces() |
String |
describePartitioner() |
List<org.apache.cassandra.thrift.TokenRange> |
describeRing(String keyspace) |
Map<String,List<String>> |
describeSchemaVersions() |
String |
describeThriftVersion() |
String |
dropColumnFamily(String keyspaceName,
String columnFamily)
Drops a column family and does not wait for schema agreement.
|
String |
dropColumnFamily(String keyspaceName,
String columnFamily,
boolean waitForSchemaAgreement)
Drops a column family and waits for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
dropKeyspace(String keyspace)
Drops the Keyspace from the cluster.
|
String |
dropKeyspace(String keyspace,
boolean waitForSchemaAgreement)
Drops a Keyspace and waits for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
getClusterName()
Deprecated.
|
HConnectionManager |
getConnectionManager() |
Map<String,String> |
getCredentials() |
Set<CassandraHost> |
getKnownPoolHosts(boolean refresh) |
String |
getName()
Descriptive name of the cluster.
|
void |
onStartup()
called after the cluster has been initialized.
|
void |
truncate(String keyspaceName,
String columnFamily) |
String |
updateColumnFamily(ColumnFamilyDefinition cfdef)
Updates a column family and does not wait for schema agreement.
|
String |
updateColumnFamily(ColumnFamilyDefinition cfdef,
boolean waitForSchemaAgreement)
Update a column family and wait for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
String |
updateKeyspace(KeyspaceDefinition ksdef)
Updates the Keyspace from the cluster without waiting for schema agreement.
|
String |
updateKeyspace(KeyspaceDefinition ksdef,
boolean waitForSchemaAgreement)
Updates the Keyspace and waitz for schema cluster agreement if
waitForSchemaAgreement
is set to true. |
Set<CassandraHost> getKnownPoolHosts(boolean refresh)
HConnectionManager getConnectionManager()
void addHost(CassandraHost cassandraHost, boolean skipApplyConfig)
cassandraHost - skipApplyConfig - String getName()
String getClusterName() throws HectorException
describeClusterName()HectorExceptionString describeClusterName() throws HectorException
HectorExceptionString describeThriftVersion() throws HectorException
HectorExceptionMap<String,List<String>> describeSchemaVersions() throws HectorException
HectorExceptionKeyspaceDefinition describeKeyspace(String keyspace) throws HectorException
HectorExceptionList<KeyspaceDefinition> describeKeyspaces() throws HectorException
HectorExceptionList<org.apache.cassandra.thrift.TokenRange> describeRing(String keyspace) throws HectorException
HectorExceptionString dropKeyspace(String keyspace) throws HectorException
HectorExceptionString dropKeyspace(String keyspace, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: dropKeyspace(String)HectorExceptionString updateKeyspace(KeyspaceDefinition ksdef) throws HectorException
HectorExceptionString updateKeyspace(KeyspaceDefinition ksdef, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: updateKeyspace(KeyspaceDefinition)HectorExceptionString describePartitioner() throws HectorException
HectorExceptionString addColumnFamily(ColumnFamilyDefinition cfdef) throws HectorException
HectorExceptionString addColumnFamily(ColumnFamilyDefinition cfdef, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: addColumnFamily(ColumnFamilyDefinition)HectorExceptionString dropColumnFamily(String keyspaceName, String columnFamily) throws HectorException
HectorExceptionString dropColumnFamily(String keyspaceName, String columnFamily, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: dropColumnFamily(String, String)HectorExceptionString updateColumnFamily(ColumnFamilyDefinition cfdef) throws HectorException
HectorExceptionString updateColumnFamily(ColumnFamilyDefinition cfdef, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: updateColumnFamily(me.prettyprint.hector.api.ddl.ColumnFamilyDefinition)HectorExceptionString addKeyspace(KeyspaceDefinition ksdef) throws HectorException
HectorExceptionString addKeyspace(KeyspaceDefinition ksdef, boolean waitForSchemaAgreement) throws HectorException
waitForSchemaAgreement
is set to true. Otherwise it behaves exactly like: addKeyspace(me.prettyprint.hector.api.ddl.KeyspaceDefinition)HectorExceptionvoid truncate(String keyspaceName, String columnFamily) throws HectorException
HectorExceptionvoid onStartup()
Copyright © 2014. All Rights Reserved.