HBASE-15848 Fix possible null point dereference in RSGroupBasedLoadBalancer#getMisplacedRegions (Stephen Yuan Jiang)
This commit is contained in:
parent
e47bfb9078
commit
2c22e2003c
|
@ -325,7 +325,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc
|
||||||
" on server: " + assignedServer +
|
" on server: " + assignedServer +
|
||||||
" found in group: " +
|
" found in group: " +
|
||||||
RSGroupInfoManager.getRSGroupOfServer(assignedServer.getHostPort()) +
|
RSGroupInfoManager.getRSGroupOfServer(assignedServer.getHostPort()) +
|
||||||
" outside of group: " + info.getName());
|
" outside of group: " + (info == null ? "UNKNOWN" : info.getName()));
|
||||||
misplacedRegions.add(region);
|
misplacedRegions.add(region);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc
|
||||||
try {
|
try {
|
||||||
info = RSGroupInfoManager.getRSGroup(
|
info = RSGroupInfoManager.getRSGroup(
|
||||||
RSGroupInfoManager.getRSGroupOfTable(region.getTable()));
|
RSGroupInfoManager.getRSGroupOfTable(region.getTable()));
|
||||||
}catch(IOException exp){
|
} catch (IOException exp) {
|
||||||
LOG.debug("Group information null for region of table " + region.getTable(),
|
LOG.debug("Group information null for region of table " + region.getTable(),
|
||||||
exp);
|
exp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue