use of com.google.bigtable.v2.MutateRowRequest in project beam by apache.
the class BigtableClientWrapper method writeRow.
void writeRow(String key, String table, String familyColumn, String columnQualifier, byte[] value, long timestampMicros) {
Mutation.SetCell setCell = Mutation.SetCell.newBuilder().setFamilyName(familyColumn).setColumnQualifier(byteStringUtf8(columnQualifier)).setValue(byteString(value)).setTimestampMicros(timestampMicros).build();
Mutation mutation = Mutation.newBuilder().setSetCell(setCell).build();
MutateRowRequest mutateRowRequest = MutateRowRequest.newBuilder().setRowKey(byteStringUtf8(key)).setTableName(bigtableOptions.getInstanceName().toTableNameStr(table)).addMutations(mutation).build();
dataClient.mutateRow(mutateRowRequest);
}
Aggregations