Search in sources :

Example 16 with MultiMutation

use of org.apache.phoenix.hbase.index.MultiMutation in project phoenix by apache.

the class NonTxIndexBuilderTest method getMultipleVersionMutation.

private MultiMutation getMultipleVersionMutation(int versions) {
    MultiMutation mutation = new MultiMutation(new ImmutableBytesPtr(ROW));
    for (int i = versions - 1; i >= 0; i--) {
        Put put = new Put(ROW);
        put.addImmutable(FAM, INDEXED_QUALIFIER, i, Bytes.toBytes(i));
        mutation.addAll(put);
    }
    return mutation;
}
Also used : MultiMutation(org.apache.phoenix.hbase.index.MultiMutation) ImmutableBytesPtr(org.apache.phoenix.hbase.index.util.ImmutableBytesPtr) Put(org.apache.hadoop.hbase.client.Put)

Aggregations

MultiMutation (org.apache.phoenix.hbase.index.MultiMutation)16 ImmutableBytesPtr (org.apache.phoenix.hbase.index.util.ImmutableBytesPtr)12 Mutation (org.apache.hadoop.hbase.client.Mutation)8 Pair (org.apache.hadoop.hbase.util.Pair)8 Put (org.apache.hadoop.hbase.client.Put)6 ColumnReference (org.apache.phoenix.hbase.index.covered.update.ColumnReference)6 BaseConnectionlessQueryTest (org.apache.phoenix.query.BaseConnectionlessQueryTest)6 Test (org.junit.Test)6 Cell (org.apache.hadoop.hbase.Cell)4 Result (org.apache.hadoop.hbase.client.Result)4 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 ResultScanner (org.apache.hadoop.hbase.client.ResultScanner)2 Scan (org.apache.hadoop.hbase.client.Scan)2 ScanRanges (org.apache.phoenix.compile.ScanRanges)2 SkipScanFilter (org.apache.phoenix.filter.SkipScanFilter)2 IndexMaintainer (org.apache.phoenix.index.IndexMaintainer)2 KeyRange (org.apache.phoenix.query.KeyRange)2 TableName (org.apache.hadoop.hbase.TableName)1 HTableInterface (org.apache.hadoop.hbase.client.HTableInterface)1