gourabtaparia commented on code in PR #5482:
URL: https://github.com/apache/hbase/pull/5482#discussion_r1377087917


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java:
##########
@@ -1521,6 +1521,24 @@ Future<Void> mergeRegionsAsync(byte[][] 
nameofRegionsToMerge, boolean forcible)
    */
   Future<Void> splitRegionAsync(byte[] regionName, byte[] splitPoint) throws 
IOException;
 
+  /**
+   * Modify an existing table, more IRB friendly version.
+   * @param tableName name of table.
+   * @param td        modified description of the table
+   * @throws IOException if a remote or network exception occurs
+   * @deprecated since 2.0 version and will be removed in 3.0 version. use
+   *             {@link #modifyTable(TableDescriptor)}
+   */
+  @Deprecated
+  default void modifyTable(TableName tableName, TableDescriptor td, boolean 
reopenRegions)
+    throws IOException {
+    if (!tableName.equals(td.getTableName())) {
+      throw new IllegalArgumentException("the specified table name '" + 
tableName
+        + "' doesn't match with the HTD one: " + td.getTableName());
+    }
+    modifyTable(td, reopenRegions);

Review Comment:
   @wchevreuil The existing deprecated method needs to be passed an extra 
argument from, hence added this - but I see that i can reuse the logic in the 
existing method, and just call that from this method.
   
   Btw, in my local refactoring, i now am not even calling this method - and 
directly making use of the "modifyTableAsync(TableDescriptor td, boolean 
reopenRegions)" method - so i can remove this altogether. 
   
   let me make that change. Thanks



-- 
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