Brooklyn

brooklyn.entity.nosql.cassandra
[Java] Interface CassandraCluster

brooklyn.entity.trait.Startable
  brooklyn.entity.nosql.cassandra.CassandraCluster
      brooklyn.entity.rebind.Rebindable
          brooklyn.entity.Entity
              brooklyn.entity.Group
                  brooklyn.entity.group.Cluster
                      brooklyn.entity.group.DynamicCluster
                          brooklyn.entity.trait.Changeable
                              brooklyn.entity.basic.AbstractGroup
                                  brooklyn.entity.trait.Identifiable
                                      brooklyn.entity.trait.Resizable
All Superinterfaces:
Startable, Rebindable, Entity, Group, Cluster, DynamicCluster, Changeable, AbstractGroup, Identifiable, Resizable

@Catalog(name="Apache Cassandra Database Cluster", description="Cassandra is a highly scalable, eventually " +
        "consistent, distributed, structured key-value store which provides a ColumnFamily-based data model " +
        "richer than typical key/value systems", iconUrl="classpath:///cassandra-logo.jpeg")
@ImplementedBy(CassandraClusterImpl.class)
public interface CassandraCluster
extends DynamicCluster

A cluster of CassandraNodes based on DynamicCluster which can be resized by a policy if required.

Note that due to how Cassandra assumes ports are the same across a cluster, it is NOT possible to deploy a cluster to localhost.


Field Summary
BasicAttributeSensorAndConfigKey CLUSTER_NAME

AttributeSensor CURRENT_SEEDS

AttributeSensor DATACENTERS

AttributeSensor DATACENTER_USAGE

int DEFAULT_SEED_QUORUM

Sets the number of nodes used to seed the cluster.

Duration DELAY_AFTER_FIRST

Can insert a delay after the first node comes up.

ConfigKey DELAY_BEFORE_ADVERTISING_CLUSTER

Additional time after the nodes in the cluster are up when starting before announcing the cluster as up.

ConfigKey ENDPOINT_SNITCH_NAME

AttributeSensor FIRST_NODE_STARTED_TIME_UTC

AttributeSensor HAS_PUBLISHED_SEEDS

AttributeSensor HOSTNAME

AttributeSensor PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE

AttributeSensor PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE

AttributeSensor READS_PER_SECOND_IN_WINDOW_PER_NODE

AttributeSensor READS_PER_SECOND_LAST_PER_NODE

AttributeSensor READ_ACTIVE

AttributeSensor READ_PENDING

AttributeSensor SCHEMA_VERSION_COUNT

ConfigKey SEED_SUPPLIER

AttributeSensor THRIFT_PORT

AttributeSensor THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE

AttributeSensor THRIFT_PORT_LATENCY_PER_NODE

MethodEffector UPDATE

boolean WAIT_FOR_FIRST

Whether to wait for the first node to start up

AttributeSensor WRITES_PER_SECOND_IN_WINDOW_PER_NODE

AttributeSensor WRITES_PER_SECOND_LAST_PER_NODE

AttributeSensor WRITE_ACTIVE

AttributeSensor WRITE_PENDING

 
Fields inherited from interface DynamicCluster
AVAILABILITY_ZONE_NAMES, CUSTOM_CHILD_FLAGS, ENABLE_AVAILABILITY_ZONES, ENTITY_QUARANTINED, FACTORY, FAILED_SUB_LOCATIONS, INITIAL_QUORUM_SIZE, MEMBER_SPEC, NUM_AVAILABILITY_ZONES, QUARANTINE_FAILED_ENTITIES, QUARANTINE_GROUP, REMOVAL_STRATEGY, REPLACE_MEMBER, SERVICE_STATE, SUB_LOCATIONS, ZONE_FAILURE_DETECTOR, ZONE_PLACEMENT_STRATEGY
 
Fields inherited from interface Cluster
INITIAL_SIZE
 
Fields inherited from interface Changeable
GROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVED
 
Method Summary
java.util.Set gatherPotentialRunningSeeds()

java.util.Set gatherPotentialSeeds()

java.lang.String getClusterName()

The name of the cluster.

void update()

 
Methods inherited from interface DynamicCluster
replaceMember, setFactory, setMemberSpec, setRemovalStrategy, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategy
 
Methods inherited from interface AbstractGroup
setMembers, setMembers
 
