本文整理了Java中org.apache.hadoop.hive.metastore.api.Table.isTemporary()
方法的一些代码示例,展示了Table.isTemporary()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isTemporary()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.metastore.api.Table
类名称:Table
方法名:isTemporary
暂无
代码示例来源:origin: apache/hive
public boolean isTemporary() {
return tTable.isTemporary();
}
代码示例来源:origin: apache/drill
public boolean isTemporary() {
return tTable.isTemporary();
}
代码示例来源:origin: apache/hive
@Override
protected void create_table_with_environment_context(
org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
throws AlreadyExistsException, InvalidObjectException,
MetaException, NoSuchObjectException, TException {
if (tbl.isTemporary()) {
createTempTable(tbl, envContext);
return;
}
// non-temp tables should use underlying client.
super.create_table_with_environment_context(tbl, envContext);
}
代码示例来源:origin: apache/drill
@Override
protected void create_table_with_environment_context(
org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
throws AlreadyExistsException, InvalidObjectException,
MetaException, NoSuchObjectException, TException {
if (tbl.isTemporary()) {
createTempTable(tbl, envContext);
return;
}
// non-temp tables should use underlying client.
super.create_table_with_environment_context(tbl, envContext);
}
代码示例来源:origin: apache/hive
/**
* Convert a list of columns to a set of vertices.
* Use cached vertices if possible.
*/
private static Set<Vertex> createSourceVertices(
Map<String, Vertex> vertexCache, Collection<BaseColumnInfo> baseCols) {
Set<Vertex> sources = new LinkedHashSet<Vertex>();
if (baseCols != null && !baseCols.isEmpty()) {
for(BaseColumnInfo col: baseCols) {
Table table = col.getTabAlias().getTable();
if (table.isTemporary()) {
// Ignore temporary tables
continue;
}
Vertex.Type type = Vertex.Type.TABLE;
String tableName = Warehouse.getQualifiedName(table);
FieldSchema fieldSchema = col.getColumn();
String label = tableName;
if (fieldSchema != null) {
type = Vertex.Type.COLUMN;
label = tableName + "." + fieldSchema.getName();
}
sources.add(getOrCreateVertex(vertexCache, label, type));
}
}
return sources;
}
代码示例来源:origin: apache/drill
/**
* Convert a list of columns to a set of vertices.
* Use cached vertices if possible.
*/
private Set<Vertex> createSourceVertices(
Map<String, Vertex> vertexCache, Collection<BaseColumnInfo> baseCols) {
Set<Vertex> sources = new LinkedHashSet<Vertex>();
if (baseCols != null && !baseCols.isEmpty()) {
for(BaseColumnInfo col: baseCols) {
Table table = col.getTabAlias().getTable();
if (table.isTemporary()) {
// Ignore temporary tables
continue;
}
Vertex.Type type = Vertex.Type.TABLE;
String tableName = table.getDbName() + "." + table.getTableName();
FieldSchema fieldSchema = col.getColumn();
String label = tableName;
if (fieldSchema != null) {
type = Vertex.Type.COLUMN;
label = tableName + "." + fieldSchema.getName();
}
sources.add(getOrCreateVertex(vertexCache, label, type));
}
}
return sources;
}
代码示例来源:origin: apache/drill
throw new HiveException("tableName="+ tableName +" is a VIRTUAL VIEW. Index on VIRTUAL VIEW is not supported.");
if (baseTbl.isTemporary()) {
throw new HiveException("tableName=" + tableName
+ " is a TEMPORARY TABLE. Index on TEMPORARY TABLE is not supported.");
代码示例来源:origin: apache/hive
/**
* Checks if the table is valid based on the rules for strict managed tables.
* @param conf
* @param table
* @return Null if the table is valid, otherwise a string message indicating why the table is invalid.
*/
public static String validateStrictManagedTable(Configuration conf,
Table table) {
if (MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.STRICT_MANAGED_TABLES)) {
if (table.isTemporary()) {
// temp tables exempted from checks.
return null;
}
TableType tableType = TableType.valueOf(table.getTableType());
if (tableType == TableType.MANAGED_TABLE) {
if (!MetaStoreServerUtils.isTransactionalTable(table.getParameters())) {
return createValidationError(table, "Table is marked as a managed table but is not transactional.");
}
if (MetaStoreUtils.isNonNativeTable(table)) {
return createValidationError(table, "Table is marked as a managed table but is non-native.");
}
if (isAvroTableWithExternalSchema(table)) {
return createValidationError(table, "Managed Avro table has externally defined schema.");
}
}
}
// Table is valid
return null;
}
代码示例来源:origin: apache/hive
return isTemporary();
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public boolean isTemporary() {
return tTable.isTemporary();
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
@Override
protected void create_table_with_environment_context(
org.apache.hadoop.hive.metastore.api.Table tbl, EnvironmentContext envContext)
throws AlreadyExistsException, InvalidObjectException,
MetaException, NoSuchObjectException, TException {
if (tbl.isTemporary()) {
createTempTable(tbl, envContext);
return;
}
// non-temp tables should use underlying client.
super.create_table_with_environment_context(tbl, envContext);
}
代码示例来源:origin: org.spark-project.hive/hive-metastore
return Boolean.valueOf(isTemporary());
代码示例来源:origin: com.facebook.presto.hive/hive-apache
return Boolean.valueOf(isTemporary());
代码示例来源:origin: com.facebook.presto.hive/hive-apache
throw new HiveException("tableName="+ tableName +" is a VIRTUAL VIEW. Index on VIRTUAL VIEW is not supported.");
if (baseTbl.isTemporary()) {
throw new HiveException("tableName=" + tableName
+ " is a TEMPORARY TABLE. Index on TEMPORARY TABLE is not supported.");
代码示例来源:origin: org.apache.hive/hive-standalone-metastore
return isTemporary();
代码示例来源:origin: com.facebook.presto.hive/hive-apache
false, // isExternal: set to false here, can be overwritten by the
table.isTemporary(),
table.getSd().getCols(),
table.getPartitionKeys(),
内容来源于网络,如有侵权,请联系作者删除!