use of org.apache.cassandra.thrift.ColumnPath in project scale7-pelops by s7.
the class Selector method newColumnPath.
private static ColumnPath newColumnPath(String columnFamily, Bytes superColName, Bytes colName) {
ColumnPath path = new ColumnPath(columnFamily);
path.setSuper_column(nullSafeGet(superColName));
path.setColumn(nullSafeGet(colName));
return path;
}
use of org.apache.cassandra.thrift.ColumnPath in project scale7-pelops by s7.
the class RowDeletor method deleteRow.
/**
* Delete a row with a specified key from a specified column family. The function succeeds even if
* the row does not exist.
* @param columnFamily The column family from which to delete the row
* @param rowKey The key of the row
* @param cLevel The Cassandra consistency level to be used
* @throws PelopsException
*/
public void deleteRow(String columnFamily, final Bytes rowKey, final ConsistencyLevel cLevel) throws PelopsException {
final ColumnPath path = new ColumnPath(columnFamily);
IOperation<Void> operation = new IOperation<Void>() {
@Override
public Void execute(IPooledConnection conn) throws Exception {
conn.getAPI().remove(nullSafeGet(rowKey), path, timestamp, cLevel);
return null;
}
};
tryOperation(operation);
}
Aggregations