Package org.apache.hadoop.hbase.client
Class CheckAndMutate.Builder
java.lang.Object
org.apache.hadoop.hbase.client.CheckAndMutate.Builder
- Enclosing class:
- CheckAndMutate
A builder class for building a CheckAndMutate object.
-
Method Summary
Modifier and TypeMethodDescriptionbuild(org.apache.hadoop.hbase.client.Append append) Build the CheckAndMutate object with an Append to commit if the check succeeds.build(org.apache.hadoop.hbase.client.Delete delete) Build the CheckAndMutate objectbuild(org.apache.hadoop.hbase.client.Increment increment) Build the CheckAndMutate object with an Increment to commit if the check succeeds.build(org.apache.hadoop.hbase.client.Put put) Build the CheckAndMutate objectbuild(org.apache.hadoop.hbase.client.RowMutations mutations) Build the CheckAndMutate object with a RowMutations to commit if the check succeeds.ifEquals(byte[] family, byte[] qualifier, byte[] value) Check for equalityifMatches(byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value) Check for matchifMatches(org.apache.hadoop.hbase.filter.Filter filter) Check for matchifNotExists(byte[] family, byte[] qualifier) Check for lack of columnqueryMetricsEnabled(boolean queryMetricsEnabled) Enables the return ofQueryMetricsalongside the corresponding result for this querytimeRange(org.apache.hadoop.hbase.io.TimeRange timeRange) Specify a timerange
-
Method Details
-
ifNotExists
Check for lack of column- Parameters:
family- family to checkqualifier- qualifier to check- Returns:
- the CheckAndMutate object
-
ifEquals
Check for equality- Parameters:
family- family to checkqualifier- qualifier to checkvalue- the expected value- Returns:
- the CheckAndMutate object
-
ifMatches
public CheckAndMutate.Builder ifMatches(byte[] family, byte[] qualifier, org.apache.hadoop.hbase.CompareOperator compareOp, byte[] value) Check for match- Parameters:
family- family to checkqualifier- qualifier to checkcompareOp- comparison operator to usevalue- the expected value- Returns:
- the CheckAndMutate object
-
ifMatches
Check for match- Parameters:
filter- filter to check- Returns:
- the CheckAndMutate object
-
timeRange
Specify a timerange- Parameters:
timeRange- time range to check- Returns:
- the CheckAndMutate object
-
queryMetricsEnabled
Enables the return ofQueryMetricsalongside the corresponding result for this queryThis is intended for advanced users who need result-granular, server-side metrics
Does not work
- Parameters:
queryMetricsEnabled-trueto enable collection of per-result query metricsfalseto disable metrics collection (resulting innullmetrics)
-
build
Build the CheckAndMutate object- Parameters:
put- data to put if check succeeds- Returns:
- a CheckAndMutate object
-
build
Build the CheckAndMutate object- Parameters:
delete- data to delete if check succeeds- Returns:
- a CheckAndMutate object
-
build
Build the CheckAndMutate object with an Increment to commit if the check succeeds.- Parameters:
increment- data to increment if check succeeds- Returns:
- a CheckAndMutate object
-
build
Build the CheckAndMutate object with an Append to commit if the check succeeds.- Parameters:
append- data to append if check succeeds- Returns:
- a CheckAndMutate object
-
build
Build the CheckAndMutate object with a RowMutations to commit if the check succeeds.- Parameters:
mutations- mutations to perform if check succeeds- Returns:
- a CheckAndMutate object
-