HBASE-15848 Fix possible null point dereference in RSGroupBasedLoadBalancer#getMisplacedRegions (Stephen Yuan Jiang)

This commit is contained in:
Stephen Yuan Jiang 2016-05-17 14:06:57 -07:00
parent e47bfb9078
commit 2c22e2003c
1 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc
" on server: " + assignedServer +
" found in group: " +
RSGroupInfoManager.getRSGroupOfServer(assignedServer.getHostPort()) +
" outside of group: " + info.getName());
" outside of group: " + (info == null ? "UNKNOWN" : info.getName()));
misplacedRegions.add(region);
}
}
@ -346,7 +346,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc
try {
info = RSGroupInfoManager.getRSGroup(
RSGroupInfoManager.getRSGroupOfTable(region.getTable()));
}catch(IOException exp){
} catch (IOException exp) {
LOG.debug("Group information null for region of table " + region.getTable(),
exp);
}