georgecma commented on code in PR #25831:
URL: https://github.com/apache/beam/pull/25831#discussion_r1139081566
##########
sdks/java/io/hbase/src/main/java/org/apache/beam/sdk/io/hbase/HBaseIO.java:
##########
@@ -150,6 +155,32 @@
* .withTableId("table"));
* }</pre>
*
+ * <h4>Writing {@link RowMutations}</h4>
+ *
+ * <p>An alternative way to write to HBase is with {@link
HBaseIO#writeRowMutations()}, which takes
+ * as input a {@link PCollection<KV<byte[], RowMutations>>}, representing KVs
of byte row keys and
+ * {@link RowMutations}.
+ *
+ * <p>This implementation is Dataflow specific. Useful for preserving mutation
order if the upstream
+ * is ordered by row key, as RowMutations will only be applied after previous
RowMutations are
+ * successful.
+ *
+ * <p>To configure the sink, you must supply a table id string and a {@link
Configuration} to
+ * identify the HBase instance, for example:
+ *
+ * <pre>{@code
+ * Configuration configuration = ...;
+ * PCollection<KV<byte[], RowMutations>> data = ...;
+ *
+ * data.apply("write",
+ * HBaseIO.writeRowMutations()
+ * .withConfiguration(configuration)
+ * .withTableId("table"));
+ * }</pre>
+ *
+ * <p>Note that the transformation emits the number of RowMutations written as
an integer after
Review Comment:
Using PDone for now to be consistent with rest of HBaseIO
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]