本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.isTemporary()
方法的一些代码示例,展示了Table.isTemporary()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.isTemporary()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:isTemporary
暂无
代码示例来源:origin: apache/hive
private static boolean isLockableTable(Table t) {
if (t.isTemporary()) {
return false;
}
switch (t.getTableType()) {
case MANAGED_TABLE:
case MATERIALIZED_VIEW:
return true;
default:
return false;
}
}
代码示例来源:origin: apache/hive
@Explain(displayName = "isTempTable", jsonOnly = true)
public boolean isTemporary() {
return tableMetadata.isTemporary();
}
代码示例来源:origin: apache/hive
private boolean areEventsForDmlNeeded(Table tbl, Partition oldPart) {
// For Acid IUD, add partition is a meta data only operation. So need to add the new files added
// information into the TXN_WRITE_NOTIFICATION_LOG table.
return conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary() &&
((null != oldPart) || AcidUtils.isTransactionalTable(tbl));
}
代码示例来源:origin: apache/hive
public TableExport(Paths paths, TableSpec tableSpec, ReplicationSpec replicationSpec, Hive db,
String distCpDoAsUser, HiveConf conf, MmContext mmCtx) {
this.tableSpec = (tableSpec != null
&& tableSpec.tableHandle.isTemporary()
&& replicationSpec.isInReplicationScope())
? null
: tableSpec;
this.replicationSpec = replicationSpec;
if (conf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY) ||
(this.tableSpec != null && this.tableSpec.tableHandle.isView())) {
this.replicationSpec.setIsMetadataOnly(true);
this.tableSpec.tableHandle.setStatsStateLikeNewTable();
}
this.db = db;
this.distCpDoAsUser = distCpDoAsUser;
this.conf = conf;
this.paths = paths;
this.mmCtx = mmCtx;
}
代码示例来源:origin: apache/hive
if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML)) {
LOG.debug("Firing dml insert event");
if (tbl.isTemporary()) {
LOG.debug("Not firing dml insert event as " + tbl.getTableName() + " is temporary");
return;
代码示例来源:origin: apache/hive
if (tbl.isTemporary()) {
LOG.debug("write notification log is ignored as " + tbl.getTableName() + " is temporary : " + writeId);
return;
代码示例来源:origin: apache/hive
if (tbl.isTemporary()) {
duplicateProps.add("TEMPORARY");
tbl_temp = "TEMPORARY ";
代码示例来源:origin: apache/drill
EximUtil.validateTable(ts.tableHandle);
if (replicationSpec.isInReplicationScope()
&& ts.tableHandle.isTemporary()){
代码示例来源:origin: apache/drill
if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML)) {
LOG.debug("Firing dml insert event");
if (tbl.isTemporary()) {
LOG.debug("Not firing dml insert event as " + tbl.getTableName() + " is temporary");
return;
代码示例来源:origin: apache/hive
@Override
public RelNode visit(TableScan scan) {
if (scan instanceof HiveTableScan) {
HiveTableScan hiveScan = (HiveTableScan) scan;
RelOptHiveTable relOptHiveTable = (RelOptHiveTable) hiveScan.getTable();
Table tab = relOptHiveTable.getHiveTableMD();
if (tab.isTemporary()) {
fail(tab.getTableName() + " is a temporary table");
}
if (tab.getTableType() == TableType.EXTERNAL_TABLE) {
fail(tab.getFullyQualifiedName() + " is an external table");
}
return scan;
}
// TableScan of a non-Hive table - don't support for materializations.
fail(scan.getTable().getQualifiedName() + " is a table scan of a non-Hive table.");
return scan;
}
代码示例来源:origin: apache/hive
/**
* validates if a table can be exported, similar to EximUtil.shouldExport with few replication
* specific checks.
*/
public static Boolean shouldReplicate(ReplicationSpec replicationSpec, Table tableHandle,
HiveConf hiveConf) {
if (replicationSpec == null) {
replicationSpec = new ReplicationSpec();
}
if (replicationSpec.isNoop() || tableHandle == null) {
return false;
}
// if its metadata only, then dump metadata of non native tables also.
if (tableHandle.isNonNative() && !replicationSpec.isMetadataOnly()) {
return false;
}
if (replicationSpec.isInReplicationScope()) {
if (tableHandle.isTemporary()) {
return false;
}
if (MetaStoreUtils.isExternalTable(tableHandle.getTTable())) {
return hiveConf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) || replicationSpec.isMetadataOnly();
}
}
return true;
}
代码示例来源:origin: apache/drill
isSrcLocal, isAutoPurge);
} else {
if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary() && oldPart != null) {
newFiles = Collections.synchronizedList(new ArrayList<Path>());
代码示例来源:origin: apache/hive
&& (privObject.getT() == null || privObject.getT().isTemporary())) {
代码示例来源:origin: apache/hive
destPath = loadPath = tgtPath;
isAutoPurge = "true".equalsIgnoreCase(table.getProperty("auto.purge"));
if (table.isTemporary()) {
needRecycle = false;
} else {
代码示例来源:origin: apache/hive
boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl);
if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
newFiles = Collections.synchronizedList(new ArrayList<Path>());
boolean needRecycle = !tbl.isTemporary()
&& ReplChangeManager.isSourceOfReplication(Hive.get().getDatabase(tbl.getDbName()));
replaceFiles(tblPath, loadPath, destPath, tblPath, conf, isSrcLocal, isAutopurge,
代码示例来源:origin: apache/drill
Table tbl = getTable(tableName);
HiveConf sessionConf = SessionState.getSessionConf();
if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
newFiles = Collections.synchronizedList(new ArrayList<Path>());
代码示例来源:origin: apache/hive
destPath = tgtLocation;
isAutoPurge = "true".equalsIgnoreCase(table.getProperty("auto.purge"));
if (table.isTemporary()) {
needRecycle = false;
} else {
代码示例来源:origin: apache/drill
try {
Table table = this.getTableObjectByName(qb.getTabNameForAlias(alias));
if (table.isTemporary()) {
throw new SemanticException("View definition references temporary table " + alias);
代码示例来源:origin: apache/hive
if (table.isTemporary()) {
throw new SemanticException("View definition references temporary table " + alias);
代码示例来源:origin: apache/drill
table.getTableName(),
false, // isExternal: set to false here, can be overwritten by the IMPORT stmt
table.isTemporary(),
table.getSd().getCols(),
table.getPartitionKeys(),
内容来源于网络,如有侵权,请联系作者删除!