use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class SyncCreateSetEndpoint method syncCreateSetEndpoint.
public static void syncCreateSetEndpoint() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
BaseBigtableDataSettings baseBigtableDataSettings = BaseBigtableDataSettings.newBuilder().setEndpoint(myEndpoint).build();
BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create(baseBigtableDataSettings);
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncMutateRow method asyncMutateRow.
public static void asyncMutateRow() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
MutateRowRequest request = MutateRowRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").setRowKey(ByteString.EMPTY).addAllMutations(new ArrayList<Mutation>()).build();
ApiFuture<MutateRowResponse> future = baseBigtableDataClient.mutateRowCallable().futureCall(request);
// Do something.
MutateRowResponse response = future.get();
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class SyncMutateRowStringBytestringListmutation method syncMutateRowStringBytestringListmutation.
public static void syncMutateRowStringBytestringListmutation() 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<>();
MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations);
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncCheckAndMutateRow method asyncCheckAndMutateRow.
public static void asyncCheckAndMutateRow() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
CheckAndMutateRowRequest request = CheckAndMutateRowRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").setRowKey(ByteString.EMPTY).setPredicateFilter(RowFilter.newBuilder().build()).addAllTrueMutations(new ArrayList<Mutation>()).addAllFalseMutations(new ArrayList<Mutation>()).build();
ApiFuture<CheckAndMutateRowResponse> future = baseBigtableDataClient.checkAndMutateRowCallable().futureCall(request);
// Do something.
CheckAndMutateRowResponse response = future.get();
}
}
use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.
the class AsyncSampleRowKeys method asyncSampleRowKeys.
public static void asyncSampleRowKeys() throws Exception {
// It may require modifications to work in your environment.
try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
SampleRowKeysRequest request = SampleRowKeysRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").build();
ServerStream<SampleRowKeysResponse> stream = baseBigtableDataClient.sampleRowKeysCallable().call(request);
for (SampleRowKeysResponse response : stream) {
// Do something when a response is received.
}
}
}
Aggregations