Package org.apache.hadoop.hbase.client
Class RowMutations
java.lang.Object
org.apache.hadoop.hbase.client.RowMutations
- All Implemented Interfaces:
Comparable<Row>,Row
Performs multiple mutations atomically on a single row. The mutations are performed in the order
in which they were added.
We compare and equate mutations based off their row so be careful putting RowMutations into Sets or using them as keys in Maps.
-
Field Summary
FieldsFields inherited from interface org.apache.hadoop.hbase.client.Row
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionRowMutations(byte[] row) RowMutations(byte[] row, int initialCapacity) Create an atomic mutation for the specified row. -
Method Summary
Modifier and TypeMethodDescriptionAdd a list of mutationsvoidDeprecated.since 2.0 version and will be removed in 3.0 version.voidDeprecated.since 2.0 version and will be removed in 3.0 version.intDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0.booleanDeprecated.As of release 2.0.0, this will be removed in HBase 3.0.0.intReturns An unmodifiable list of the current mutations.byte[]getRow()Returns The row.inthashCode()Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0.static RowMutationsCreate aRowMutationswith the specified mutations.
-
Field Details
-
mutations
-
row
-
-
Constructor Details
-
RowMutations
-
RowMutations
Create an atomic mutation for the specified row.- Parameters:
row- row keyinitialCapacity- the initial capacity of the RowMutations
-
-
Method Details
-
of
Create aRowMutationswith the specified mutations.- Parameters:
mutations- the mutations to send- Throws:
IOException- if any row in mutations is different to another
-
add
Deprecated.since 2.0 version and will be removed in 3.0 version. useadd(Mutation)Add aPutoperation to the list of mutations- Parameters:
p- ThePutto add- Throws:
IOException- if the row of added mutation doesn't match the original row
-
add
Deprecated.since 2.0 version and will be removed in 3.0 version. useadd(Mutation)Add aDeleteoperation to the list of mutations- Parameters:
d- TheDeleteto add- Throws:
IOException- if the row of added mutation doesn't match the original row
-
add
- Parameters:
mutation- The data to send.- Throws:
IOException- if the row of added mutation doesn't match the original row
-
add
Add a list of mutations- Parameters:
mutations- The data to send.- Throws:
IOException- if the row of added mutation doesn't match the original row
-
compareTo
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. UseRow.COMPARATORinsteadDescription copied from interface:RowCompare this row to another row.- Specified by:
compareToin interfaceComparable<Row>- Specified by:
compareToin interfaceRow
-
equals
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. No replacement -
hashCode
Deprecated.As of release 2.0.0, this will be removed in HBase 3.0.0. No replacement -
getRow
Description copied from interface:RowReturns The row. -
getMutations
Returns An unmodifiable list of the current mutations. -
getMaxPriority
-