if (LOG.isDebugEnabled()) {
LOG.debug("EntityGroupInfo : " + info.toString());
}
if (Bytes.equals(info.getTableName(), rootTableName)) {
// find it, so end search
ServerName sn = ServerName.getServerName(r);
EntityGroupLocation egLoc = new EntityGroupLocation(info,
sn.getHostname(), sn.getPort());
results.add(egLoc);
return false;
}
return true;
}
};
// Run full scan of _FMETA_ catalog table passing in our custom visitor
fullScan(visitor, rootTableName, null);
return results.size() == 0 ? null : results.get(0);
} else {
EntityGroupInfo info = EntityGroupInfo.getEntityGroupInfo(r);
if (info == null) {
throw new TableNotFoundException(Bytes.toString(tableName));
}
ServerName sn = ServerName.getServerName(r);
EntityGroupLocation egLoc = new EntityGroupLocation(info,
sn.getHostname(), sn.getPort());
return egLoc;
}
} catch (IOException e) {
throw new MetaException(e);
}