use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class BaseBigtableDataClientTest method checkAndMutateRowExceptionTest4.
@Test
public void checkAndMutateRowExceptionTest4() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockBigtable.addException(exception);
try {
String tableName = "tableName-1988717703";
ByteString rowKey = ByteString.EMPTY;
RowFilter predicateFilter = RowFilter.newBuilder().build();
List<Mutation> trueMutations = new ArrayList<>();
List<Mutation> falseMutations = new ArrayList<>();
String appProfileId = "appProfileId704923523";
client.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations, appProfileId);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString method syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString.
public static void syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString() 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;
RowFilter predicateFilter = RowFilter.newBuilder().build();
List<Mutation> trueMutations = new ArrayList<>();
List<Mutation> falseMutations = new ArrayList<>();
String appProfileId = "appProfileId704923523";
CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations, appProfileId);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation method syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation.
public static void syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation() 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;
RowFilter predicateFilter = RowFilter.newBuilder().build();
List<Mutation> trueMutations = new ArrayList<>();
List<Mutation> falseMutations = new ArrayList<>();
CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString method syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString.
public static void syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString() 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;
RowFilter predicateFilter = RowFilter.newBuilder().build();
List<Mutation> trueMutations = new ArrayList<>();
List<Mutation> falseMutations = new ArrayList<>();
String appProfileId = "appProfileId704923523";
CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations, appProfileId);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncMutateRowTablenameBytestringListmutation method syncMutateRowTablenameBytestringListmutation.
public static void syncMutateRowTablenameBytestringListmutation() 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<>();
MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations);
}
}
Aggregations