Skip to content

Instantly share code, notes, and snippets.

@okram
Created February 26, 2014 20:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save okram/9237525 to your computer and use it in GitHub Desktop.
private SliceRange getSliceRange(final VertexQueryFilter inputFilter, final int limit) {
final SliceQuery slice = TitanInputFormat.inputSlice(inputFilter, this.graph);
final SliceRange sliceRange = new SliceRange();
sliceRange.setStart(slice.getSliceStart().asByteBuffer());
sliceRange.setFinish(slice.getSliceEnd().asByteBuffer());
sliceRange.setCount(Math.min(limit, slice.getLimit()));
return sliceRange;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment