public class CassandraDatacenterImpl extends DynamicClusterImpl implements CassandraDatacenter
CassandraDatacenter.
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)
| Modifier and Type | Class and Description |
|---|---|
static class |
CassandraDatacenterImpl.MemberTrackingPolicy |
DynamicCluster.NodePlacementStrategy, DynamicCluster.ZoneFailureDetectorBrooklynObject.TagSupportConfigurable.ConfigurationSupportStartable.RestartEffectorBody, Startable.StartEffectorBody, Startable.StopEffectorBodyEntityInternal.FeedSupportBrooklynObjectInternal.ConfigurationSupportInternalCHILD_ADDED, CHILD_REMOVED, EFFECTOR_ADDED, EFFECTOR_CHANGED, EFFECTOR_REMOVED, LOCATION_ADDED, LOCATION_REMOVED, POLICY_ADDED, POLICY_REMOVED, SENSOR_ADDED, SENSOR_REMOVEDCASSANDRA_CLUSTER_NODES, CLUSTER_NAME, CURRENT_SEEDS, DATACENTER_USAGE, DATACENTERS, DEFAULT_SEED_QUORUM, DELAY_AFTER_FIRST, DELAY_BEFORE_ADVERTISING_CLUSTER, DELAY_BETWEEN_STARTS, ENDPOINT_SNITCH_NAME, EXECUTE_SCRIPT, FIRST_NODE_STARTED_TIME_UTC, HAS_PUBLISHED_SEEDS, HOSTNAME, NUM_TOKENS_PER_NODE, PROCESS_CPU_TIME_FRACTION_IN_WINDOW_PER_NODE, PROCESS_CPU_TIME_FRACTION_LAST_PER_NODE, QUEUED_START_NODES, READ_ACTIVE, READ_PENDING, READS_PER_SECOND_IN_WINDOW_PER_NODE, READS_PER_SECOND_LAST_PER_NODE, SCHEMA_VERSION_COUNT, SEED_SUPPLIER, THRIFT_PORT, THRIFT_PORT_LATENCY_IN_WINDOW_PER_NODE, THRIFT_PORT_LATENCY_PER_NODE, TOKEN_GENERATOR_CLASS, TOKEN_SHIFT, UPDATE, USE_VNODES, WAIT_FOR_FIRST, WRITE_ACTIVE, WRITE_PENDING, WRITES_PER_SECOND_IN_WINDOW_PER_NODE, WRITES_PER_SECOND_LAST_PER_NODEAVAILABILITY_ZONE_NAMES, CLUSTER, CLUSTER_MEMBER, CUSTOM_CHILD_FLAGS, ENABLE_AVAILABILITY_ZONES, ENTITY_QUARANTINED, FACTORY, FAILED_SUB_LOCATIONS, FIRST_MEMBER_SPEC, INITIAL_QUORUM_SIZE, MEMBER_SPEC, NUM_AVAILABILITY_ZONES, QUARANTINE_FAILED_ENTITIES, QUARANTINE_GROUP, REMOVAL_STRATEGY, RESIZE_BY_DELTA, SERVICE_STATE_ACTUAL, SUB_LOCATIONS, ZONE_FAILURE_DETECTOR, ZONE_PLACEMENT_STRATEGYFIRST, FIRST_MEMBER, GROUP_MEMBERS, MEMBER_DELEGATE_CHILDREN, MEMBER_DELEGATE_NAME_FORMAT, RUNNING_QUORUM_CHECK, UP_QUORUM_CHECKGROUP_SIZE, MEMBER_ADDED, MEMBER_REMOVEDINITIAL_SIZERESTART, SERVICE_UP, START, STOPREPLACE_MEMBERDATASTORE_URL| Constructor and Description |
|---|
CassandraDatacenterImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
executeScript(java.lang.String commands) |
java.util.Set<Entity> |
gatherPotentialRunningSeeds() |
java.util.Set<Entity> |
gatherPotentialSeeds() |
java.lang.String |
getClusterName()
The name of the cluster.
|
java.util.Collection<Entity> |
grow(int delta)
Note for sub-clases; this method can be called while synchronized on
DynamicClusterImpl.mutex. |
void |
init()
Default entity initialization, just calls
AbstractEntity.initEnrichers(). |
void |
start(java.util.Collection<? extends Location> locations)
Start the entity in the given collection of locations.
|
void |
stop()
Stop the entity.
|
void |
update() |
addNode, removeChild, replaceMember, resize, resizeByDelta, restart, setFactory, setMemberSpec, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategyaddMember, addMemberChild, addMemberChild, addMemberInternal, getCurrentSize, getMembers, hasMember, removeMember, setManagementContext, setMembers, setMembersaddChild, addChild, addEnricher, addEnricher, addFeed, addGroup, addLocations, addPolicy, addPolicy, addTag, clearLocations, clearParent, config, configure, configure, configure, configure, configure, containsTag, destroy, emit, emitInternal, equals, feeds, firstLocation, getAllAttributes, getAllConfig, getAllConfigBag, getApplication, getApplicationId, getAttribute, getAttributeByNameParts, getChildren, getConfig, getConfig, getConfig, getConfig, getConfigMap, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEffector, getEnrichers, getEntityType, getExecutionContext, getFeedSupport, getGroups, getIconUrl, getLocalConfigBag, getLocations, getManagementContext, getManagementSupport, getMutableEntityType, getParent, getPolicies, getProxy, getProxyIfAvailable, getRebindSupport, getSubscriptionContext, getTags, hashCode, invalidateReferences, invoke, invoke, invoke, modifyAttribute, onManagementBecomingMaster, onManagementNoLongerMaster, onManagementStarted, onManagementStarting, onManagementStopped, refreshInheritedConfig, removeAllEnrichers, removeAllPolicies, removeAttribute, removeEnricher, removeGroup, removeLocations, removePolicy, removeTag, requestPersist, resetProxy, setAttribute, setAttribute, setAttributeWithoutPublishing, setConfig, setConfig, setConfig, setConfig, setConfig, setConfig, setConfigEvenIfOwned, setConfigEvenIfOwned, setDisplayName, setParent, setProxy, subscribe, subscribeToChildren, subscribeToMembers, toMetadataRecord, toString, unsubscribe, unsubscribegetCatalogItemId, getId, getTagSupport, rebind, setCatalogItemId, tagsaddNode, resizeByDelta, setFactory, setMemberSpec, setRemovalStrategy, setZoneFailureDetector, setZonePlacementStrategysetMembers, setMembersaddChild, addChild, addMember, addMemberChild, addMemberChild, getCurrentSize, getMembers, hasMember, removeMemberaddEnricher, addEnricher, addFeed, addGroup, addPolicy, addPolicy, addTag, clearParent, containsTag, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getConfig, getConfigRaw, getConfigRaw, getCreationTime, getDisplayName, getEnrichers, getEntityType, getGroups, getIconUrl, getId, getLocations, getParent, getPolicies, getTags, invoke, removeChild, removeEnricher, removeGroup, removePolicy, removeTag, setParentgetCatalogItemId, getTagSupport, tagsconfig, setConfiggetCurrentSize, resizereplaceMembersetCatalogItemIdpublic void init()
AbstractEntityAbstractEntity.initEnrichers().init in class DynamicClusterImplpublic java.util.Set<Entity> gatherPotentialSeeds()
gatherPotentialSeeds in interface CassandraDatacenterpublic java.util.Set<Entity> gatherPotentialRunningSeeds()
gatherPotentialRunningSeeds in interface CassandraDatacenterpublic java.lang.String getClusterName()
CassandraDatacentergetClusterName in interface CassandraDatacenterpublic java.util.Collection<Entity> grow(int delta)
DynamicClusterImplDynamicClusterImpl.mutex.public void start(java.util.Collection<? extends Location> locations)
Startable
Some entities may define custom Effector implementations which support
a richer set of parameters. See the entity-specific Startable.START effector declaration.
start in interface Startablestart in class DynamicClusterImplpublic void stop()
Startable
Some entities may define custom Effector implementations which support
a richer set of parameters. See the entity-specific Startable.STOP effector declaration.
stop in interface Startablestop in class DynamicClusterImplpublic void update()
update in interface CassandraDatacenterpublic java.lang.String executeScript(java.lang.String commands)
executeScript in interface CassandraDatacenter