HBASE-5928 Hbck shouldn't npe when there are no tables (Elliott Clark)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1333691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d45f53a307
commit
41da06b7a6
|
@ -2152,7 +2152,7 @@ public class HConnectionManager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HTableDescriptor[] getHTableDescriptors(List<String> tableNames) throws IOException {
|
public HTableDescriptor[] getHTableDescriptors(List<String> tableNames) throws IOException {
|
||||||
if (tableNames == null || tableNames.isEmpty()) return null;
|
if (tableNames == null || tableNames.isEmpty()) return new HTableDescriptor[0];
|
||||||
MasterKeepAliveConnection master = getKeepAliveMaster();
|
MasterKeepAliveConnection master = getKeepAliveMaster();
|
||||||
try {
|
try {
|
||||||
return master.getHTableDescriptors(tableNames);
|
return master.getHTableDescriptors(tableNames);
|
||||||
|
|
|
@ -2095,7 +2095,7 @@ public class HBaseFsck {
|
||||||
}
|
}
|
||||||
|
|
||||||
HTableDescriptor[] getHTableDescriptors(List<String> tableNames) {
|
HTableDescriptor[] getHTableDescriptors(List<String> tableNames) {
|
||||||
HTableDescriptor[] htd = null;
|
HTableDescriptor[] htd = new HTableDescriptor[0];
|
||||||
try {
|
try {
|
||||||
LOG.info("getHTableDescriptors == tableNames => " + tableNames);
|
LOG.info("getHTableDescriptors == tableNames => " + tableNames);
|
||||||
htd = new HBaseAdmin(conf).getTableDescriptors(tableNames);
|
htd = new HBaseAdmin(conf).getTableDescriptors(tableNames);
|
||||||
|
|
Loading…
Reference in New Issue