org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(210)

本文整理了Java中org.apache.hadoop.hive.ql.metadata.Hive.getTablesByPattern()方法的一些代码示例,展示了Hive.getTablesByPattern()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hive.getTablesByPattern()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Hive
类名称:Hive
方法名:getTablesByPattern

Hive.getTablesByPattern介绍

[英]Returns all existing tables from default database which match the given pattern. The matching occurs as per Java regular expressions
[中]返回默认数据库中与给定模式匹配的所有现有表。匹配按照Java正则表达式进行

代码示例

代码示例来源:origin: apache/hive

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);
 }
}

代码示例来源:origin: apache/drill

private Iterable<? extends String> matchesTbl(String dbName, String tblPattern)
  throws HiveException {
 if (tblPattern == null) {
  return db.getAllTables(dbName);
 } else {
  return db.getTablesByPattern(dbName, tblPattern);
 }
}

代码示例来源:origin: apache/hive

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table

代码示例来源:origin: com.facebook.presto.hive/hive-apache

/**
 * 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, ".*");
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

/**
 * 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, ".*");
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

/**
 * 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);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

/**
 * 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);
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

tbls = db.getTablesByPattern(dbName, showTbls.getPattern());
 LOG.info("results : " + tbls.size());
} else {

代码示例来源:origin: com.facebook.presto.hive/hive-apache

tbls = db.getTablesByPattern(dbName, showTbls.getPattern());
 LOG.info("results : " + tbls.size());
} else {

代码示例来源:origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table

代码示例来源:origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table

代码示例来源:origin: org.apache.hive.hcatalog/hive-hcatalog-core

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table

代码示例来源:origin: com.facebook.presto.hive/hive-apache

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

List<String> tables = db.getTablesByPattern(tableName);
if (tables != null && tables.size() > 0) { // table exists
 return null;

相关文章

Hive类方法