use of org.apache.hadoop.hbase.client.Increment in project metron by apache.
the class HBaseClient method createIncrement.
/**
* Creates an HBase Increment for a counter.
*
* @param rowKey The row key.
* @param cols The columns to include.
* @param durability The durability of the increment.
*/
private Increment createIncrement(byte[] rowKey, ColumnList cols, Durability durability) {
Increment inc = new Increment(rowKey);
inc.setDurability(durability);
cols.getCounters().forEach(cnt -> inc.addColumn(cnt.getFamily(), cnt.getQualifier(), cnt.getIncrement()));
return inc;
}
Aggregations