I am keeping a counter in bigtable, and want to put some data in when the counter reaches X. I am Currently doing it like this:
Put put = new Put(EXAMPLE_ROW_KEY);
put.addColumn(EXAMPLE_COLUMN_FAMILY, NEW_QUALIFIER, NEW_VALUE);
boolean success = table.checkAndPut(EXAMPLE_ROW_KEY,
INFO_COLUMN_FAMILY_NAME,
SIZE_COLUMN,
CompareFilter.CompareOp.LESS,
Bytes.toBytes(10000L), put);
The issue is, that success is always true and new value is always put, even though the size exceeds 10000L. I tried to use CompareFilter.CompareOp.GREATER_OR_EQUAL
with the exact same values and it was still true.
Is the checkAndPut not supported by bigtable, or am I doing something wrong?