use of com.google.bigtable.v2.TableName 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.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncReadModifyWriteRowStringBytestringListreadmodifywriterule method syncReadModifyWriteRowStringBytestringListreadmodifywriterule.
public static void syncReadModifyWriteRowStringBytestringListreadmodifywriterule() 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<ReadModifyWriteRule> rules = new ArrayList<>();
ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncReadModifyWriteRowTablenameBytestringListreadmodifywriterule method syncReadModifyWriteRowTablenameBytestringListreadmodifywriterule.
public static void syncReadModifyWriteRowTablenameBytestringListreadmodifywriterule() 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<ReadModifyWriteRule> rules = new ArrayList<>();
ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class SyncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString method syncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString.
public static void syncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString() 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<ReadModifyWriteRule> rules = new ArrayList<>();
String appProfileId = "appProfileId704923523";
ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules, appProfileId);
}
}
use of com.google.bigtable.v2.TableName in project gapic-generator-java by googleapis.
the class BaseBigtableDataClientTest method mutateRowExceptionTest2.
@Test
public void mutateRowExceptionTest2() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
mockBigtable.addException(exception);
try {
String tableName = "tableName-1988717703";
ByteString rowKey = ByteString.EMPTY;
List<Mutation> mutations = new ArrayList<>();
client.mutateRow(tableName, rowKey, mutations);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception.
}
}
Aggregations