From 52807e0f108f0989797efe63c102bb28d9ebb48b Mon Sep 17 00:00:00 2001 From: Vincent Guilpain Date: Wed, 29 Nov 2023 09:38:45 +0900 Subject: [PATCH] Add API doc for `admin.repairTable` method for v3.X (#1310) --- 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 c192613388..a8113b7ba7 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 8f925aec9f..3f7ad82207 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.