barrier

Causes all steps prior to the barrier step to be executed before moving onto additional steps.

Synopsis

barrier()

Description

The barrier() step is a bulk optimizing step that can create a single traverser for a repeated step.

Examples

Repeat this traversal with the barrier() step and then without, to see the effect the barrier step has on the operation. The basic query starts at a particular book, then traverses to the includedIn edges that point to that book to

g.V().has('book','bookId',1004).
  in('includedIn').
  in('includedIn').
  groupCount('x').
    by('name').
  barrier().
  project('a','b').
    by('name').
    by(select('x'))

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com