use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncReadRows method asyncReadRows.
public static void asyncReadRows() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
ReadRowsRequest request = ReadRowsRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").setRows(RowSet.newBuilder().build()).setFilter(RowFilter.newBuilder().build()).setRowsLimit(-944199211).build();
ServerStream<ReadRowsResponse> stream = baseBigtableDataClient.readRowsCallable().call(request);
for (ReadRowsResponse response : stream) {
// Do something when a response is received.
}
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class SyncMutateRowStringBytestringListmutationString method syncMutateRowStringBytestringListmutationString.
public static void syncMutateRowStringBytestringListmutationString() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
String tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
ByteString rowKey = ByteString.EMPTY;
List<Mutation> mutations = new ArrayList<>();
String appProfileId = "appProfileId704923523";
MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations, appProfileId);
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class SyncMutateRowTablenameBytestringListmutationString method syncMutateRowTablenameBytestringListmutationString.
public static void syncMutateRowTablenameBytestringListmutationString() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
ByteString rowKey = ByteString.EMPTY;
List<Mutation> mutations = new ArrayList<>();
String appProfileId = "appProfileId704923523";
MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations, appProfileId);
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncMutateRows method asyncMutateRows.
public static void asyncMutateRows() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
MutateRowsRequest request = MutateRowsRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").addAllEntries(new ArrayList<MutateRowsRequest.Entry>()).build();
ServerStream<MutateRowsResponse> stream = baseBigtableDataClient.mutateRowsCallable().call(request);
for (MutateRowsResponse response : stream) {
// Do something when a response is received.
}
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncReadModifyWriteRow method asyncReadModifyWriteRow.
public static void asyncReadModifyWriteRow() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
ReadModifyWriteRowRequest request = ReadModifyWriteRowRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").setRowKey(ByteString.EMPTY).addAllRules(new ArrayList<ReadModifyWriteRule>()).build();
ApiFuture<ReadModifyWriteRowResponse> future = baseBigtableDataClient.readModifyWriteRowCallable().futureCall(request);
// Do something.
ReadModifyWriteRowResponse response = future.get();
}
}
Aggregations