public static Iterable<String> matchesTbl(Hive db, String dbName, String tblPattern) throws HiveException { if (tblPattern == null) { return getAllTables(db, dbName); } else { return db.getTablesByPattern(dbName, tblPattern); } }
private Iterable<? extends String> matchesTbl(String dbName, String tblPattern) throws HiveException { if (tblPattern == null) { return db.getAllTables(dbName); } else { return db.getTablesByPattern(dbName, tblPattern); } }
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table
/** * Get all table names for the specified database. * @param dbName * @return List of table names * @throws HiveException */ public List<String> getAllTables(String dbName) throws HiveException { return getTablesByPattern(dbName, ".*"); }
/** * Get all table names for the specified database. * @param dbName * @return List of table names * @throws HiveException */ public List<String> getAllTables(String dbName) throws HiveException { return getTablesByPattern(dbName, ".*"); }
/** * Returns all existing tables from default database which match the given * pattern. The matching occurs as per Java regular expressions * * @param tablePattern * java re pattern * @return list of table names * @throws HiveException */ public List<String> getTablesByPattern(String tablePattern) throws HiveException { return getTablesByPattern(getCurrentDatabase(), tablePattern); }
/** * Returns all existing tables from default database which match the given * pattern. The matching occurs as per Java regular expressions * * @param tablePattern * java re pattern * @return list of table names * @throws HiveException */ public List<String> getTablesByPattern(String tablePattern) throws HiveException { return getTablesByPattern(SessionState.get().getCurrentDatabase(), tablePattern); }
tbls = db.getTablesByPattern(dbName, showTbls.getPattern()); LOG.info("results : " + tbls.size()); } else {
tbls = db.getTablesByPattern(dbName, showTbls.getPattern()); LOG.info("results : " + tbls.size()); } else {
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table
List<String> tables = db.getTablesByPattern(tableName); if (tables != null && tables.size() > 0) { // table exists return null;