@Override public org.apache.hadoop.hive.metastore.api.Table getTable(String dbname, String name) throws MetaException, TException, NoSuchObjectException { return getTable(dbname, name, false); }
@Override public org.apache.hadoop.hive.metastore.api.Table getTable(String catName, String dbName, String tableName) throws TException { return getTable(catName, dbName, tableName, false); }
@Override public org.apache.hadoop.hive.metastore.api.Table getTable(String catName, String dbName, String tableName, boolean getColStats) throws TException { if (!DEFAULT_CATALOG_NAME.equals(catName)) { return super.getTable(catName, dbName, tableName, getColStats); } else { return getTable(dbName, tableName, getColStats); } }
@Override public List<org.apache.hadoop.hive.metastore.api.Table> getTableObjectsByName(String dbName, List<String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, TException { dbName = dbName.toLowerCase(); if (SessionState.get().getTempTables().size() == 0) { // No temp tables, just call underlying client return super.getTableObjectsByName(dbName, tableNames); } List<org.apache.hadoop.hive.metastore.api.Table> tables = new ArrayList<org.apache.hadoop.hive.metastore.api.Table>(); for (String tableName : tableNames) { try { org.apache.hadoop.hive.metastore.api.Table table = getTable(dbName, tableName); if (table != null) { tables.add(table); } } catch (NoSuchObjectException err) { // Ignore error, just return the valid tables that are found. } } return tables; }
@Override public List<org.apache.hadoop.hive.metastore.api.Table> getTableObjectsByName(String dbName, List<String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, TException { dbName = dbName.toLowerCase(); if (SessionState.get() == null || SessionState.get().getTempTables().size() == 0) { // No temp tables, just call underlying client return super.getTableObjectsByName(dbName, tableNames); } List<org.apache.hadoop.hive.metastore.api.Table> tables = new ArrayList<org.apache.hadoop.hive.metastore.api.Table>(); for (String tableName : tableNames) { try { org.apache.hadoop.hive.metastore.api.Table table = getTable(dbName, tableName); if (table != null) { tables.add(table); } } catch (NoSuchObjectException err) { // Ignore error, just return the valid tables that are found. } } return tables; }
@Override public List<org.apache.hadoop.hive.metastore.api.Table> getTableObjectsByName(String dbName, List<String> tableNames) throws MetaException, InvalidOperationException, UnknownDBException, TException { dbName = dbName.toLowerCase(); if (SessionState.get().getTempTables().size() == 0) { // No temp tables, just call underlying client return super.getTableObjectsByName(dbName, tableNames); } List<org.apache.hadoop.hive.metastore.api.Table> tables = new ArrayList<org.apache.hadoop.hive.metastore.api.Table>(); for (String tableName : tableNames) { try { org.apache.hadoop.hive.metastore.api.Table table = getTable(dbName, tableName); if (table != null) { tables.add(table); } } catch (NoSuchObjectException err) { // Ignore error, just return the valid tables that are found. } } return tables; }