Brooklyn

brooklyn.entity.nosql.cassandra
[Java] Class CassandraClusterImpl

java.lang.Object
  brooklyn.entity.basic.AbstractEntity
      brooklyn.entity.basic.AbstractGroupImpl
          brooklyn.entity.group.DynamicClusterImpl
              brooklyn.entity.nosql.cassandra.CassandraClusterImpl
All Implemented Interfaces:
CassandraCluster

public class CassandraClusterImpl
extends DynamicClusterImpl

Implementation of CassandraCluster.

Several subtleties to note: - a node may take some time after it is running and serving JMX to actually be contactable on its thrift port (so we wait for thrift port to be contactable) - sometimes new nodes take a while to peer, and/or take a while to get a consistent schema (each up to 1m; often very close to the 1m)


Nested Class Summary
protected class CassandraClusterImpl.SeedTracker

For tracking our seeds.

 
Field Summary
protected CassandraClusterImpl.SeedTracker seedTracker

 
Fields inherited from class DynamicClusterImpl
mutex
 
Fields inherited from class AbstractEntity
EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOG, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVED, _subscriptionTracker, managementSupport, tempWorkings
 
Constructor Summary
CassandraClusterImpl()

 
Method Summary
protected void connectEnrichers()

protected void connectSensors()

protected void disconnectSensors()

java.util.Set gatherPotentialRunningSeeds()

Sets the default MEMBER_SPEC to describe the Cassandra nodes.

java.util.Set gatherPotentialSeeds()

java.lang.String getClusterName()

protected EntitySpec getMemberSpec()

protected int getQuorumSize()

protected Supplier getSeedSupplier()

void init()

void start(java.util.Collection locations)

void stop()

void update()

 
Methods inherited from class DynamicClusterImpl
addNode, addNode, calculateServiceUp, cleanupFailedNodes, createNode, createNode, discardNode, findSubLocations, getCustomChildFlags, getFactory, getInitialQuorumSize, getMemberSpec, getMembersByLocation, getNonFailedSubLocations, getQuarantineGroup, getRemovalStrategy, getZoneFailureDetector, getZonePlacementStrategy, grow, growByOne, init, isAvailabilityZoneEnabled, isQuarantineEnabled, pickAndRemoveMember, pickAndRemoveMembers, quarantineFailedNodes, removeChild, replaceMember, resize, restart, setFactory, setMemberSpec, setRemovalStrategy, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategy, shrink, start, stop, stopAndRemoveNode, waitForTasksOnEntityStart
 
Methods inherited from class AbstractGroupImpl
addMember, getCurrentSize, getMembers, hasMember, init, removeMember, setManagementContext, setMembers, setMembers
 
Methods inherited from class AbstractEntity
addChild, addChild, addEnricher, addGroup, addLocations, addPolicy, clearLocations, clearParent, configure, configure, configure, configure, configure, configure, destroy, emit, emitInternal, equals, finalize, firstLocation, getAllAttributes, getAllConfig, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityManager, getEntityType, getEntityTypeName, getExecutionContext, getGroups, getIconUrl, getId, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getSubscriptionTracker, hashCode, init, invalidateReferences, invoke, invoke, invoke, isLegacyConstruction, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeChild, removeEnricher, removeLocations, removePolicy, setApplication, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setConfigIfValNonNull, setConfigIfValNonNull, setDisplayName, setManagementContext, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, toStringHelper, unsubscribe, unsubscribe
 

Field Detail

seedTracker

protected CassandraClusterImpl.SeedTracker seedTracker


 
Constructor Detail

CassandraClusterImpl

public CassandraClusterImpl()


 
Method Detail

connectEnrichers

ImmutableList.of(CassandraNode.THRIFT_PORT_LATENCY_IN_WINDOW, THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE),
protected void connectEnrichers()


connectSensors

protected void connectSensors()


disconnectSensors

protected void disconnectSensors()


gatherPotentialRunningSeeds

protected EntitySpec getMemberSpec() {
public java.util.Set gatherPotentialRunningSeeds()
Sets the default MEMBER_SPEC to describe the Cassandra nodes.


gatherPotentialSeeds

public java.util.Set gatherPotentialSeeds()


getClusterName

public java.lang.String getClusterName()


getMemberSpec

protected EntitySpec getMemberSpec()


getQuorumSize

protected int getQuorumSize()


getSeedSupplier

protected Supplier getSeedSupplier()


init

*/
public void init()


start

// TODO wait until all nodes which we think are up are consistent
public void start(java.util.Collection locations)


stop

public void stop()


update

setAttribute(THRIFT_PORT, null);
public void update()


 

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