public class AstyanaxStoreManager extends AbstractCassandraStoreManager
AbstractCassandraStoreManager.PartitionerDistributedStoreManager.Deployment, DistributedStoreManager.MaskedTimestamp| Modifier and Type | Field and Description |
|---|---|
static ConfigNamespace |
ASTYANAX_NS |
static ConfigOption<String> |
CLUSTER_NAME
Default name for the Cassandra cluster
|
static ConfigOption<String> |
CONNECTION_POOL_TYPE
Astyanax's connection pooler implementation.
|
static ConfigOption<String> |
HOST_SUPPLIER
Astyanax specific host supplier useful only when discovery type set to DISCOVERY_SERVICE or TOKEN_AWARE.
|
static ConfigOption<String> |
LOCAL_DATACENTER |
static ConfigOption<Integer> |
MAX_CLUSTER_CONNECTIONS_PER_HOST
Maximum pooled "cluster" connections per host.
|
static ConfigOption<Integer> |
MAX_CONNECTIONS
Maximum open connections allowed in the pool (counting all hosts).
|
static ConfigOption<Integer> |
MAX_CONNECTIONS_PER_HOST
Maximum pooled connections per host.
|
static ConfigOption<Integer> |
MAX_OPERATIONS_PER_CONNECTION
Maximum number of operations allowed per connection before the connection is closed.
|
static ConfigOption<String> |
NODE_DISCOVERY_TYPE
How Astyanax discovers Cassandra cluster nodes.
|
static ConfigOption<String> |
RETRY_BACKOFF_STRATEGY
If non-null, this must be the fully-qualified classname (i.e.
|
static ConfigOption<Integer> |
RETRY_DELAY_SLICE
Controls the retryDelaySlice parameter on Astyanax
ConnectionPoolConfigurationImpl objects, which is in turn used by
ExponentialRetryBackoffStrategy.
|
static ConfigOption<Integer> |
RETRY_MAX_DELAY_SLICE
Controls the retryMaxDelaySlice parameter on Astyanax
ConnectionPoolConfigurationImpl objects, which is in turn used by
ExponentialRetryBackoffStrategy.
|
static ConfigOption<String> |
RETRY_POLICY
In Astyanax, RetryPolicy and RetryBackoffStrategy sound and look similar
but are used for distinct purposes.
|
static ConfigOption<Integer> |
RETRY_SUSPEND_WINDOW
Controls the retrySuspendWindow parameter on Astyanax
ConnectionPoolConfigurationImpl objects, which is in turn used by
ExponentialRetryBackoffStrategy.
|
ATOMIC_BATCH_MUTATE, atomicBatch, CASSANDRA_KEYSPACE, CASSANDRA_NS, CASSANDRA_READ_CONSISTENCY, CASSANDRA_WRITE_CONSISTENCY, CF_COMPRESSION, CF_COMPRESSION_BLOCK_SIZE, CF_COMPRESSION_TYPE, compressionChunkSizeKB, compressionClass, compressionEnabled, keySpaceName, PORT_DEFAULT, REPLICATION_FACTOR, REPLICATION_OPTIONS, REPLICATION_STRATEGY, SSL_ENABLED, SSL_NS, SSL_TRUSTSTORE_LOCATION, SSL_TRUSTSTORE_NS, SSL_TRUSTSTORE_PASSWORD, strategyOptions, SYSTEM_KSconnectionTimeoutMS, hostnames, pageSize, password, port, times, usernamebatchLoading, isReadOnly, storageConfig, transactional| Constructor and Description |
|---|
AstyanaxStoreManager(Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearStorage() |
void |
close() |
org.apache.cassandra.dht.IPartitioner<? extends org.apache.cassandra.dht.Token<?>> |
getCassandraPartitioner() |
Map<String,String> |
getCompressionOptions(String cf)
Returns a map of compression options for the column family
cf. |
DistributedStoreManager.Deployment |
getDeployment() |
List<KeyRange> |
getLocalKeyPartition() |
void |
mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> batch,
StoreTransaction txh) |
AstyanaxKeyColumnValueStore |
openDatabase(String name) |
String |
toString() |
beginTransaction, getFeatures, getName, getPartitionergetPageSize, getSingleHostname, getTimestampProvider, hasAuthentication, sleepAfterWritegetMetaDataSchema, getStorageConfigpublic static final ConfigNamespace ASTYANAX_NS
public static final ConfigOption<String> CLUSTER_NAME
public static final ConfigOption<Integer> MAX_CONNECTIONS_PER_HOST
public static final ConfigOption<Integer> MAX_CONNECTIONS
public static final ConfigOption<Integer> MAX_OPERATIONS_PER_CONNECTION
public static final ConfigOption<Integer> MAX_CLUSTER_CONNECTIONS_PER_HOST
public static final ConfigOption<String> NODE_DISCOVERY_TYPE
public static final ConfigOption<String> HOST_SUPPLIER
public static final ConfigOption<String> CONNECTION_POOL_TYPE
public static final ConfigOption<String> RETRY_POLICY
public static final ConfigOption<String> RETRY_BACKOFF_STRATEGY
com.netflix.astyanax.connectionpool.impl.FixedRetryBackoffStrategy,1000,5000
If null, then Astyanax uses its default strategy, which is an
ExponentialRetryBackoffStrategy instance. The instance parameters take
Astyanax's built-in default values, which can be overridden via the
following config keys:
In Astyanax, RetryPolicy and RetryBackoffStrategy sound and look similar
but are used for distinct purposes. RetryPolicy is for retrying failed
operations. RetryBackoffStrategy is for retrying attempts to talk to
uncommunicative hosts. This config option controls RetryBackoffStrategy.public static final ConfigOption<Integer> RETRY_DELAY_SLICE
ConnectionPoolConfigurationImpl,
ExponentialRetryBackoffStrategy, and the javadoc for
RETRY_BACKOFF_STRATEGY for more information.
This parameter is not meaningful for and has no effect on
FixedRetryBackoffStrategy.public static final ConfigOption<Integer> RETRY_MAX_DELAY_SLICE
ConnectionPoolConfigurationImpl,
ExponentialRetryBackoffStrategy, and the javadoc for
RETRY_BACKOFF_STRATEGY for more information.
This parameter is not meaningful for and has no effect on
FixedRetryBackoffStrategy.public static final ConfigOption<Integer> RETRY_SUSPEND_WINDOW
ConnectionPoolConfigurationImpl,
ExponentialRetryBackoffStrategy, and the javadoc for
RETRY_BACKOFF_STRATEGY for more information.
This parameter is not meaningful for and has no effect on
FixedRetryBackoffStrategy.public static final ConfigOption<String> LOCAL_DATACENTER
public AstyanaxStoreManager(Configuration config) throws BackendException
BackendExceptionpublic DistributedStoreManager.Deployment getDeployment()
getDeployment in class DistributedStoreManagerpublic org.apache.cassandra.dht.IPartitioner<? extends org.apache.cassandra.dht.Token<?>> getCassandraPartitioner()
throws BackendException
getCassandraPartitioner in class AbstractCassandraStoreManagerBackendExceptionpublic String toString()
toString in class AbstractCassandraStoreManagerpublic void close()
public AstyanaxKeyColumnValueStore openDatabase(String name) throws BackendException
BackendExceptionpublic void mutateMany(Map<String,Map<StaticBuffer,KCVMutation>> batch, StoreTransaction txh) throws BackendException
BackendExceptionpublic List<KeyRange> getLocalKeyPartition() throws BackendException
BackendExceptionpublic void clearStorage()
throws BackendException
BackendExceptionpublic Map<String,String> getCompressionOptions(String cf) throws BackendException
AbstractCassandraStoreManagercf.
The contents of the returned map must be identical to the contents of the
map returned by
CfDef.getCompression_options(), even
for implementations of this method that don't use Thrift.getCompressionOptions in class AbstractCassandraStoreManagercf - the name of the column family for which to return compression
optionsBackendException - if reading from Cassandra failsCopyright © 2012–2016. All rights reserved.