Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public static void selectSingleKeyWithAllColumns(Cassandra.Client client, String key) {
  2. try {
  3. SlicePredicate slicePredicate = new SlicePredicate();
  4. SliceRange sliceRange = new SliceRange();
  5. sliceRange.setStart(new byte[] {});
  6. sliceRange.setFinish(new byte[] {});
  7. slicePredicate.setSlice_range(sliceRange);
  8.  
  9. ColumnParent columnParent = new ColumnParent(COLUMN_FAMILY_NM_SECURITY);
  10. List<ColumnOrSuperColumn> result = client.get_slice(KEYSPACE, key, columnParent, slicePredicate, ConsistencyLevel.ONE);
  11.  
  12. printToConsole(key, result);
  13. } catch (Exception exception) {
  14. exception.printStackTrace();
  15. }
  16. }
Add Comment
Please, Sign In to add comment