public class MigrationManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MigrationManager.MigrationsSerializer |
Modifier and Type | Field and Description |
---|---|
static MigrationManager |
instance |
Modifier and Type | Method and Description |
---|---|
static void |
announce(java.util.Collection<Mutation> schema) |
static void |
announce(Mutation change) |
static Keyspaces.KeyspacesDiff |
announce(SchemaTransformation transformation,
boolean locally) |
static void |
announceNewKeyspace(KeyspaceMetadata ksm) |
static void |
announceNewKeyspace(KeyspaceMetadata ksm,
boolean announceLocally) |
static void |
announceNewKeyspace(KeyspaceMetadata ksm,
long timestamp,
boolean announceLocally) |
static void |
announceNewTable(TableMetadata cfm) |
static void |
announceTableDrop(java.lang.String ksName,
java.lang.String cfName,
boolean announceLocally) |
static void |
announceTableUpdate(TableMetadata tm) |
static void |
announceTableUpdate(TableMetadata updated,
boolean announceLocally) |
static java.util.Optional<Mutation> |
evolveSystemKeyspace(KeyspaceMetadata keyspace,
long generation)
We have a set of non-local, distributed system keyspaces, e.g.
|
static void |
forceAnnounceNewTable(TableMetadata cfm)
Announces the table even if the definition is already know locally.
|
static boolean |
isReadyForBootstrap() |
static void |
resetLocalSchema()
Clear all locally stored schema information and reset schema to initial state.
|
static void |
scheduleSchemaPull(InetAddressAndPort endpoint,
EndpointState state) |
static void |
setUptimeFn(java.util.function.LongSupplier supplier) |
static void |
waitUntilReadyForBootstrap() |
public static final MigrationManager instance
public static void setUptimeFn(java.util.function.LongSupplier supplier)
public static void scheduleSchemaPull(InetAddressAndPort endpoint, EndpointState state)
public static boolean isReadyForBootstrap()
public static void waitUntilReadyForBootstrap()
public static void announceNewKeyspace(KeyspaceMetadata ksm) throws ConfigurationException
ConfigurationException
public static void announceNewKeyspace(KeyspaceMetadata ksm, boolean announceLocally) throws ConfigurationException
ConfigurationException
public static void announceNewKeyspace(KeyspaceMetadata ksm, long timestamp, boolean announceLocally) throws ConfigurationException
ConfigurationException
public static void announceNewTable(TableMetadata cfm)
public static void forceAnnounceNewTable(TableMetadata cfm)
public static void announceTableUpdate(TableMetadata tm)
public static void announceTableUpdate(TableMetadata updated, boolean announceLocally)
public static void announceTableDrop(java.lang.String ksName, java.lang.String cfName, boolean announceLocally)
public static void announce(Mutation change)
public static void announce(java.util.Collection<Mutation> schema)
public static Keyspaces.KeyspacesDiff announce(SchemaTransformation transformation, boolean locally)
public static void resetLocalSchema()
public static java.util.Optional<Mutation> evolveSystemKeyspace(KeyspaceMetadata keyspace, long generation)
SchemaConstants.REPLICATED_SYSTEM_KEYSPACE_NAMES
), that need to be created on cluster initialisation,
and later evolved on major upgrades (sometimes minor too). This method compares the current known definitions
of the tables (if the keyspace exists) to the expected, most modern ones expected by the running version of C*;
if any changes have been detected, a schema Mutation will be created which, when applied, should make
cluster's view of that keyspace aligned with the expected modern definition.keyspace
- the expected modern definition of the keyspacegeneration
- timestamp to use for the table changes in the schema mutationCopyright © 2009-2020 The Apache Software Foundation