Ejemplo n.º 1
0
 public List<Column> get_slice_by_names(
     String table,
     String key,
     ColumnParent column_parent,
     List<byte[]> column_names,
     int consistency_level)
     throws InvalidRequestException, NotFoundException {
   if (logger.isDebugEnabled()) logger.debug("get_slice_by_names");
   ThriftValidation.validateColumnParent(table, column_parent);
   return getSlice(
       new SliceByNamesReadCommand(table, key, column_parent, column_names), consistency_level);
 }
Ejemplo n.º 2
0
  public List<Column> get_slice(
      String table,
      String key,
      ColumnParent column_parent,
      byte[] start,
      byte[] finish,
      boolean is_ascending,
      int count,
      int consistency_level)
      throws InvalidRequestException, NotFoundException {
    if (logger.isDebugEnabled()) logger.debug("get_slice_from");
    ThriftValidation.validateColumnParent(table, column_parent);
    // TODO support get_slice on super CFs
    if (count <= 0) throw new InvalidRequestException("get_slice requires positive count");

    return getSlice(
        new SliceFromReadCommand(table, key, column_parent, start, finish, is_ascending, count),
        consistency_level);
  }