From 0a6e325bfbde2abf9c5327e9f6c8b5601fa8a954 Mon Sep 17 00:00:00 2001 From: Toshihiro Suzuki Date: Thu, 7 Dec 2023 13:05:04 +0900 Subject: [PATCH] Backport to branch(3.10) : Add API doc for `admin.repairTable` method for v3.X (#1354) Co-authored-by: Vincent Guilpain --- docs/api-guide.md | 13 +++++++++++++ docs/storage-abstraction.md | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/api-guide.md b/docs/api-guide.md index ba32ddb6e9..58843406b7 100644 --- a/docs/api-guide.md +++ b/docs/api-guide.md @@ -241,6 +241,19 @@ You can get table metadata as follows: // Get the table metadata for "ns.tbl". TableMetadata tableMetadata = admin.getTableMetadata("ns", "tbl"); ``` +### Repair a table + +You can repair the table metadata of an existing table as follows: + +```java +// Repair the table "ns.tbl" with options. +TableMetadata tableMetadata = + TableMetadata.newBuilder() + ... + .build(); +Map options = ...; +admin.repairTable("ns", "tbl", tableMetadata, options); +``` ### Specify operations for the Coordinator table diff --git a/docs/storage-abstraction.md b/docs/storage-abstraction.md index 4ebb9d7b33..5053baa9e2 100644 --- a/docs/storage-abstraction.md +++ b/docs/storage-abstraction.md @@ -388,6 +388,20 @@ You can get table metadata as follows: TableMetadata tableMetadata = admin.getTableMetadata("ns", "tbl"); ``` +### Repair a table + +You can repair the table metadata of an existing table as follows: + +```java +// Repair the table "ns.tbl" with options. +TableMetadata tableMetadata = + TableMetadata.newBuilder() + ... + .build(); +Map options = ...; +admin.repairTable("ns", "tbl", tableMetadata, options); +``` + ### Implement CRUD operations The following sections describe CRUD operations.