您可以使用UpdateTable接口修改表的配置信息(TableOptions)、预留读写吞吐量(ReservedThroughput)等信息。
参数
更多信息,请参见创建数据表。
示例
以下示例用于更新数据表的最大版本数为5。
private static void updateTable(SyncClient client) {
//数据的过期时间,单位为秒,-1表示数据永不过期。
int timeToLive = -1;
//将最大版本数更新为5。
int maxVersions = 5;
TableOptions tableOptions = new TableOptions(timeToLive, maxVersions);
//设置数据表名称。
UpdateTableRequest request = new UpdateTableRequest("<TABLE_NAME>");
request.setTableOptionsForUpdate(tableOptions);
client.updateTable(request);
}
反馈
- 本页导读 (1)
文档反馈