Package

org.elevans.migration

cassandra

Permalink

package cassandra

Visibility
  1. Public
  2. All

Type Members

  1. trait CassandraSchema extends AnyRef

    Permalink

    Represents a group of related Cassandra objects that are migrated together.

    Represents a group of related Cassandra objects that are migrated together.

    Author:

    Eric Evans

  2. class CqlMigrator extends MigrationGraph[ResourceTransition] with LazyLogging

    Permalink

    This utility can be used to:

    This utility can be used to:

    • access the CQL scripts that create and modify Cassandra objects (e.g., column families, etc.) for some "scope".
    • parse developer-supplied metadata from comments in these CQL scripts (each of which implements a single Transition from one "state" to another) to determine the sequence of scripts (or "path") that must be executed to migrate the scope to a given target state from its current state.
    • execute the CQL scripts in a given path, sequentially.
    • maintain a persistent copy of the scope's current state for use in subsequent future migrations.

    NOTE: The optional 'alternateCurrentStateKeySpace' may be given to specify where the scope's current state tracking data should be stored. It defaults to None, in which case this data is stored in the Session's keyspace. A common case would be accept the default and to ensure that none of the CQL migration scripts attempt to change the Session's keyspace (e.g., via a 'USE' statement). In that case the scope's current state data will be stored in the same keyspace all of its other data. However, you may optionally provide an explicit 'alternateCurrentStateKeySpace' if for some reason you do not want the current state stored in the Session's keyspace (e.g., if some of the CQL scripts do change the Session's keyspace via 'USE' statements).

    Author:

    Eric Evans

Value Members

  1. object CoreCassandraSchema extends CassandraSchema

    Permalink
  2. object CqlMigrator

    Permalink
  3. object CqlUtils

    Permalink

    Utilities for working with CQL files.

    Utilities for working with CQL files.

    Author:

    Eric Evans

Ungrouped