ajkh88 commented on code in PR #7563:
URL: https://github.com/apache/hbase/pull/7563#discussion_r2634389651


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java:
##########
@@ -1077,6 +1077,47 @@ default Future<Void> modifyTableAsync(TableDescriptor 
td) throws IOException {
    */
   Future<Void> modifyTableAsync(TableDescriptor td, boolean reopenRegions) 
throws IOException;
 
+  /**
+   * Reopen all regions of a table. This is useful after calling
+   * {@link #modifyTableAsync(TableDescriptor, boolean)} with 
reopenRegions=false to gradually roll
+   * out table descriptor changes to regions. Regions are reopened in-place 
(no move).
+   * @param tableName table whose regions to reopen
+   * @throws IOException if a remote or network exception occurs
+   */
+  default void reopenTableRegions(TableName tableName) throws IOException {
+    get(reopenTableRegionsAsync(tableName), getSyncWaitTimeout(), 
TimeUnit.MILLISECONDS);
+  }
+
+  /**
+   * Reopen specific regions of a table. Useful for canary testing table 
descriptor changes on a
+   * subset of regions before rolling out to the entire table.
+   * @param tableName table whose regions to reopen
+   * @param regions   specific regions to reopen
+   * @throws IOException if a remote or network exception occurs
+   */
+  default void reopenTableRegions(TableName tableName, List<RegionInfo> 
regions)

Review Comment:
   Yes I was trying to maintain consistency as much as possible 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to