Search in sources :

Example 21 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient 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);
    }
}
Also used : TableName(com.google.bigtable.v2.TableName) MutateRowResponse(com.google.bigtable.v2.MutateRowResponse) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) Mutation(com.google.bigtable.v2.Mutation) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 22 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncReadModifyWriteRowStringBytestringListreadmodifywriteruleString method syncReadModifyWriteRowStringBytestringListreadmodifywriteruleString.

public static void syncReadModifyWriteRowStringBytestringListreadmodifywriteruleString() 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<>();
        String appProfileId = "appProfileId704923523";
        ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules, appProfileId);
    }
}
Also used : ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) ReadModifyWriteRule(com.google.bigtable.v2.ReadModifyWriteRule) ByteString(com.google.protobuf.ByteString) ReadModifyWriteRowResponse(com.google.bigtable.v2.ReadModifyWriteRowResponse) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Aggregations

BaseBigtableDataClient (com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)22 ArrayList (java.util.ArrayList)18 ByteString (com.google.protobuf.ByteString)12 Mutation (com.google.bigtable.v2.Mutation)10 CheckAndMutateRowResponse (com.google.bigtable.v2.CheckAndMutateRowResponse)6 ReadModifyWriteRowResponse (com.google.bigtable.v2.ReadModifyWriteRowResponse)6 TableName (com.google.bigtable.v2.TableName)6 MutateRowResponse (com.google.bigtable.v2.MutateRowResponse)5 ReadModifyWriteRule (com.google.bigtable.v2.ReadModifyWriteRule)4 RowFilter (com.google.bigtable.v2.RowFilter)4 CheckAndMutateRowRequest (com.google.bigtable.v2.CheckAndMutateRowRequest)2 ReadModifyWriteRowRequest (com.google.bigtable.v2.ReadModifyWriteRowRequest)2 BaseBigtableDataSettings (com.google.cloud.bigtable.data.v2.BaseBigtableDataSettings)2 MutateRowRequest (com.google.bigtable.v2.MutateRowRequest)1 MutateRowsRequest (com.google.bigtable.v2.MutateRowsRequest)1 MutateRowsResponse (com.google.bigtable.v2.MutateRowsResponse)1 ReadRowsRequest (com.google.bigtable.v2.ReadRowsRequest)1 ReadRowsResponse (com.google.bigtable.v2.ReadRowsResponse)1 SampleRowKeysRequest (com.google.bigtable.v2.SampleRowKeysRequest)1 SampleRowKeysResponse (com.google.bigtable.v2.SampleRowKeysResponse)1