DataStax OpsCenter Documentation

Data modeling in OpsCenter

In the Data Modeling area of OpsCenter, you can:

Keyspace operations

Selecting the Data Modeling area in the OpsCenter console lists the keyspaces in the cluster that you are monitoring. You can create a new keyspace or manage keyspaces.

When you create a keyspace, you give it a name, choose a replica placement strategy, the total number of replicas you want, and how those replicas are divided across your data centers (if you have a multiple data center cluster).

Creating a keyspace

To create a new keyspace:

  1. Select Schema in the OpsCenter console.
  2. Select Add in the Schema section of OpsCenter.
  3. Give the keyspace a name. Keyspace names should not contain spaces or special characters or exceed the filename size limit of your operating system (for example, 255 bytes on most Linux file systems). Keyspace names are case sensitive.
  4. Set the replica placement strategy. The replica placement strategy (along with the cluster-configured snitch) determines how replicas are placed on nodes throughout the cluster. Use one of three built-in replica placement strategies:
    • SimpleStrategy - Single data center, rack unaware replica placement. This is the default strategy.
    • NetworkTopologyStrategy - Single or multiple data center, rack aware replica placement. This is the recommended strategy.
    • OldNetworkTopologyStrategy - Two data centers only, rack aware replica placement. This strategy is deprecated.
  5. Choose how many total copies that you want of your keyspace data (replication factor). The NetworkTopologyStrategy requires you to configure how many replicas you want per data center. The data center name you enter should match the data center name used by your cluster-configured snitch. Make sure to name the data center(s) correctly according to your snitch configuration.
  6. If you do not want to start defining column families within your new keyspace right away, uncheck the I would like to create a Column Family checkbox.
  7. Click Save Keyspace.

Managing keyspaces

To manage keyspaces:

  1. Select Schema in the OpsCenter console.

  2. From the list of keyspaces, select one of the keyspaces.

    In Keyspace Settings, the replica placement strategy options for the keyspace appear.

  3. From the list of column families (below Settings), select a column family to view its properties and to view or change performance tuning metrics.

  4. Click Add in the Column Family to add a column family to the keyspace.

  5. Click Delete to delete the keyspace.

Column family management

When you create a column family in Cassandra using an application, the CLI, or CQL 2 or earlier, the column family appears in OpsCenter. You can use Schema to manage the column family.

You can also create one type of column family: the dynamic column family. Dynamic column families are those that do not specify column names or values when the column family is created. An application typically supplies this metadata. CQL 3, the default query language in Cassandra, does not support dynamic column families. Earlier versions of CQL and the CLI support dynamic column families.

This version of OpsCenter does not support defining static column families (per-column meta data), row key data types, or schema information for super column sub-columns described in Cassandra 1.0, or earlier, documentation on http://www.datastax.com.

Creating a dynamic column family

To create a new dynamic column family:

  1. Select Schema in the OpsCenter console.

  2. From the list of keyspaces, select the keyspace to contain the column family.

  3. Give the column family a name.

    Column family names should not contain spaces or special characters and cannot exceed the filename size limit of your operating system (255 bytes on most Linux file systems).

    By default, column families are created with standard columns (column_type: Standard). If you want a column family containing super columns choose column_type: Super.

  4. Use compare_with to set the default data type for column names (or super column names).

    Setting the default data type also sets the column sort order for the column family. For example, choosing LongType would sort the columns within a row in numerical order. The sort order cannot be changed after a column family is created, so choose wisely.

  5. Use default_validation_class to set the default data type for column values (or super column sub-column values). Always set this for dynamic column families.

  6. Click Save Column Family.

Managing column families

To manage column families:

  1. Select Schema in the OpsCenter console.

  2. From the list of keyspaces, select a keyspace.

    The #CFs columns shows how many column families each keyspace contains.

  3. From the list of the column families, select a column family. Click one of the following buttons:

    • Add

      See above.

    • Delete

      Completely removes the column family from the keyspace. You may select more than one column family in a keyspace to delete.

    • View Metrics

      Presents metrics for a column family. In the Metric Options dialog, select a column family (CF) metric to view. To aggregate measurements across the entire cluster, all nodes in the data center, or in a particular node, select Cluster Wide, All Nodes, or the IP address of a node. At this point, you can add a graph of the measurements to the Performance Metrics area, or choose a different column family to measure.

    • Truncate

      Deletes all data from the column family but does not delete the column family itself. Removal of the data is irreversible.

  4. When you select a column family, you see a list of manageable attributes: Properties (fully editable), Metadata (Add or Delete), and Secondary Indexes (Add or Delete).