title: Pagination in Janusgraph - how do I implement traversal.next(pagesize) in Java
body: <p>Environment: Janusgraph 0.3.3 cql-es, tinkergraph 3.3.3, gremlin driver 3.3.3 with remote websocket connection and following advice from stephen mallette:
  <a href="https://stackoverflow.com/questions/39826983/how-to-perform-pagination-in-gremlin">How to perform pagination in Gremlin</a></p>
  
  <p><strong>Following works in gremlin console:</strong></p>
  
  <pre><code>t = g.V().hasLabel('V_USER').has('v_UserName',textContains('Frank'));[] 
  t.next(1)
  </code></pre>
  
  <p><strong>However in Java the graph traversal next operation does not return vertices</strong></p>
  
  <pre><code>GraphTraversal&lt;Vertex,Vertex&gt; t = 
       g.V().hasLabel("V_USER").has("v_UserName","textContains('Frank')");
  List&lt;Vertex&gt; vl = t.next(10) // returns null
  </code></pre>
  
  <p><strong>The GraphTraversal variable t in debug appears as follows:</strong></p>
  
  <pre><code>[GraphStep(vertex,[]), HasStep([~label.eq(V_USER), 
       v_UserName.eq(textContains('Frank')))])]
  </code></pre>
  
  <p>So I assume I need to do something other than append the .next() function but I cannot figure out what. Any assistance much appreciated.</p>