busbey commented on a change in pull request #2215:
URL: https://github.com/apache/hbase/pull/2215#discussion_r470408396
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
##########
@@ -1281,6 +1281,14 @@
*/
CompletableFuture<Boolean> normalize();
Review comment:
nit: could we add a default method here that calls
`normalize(NormalizeTableFilterParams)` with a default one? seems like we could
clean up some stuff in the various *Admin implementations and `RequestConverter`
##########
File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
##########
@@ -856,11 +856,23 @@ void unassign(byte[] regionName, boolean force)
* the request was submitted successfully. We need to check logs for the
details of which regions
* were split/merged.
*
- * @return <code>true</code> if region normalizer ran, <code>false</code>
otherwise.
+ * @return {@code true} if region normalizer ran, {@code false} otherwise.
* @throws IOException if a remote or network exception occurs
*/
boolean normalize() throws IOException;
Review comment:
nit: could we add a default method here that calls
`normalize(NormalizeTableFilterParams)` with a default one? seems like we could
clean up some stuff in the various *Admin implementations and `RequestConverter`
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/NormalizeTableFilterParams.java
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.util.List;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.apache.yetus.audience.InterfaceStability;
+
+/**
+ * A collection of criteria used for table selection. The logic of table
selection is as follows:
+ * <ul>
+ * <li>
+ * When no parameter values are provided, an unfiltered list of all user
tables is returned.
+ * </li>
+ * <li>
+ * When a list of {@link TableName TableNames} are provided, the filter
starts with any of
+ * these tables that exist.
+ * </li>
+ * <li>
+ * When a {@code namespace} name is provided, the filter starts with all
the tables present in
+ * that namespace.
+ * </li>
+ * <li>
+ * If both a list of {@link TableName TableNames} and a {@code namespace}
name are provided,
+ * the {@link TableName} list is honored and the {@code namespace} name is
ignored.
+ * </li>
+ * <li>
+ * If a {@code regex} is provided, this subset of {@link TableName
TableNames} is further
+ * reduced to those that match the provided regular expression.
+ * </li>
+ * </ul>
+ */
[email protected]
[email protected]
Review comment:
nit: our [API surface
docs](http://hbase.apache.org/book.html#hbase.client.api.surface) say that
anything labeled IA.Public is inherently IS.Stable and shouldn't carry a label.
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/NormalizeTableFilterParams.java
##########
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.util.List;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.yetus.audience.InterfaceAudience;
+import org.apache.yetus.audience.InterfaceStability;
+
+/**
+ * A collection of criteria used for table selection. The logic of table
selection is as follows:
+ * <ul>
+ * <li>
+ * When no parameter values are provided, an unfiltered list of all user
tables is returned.
+ * </li>
+ * <li>
+ * When a list of {@link TableName TableNames} are provided, the filter
starts with any of
+ * these tables that exist.
+ * </li>
+ * <li>
+ * When a {@code namespace} name is provided, the filter starts with all
the tables present in
+ * that namespace.
+ * </li>
+ * <li>
+ * If both a list of {@link TableName TableNames} and a {@code namespace}
name are provided,
+ * the {@link TableName} list is honored and the {@code namespace} name is
ignored.
+ * </li>
+ * <li>
+ * If a {@code regex} is provided, this subset of {@link TableName
TableNames} is further
+ * reduced to those that match the provided regular expression.
+ * </li>
+ * </ul>
Review comment:
excellent summary!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]