Methods inherited from interface Entity
addChild, addChild, addEnricher, addGroup, addPolicy, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removePolicy, setParent
 
Methods inherited from interface Identifiable
getId
 
Methods inherited from interface Rebindable
getRebindSupport
 

Field Detail

CLUSTER_NAME

@SetFromFlag("clusterName")
public BasicAttributeSensorAndConfigKey CLUSTER_NAME


CURRENT_SEEDS

@SuppressWarnings("serial")
public AttributeSensor CURRENT_SEEDS


DATACENTERS

@SuppressWarnings("serial")
public AttributeSensor DATACENTERS


DATACENTER_USAGE

@SuppressWarnings("serial")
public AttributeSensor DATACENTER_USAGE


DEFAULT_SEED_QUORUM

public int DEFAULT_SEED_QUORUM
Sets the number of nodes used to seed the cluster.

Version 1.2.2 is buggy and requires a big delay for 2 nodes both seeds to reconcile, with 1.2.9 this seems fine, with just a few seconds' delay after starting.

See Also:


DELAY_AFTER_FIRST

public Duration DELAY_AFTER_FIRST
Can insert a delay after the first node comes up.

Not needed with 1.2.9 (and does not help with the bug in 1.2.2)


DELAY_BEFORE_ADVERTISING_CLUSTER

@SetFromFlag("delayBeforeAdvertisingCluster")
public ConfigKey DELAY_BEFORE_ADVERTISING_CLUSTER
Additional time after the nodes in the cluster are up when starting before announcing the cluster as up.

Useful to ensure nodes have synchronized.

On 1.2.2 this could be as much as 120s when using 2 seed nodes, or just a few seconds with 1 seed node. On 1.2.9 it seems a few seconds is sufficient even with 2 seed nodes


ENDPOINT_SNITCH_NAME

@SetFromFlag("snitchName")
public ConfigKey ENDPOINT_SNITCH_NAME


FIRST_NODE_STARTED_TIME_UTC

public AttributeSensor FIRST_NODE_STARTED_TIME_UTC


HAS_PUBLISHED_SEEDS

public AttributeSensor HAS_PUBLISHED_SEEDS


HOSTNAME

public AttributeSensor HOSTNAME


PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE

public AttributeSensor PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE


PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE

public AttributeSensor PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE


READS_PER_SECOND_IN_WINDOW_PER_NODE

public AttributeSensor READS_PER_SECOND_IN_WINDOW_PER_NODE


READS_PER_SECOND_LAST_PER_NODE

public AttributeSensor READS_PER_SECOND_LAST_PER_NODE


READ_ACTIVE

public AttributeSensor READ_ACTIVE


READ_PENDING

public AttributeSensor READ_PENDING


SCHEMA_VERSION_COUNT

public AttributeSensor SCHEMA_VERSION_COUNT


SEED_SUPPLIER

@SetFromFlag("seedSupplier")
@SuppressWarnings("serial")
public ConfigKey SEED_SUPPLIER


THRIFT_PORT

public AttributeSensor THRIFT_PORT


THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE

public AttributeSensor THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE


THRIFT_PORT_LATENCY_PER_NODE

public AttributeSensor THRIFT_PORT_LATENCY_PER_NODE


UPDATE

public MethodEffector UPDATE


WAIT_FOR_FIRST

public boolean WAIT_FOR_FIRST
Whether to wait for the first node to start up

not sure whether this is needed or not. Need to test in env where not all nodes are seed nodes, what happens if non-seed nodes start before the seed nodes?


WRITES_PER_SECOND_IN_WINDOW_PER_NODE

public AttributeSensor WRITES_PER_SECOND_IN_WINDOW_PER_NODE


WRITES_PER_SECOND_LAST_PER_NODE

public AttributeSensor WRITES_PER_SECOND_LAST_PER_NODE


WRITE_ACTIVE

public AttributeSensor WRITE_ACTIVE


WRITE_PENDING

public AttributeSensor WRITE_PENDING


 
Method Detail

gatherPotentialRunningSeeds

public java.util.Set gatherPotentialRunningSeeds()


gatherPotentialSeeds

public java.util.Set gatherPotentialSeeds()


getClusterName

public java.lang.String getClusterName()
The name of the cluster.


update

@Effector(description="Updates the cluster members")
public void update()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.