|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.migration.Migration
public abstract class Migration
A migration represents a single metadata mutation (cf dropped, added, etc.). There are two parts to a migration (think of it as a schema update): 1. data is written to the schema cf (SCHEMA_KEYSPACES_CF). 2. updated models are applied to the cassandra instance. Since all steps are not committed atomically, care should be taken to ensure that a node/cluster is reasonably quiescent with regard to the Keyspace or ColumnFamily whose schema is being modified.
Field Summary | |
---|---|
static java.nio.ByteBuffer |
LAST_MIGRATION_KEY
|
protected static org.slf4j.Logger |
logger
|
static java.lang.String |
MIGRATIONS_CF
|
static java.lang.String |
NAME_VALIDATOR_REGEX
|
static java.lang.String |
SCHEMA_CF
|
protected long |
timestamp
|
Method Summary | |
---|---|
void |
announce()
Send schema update (in form of row mutations) to alive nodes in the cluster. |
void |
apply()
|
protected abstract void |
applyImpl()
Class specific apply implementation where schema migration logic should be put |
static java.util.UUID |
getLastMigrationId()
Deprecated. |
static boolean |
isLegalName(java.lang.String s)
|
void |
passiveAnnounce()
Announce new schema version over Gossip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.slf4j.Logger logger
public static final java.lang.String NAME_VALIDATOR_REGEX
public static final java.lang.String MIGRATIONS_CF
public static final java.lang.String SCHEMA_CF
public static final java.nio.ByteBuffer LAST_MIGRATION_KEY
protected final long timestamp
Method Detail |
---|
public final void apply() throws ConfigurationException, java.io.IOException
ConfigurationException
java.io.IOException
protected abstract void applyImpl() throws ConfigurationException, java.io.IOException
java.io.IOException
- on any I/O related error.
ConfigurationException
- if there is object misconfiguration.public final void announce()
public final void passiveAnnounce()
@Deprecated public static java.util.UUID getLastMigrationId()
public static boolean isLegalName(java.lang.String s)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |