Specifying Cassandra and graph settings

How to set Cassandra and graph settings for a graph.

Some DSE Graph options are set on a per-graph basis. The settings are modified and read using either System or Schema API calls in the Gremlin console. These option values are stored in Cassandra tables and are not set in the dse.yaml file. See the DSE Graph reference for a complete list of available options. Other settings for DSE Graph are also in the dse.yaml file.


Most per-graph options are set using the Schema API.

  • Check all non-default values of configuration settings.
    graph.tx_groups.default.write_consistency: ALL
    graph.tx_groups.default.read_consistency: QUORUM
  • Check the values of a specific setting.
  • Set the value of a configuration setting.
  • To retrieve all traversal sources that have been set, use the get() command with the traversal source type option:
  • Set the maximum time to wait for a traversal to evaluate:
    Note: The dse.yaml file has settings realtime_evaluation_timeout_in_seconds and analytic_evaluation_timeout_in_minutes that determine the timeout value used depending on whether the query is an OLTP or OLAP query, respectively. The command shown above using evaluation_timeoutwill override any system level setting for the traversal source g specified.

Some options must be set using the System API.

  • Settings can also be set while creating a new graph. For instance, replication for graph inherits Cassandra defaults, so the replication factor is set to 1 and the class is SimpleStrategy. As with Cassandra, the replication factor for graph should be set before adding data.
    gremlin>  system.graph('gizmo').
        replication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3 }").
  • Graph also creates a keyspace for storing graph variables in Cassandra tables. This keyspace holds essential information, so the replication factor should be set to something higher than one replica to ensure no loss.
    gremlin>  system.graph('gizmo').    
        replication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3 }").
        systemReplication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3 }").
  • Additional schema settings can be configured at graph creation.
      replication("{'class' : 'SimpleStrategy', 'replication_factor' : 1 }").
      systemReplication("{'class' : 'SimpleStrategy', 'replication_factor' : 1 }").
    More information can be found in the reference.

The Graph API is used to set some transaction settings.

  • The allow_scan option can be set at either a single graph level or as shown here, for all actions within a transaction made on a single node. This setting can be useful if a quorum cannot be mustered for writing the option change to the system table.
    graph.tx().config().option("allow_scan", true).open()