apurtell commented on a change in pull request #3219:
URL: https://github.com/apache/hbase/pull/3219#discussion_r625257713
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
##########
@@ -571,23 +571,37 @@ public ServerName getRegionServerOfRegion(RegionInfo
regionInfo) {
* wants to iterate this exported list. We need to synchronize on regions
* since all access to this.servers is under a lock on this.regions.
*
- * @return A clone of current assignments.
+ * @return A clone of current open or opening assignments.
*/
public Map<TableName, Map<ServerName, List<RegionInfo>>>
getAssignmentsForBalancer(
TableStateManager tableStateManager, List<ServerName> onlineServers) {
final Map<TableName, Map<ServerName, List<RegionInfo>>> result = new
HashMap<>();
for (RegionStateNode node : regionsMap.values()) {
+ // DisableTableProcedure first sets the table state to DISABLED and then
force unassigns
+ // the regions in a loop. The balancer should ignore all regions for
tables in DISABLED
+ // state because even if still currently open we expect them to be
offlined very soon.
if (isTableDisabled(tableStateManager, node.getTable())) {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Ignoring " + node + " because table is disabled");
Review comment:
Is one better than the other? I'd say no because it's easy to edit the
string and not change the arguments with printf style log lines. I've done
that, I've seen others do it. For your future consideration.
--
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]