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

x33g5p2x  于2022-01-29 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(249)

本文整理了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

Table.isTemporary介绍

暂无

代码示例

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

  1. private static boolean isLockableTable(Table t) {
  2. if (t.isTemporary()) {
  3. return false;
  4. }
  5. switch (t.getTableType()) {
  6. case MANAGED_TABLE:
  7. case MATERIALIZED_VIEW:
  8. return true;
  9. default:
  10. return false;
  11. }
  12. }

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

  1. @Explain(displayName = "isTempTable", jsonOnly = true)
  2. public boolean isTemporary() {
  3. return tableMetadata.isTemporary();
  4. }

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

  1. private boolean areEventsForDmlNeeded(Table tbl, Partition oldPart) {
  2. // For Acid IUD, add partition is a meta data only operation. So need to add the new files added
  3. // information into the TXN_WRITE_NOTIFICATION_LOG table.
  4. return conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary() &&
  5. ((null != oldPart) || AcidUtils.isTransactionalTable(tbl));
  6. }

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

  1. public TableExport(Paths paths, TableSpec tableSpec, ReplicationSpec replicationSpec, Hive db,
  2. String distCpDoAsUser, HiveConf conf, MmContext mmCtx) {
  3. this.tableSpec = (tableSpec != null
  4. && tableSpec.tableHandle.isTemporary()
  5. && replicationSpec.isInReplicationScope())
  6. ? null
  7. : tableSpec;
  8. this.replicationSpec = replicationSpec;
  9. if (conf.getBoolVar(HiveConf.ConfVars.REPL_DUMP_METADATA_ONLY) ||
  10. (this.tableSpec != null && this.tableSpec.tableHandle.isView())) {
  11. this.replicationSpec.setIsMetadataOnly(true);
  12. this.tableSpec.tableHandle.setStatsStateLikeNewTable();
  13. }
  14. this.db = db;
  15. this.distCpDoAsUser = distCpDoAsUser;
  16. this.conf = conf;
  17. this.paths = paths;
  18. this.mmCtx = mmCtx;
  19. }

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

  1. if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML)) {
  2. LOG.debug("Firing dml insert event");
  3. if (tbl.isTemporary()) {
  4. LOG.debug("Not firing dml insert event as " + tbl.getTableName() + " is temporary");
  5. return;

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

  1. if (tbl.isTemporary()) {
  2. LOG.debug("write notification log is ignored as " + tbl.getTableName() + " is temporary : " + writeId);
  3. return;

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

  1. if (tbl.isTemporary()) {
  2. duplicateProps.add("TEMPORARY");
  3. tbl_temp = "TEMPORARY ";

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

  1. EximUtil.validateTable(ts.tableHandle);
  2. if (replicationSpec.isInReplicationScope()
  3. && ts.tableHandle.isTemporary()){

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

  1. if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML)) {
  2. LOG.debug("Firing dml insert event");
  3. if (tbl.isTemporary()) {
  4. LOG.debug("Not firing dml insert event as " + tbl.getTableName() + " is temporary");
  5. return;

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

  1. @Override
  2. public RelNode visit(TableScan scan) {
  3. if (scan instanceof HiveTableScan) {
  4. HiveTableScan hiveScan = (HiveTableScan) scan;
  5. RelOptHiveTable relOptHiveTable = (RelOptHiveTable) hiveScan.getTable();
  6. Table tab = relOptHiveTable.getHiveTableMD();
  7. if (tab.isTemporary()) {
  8. fail(tab.getTableName() + " is a temporary table");
  9. }
  10. if (tab.getTableType() == TableType.EXTERNAL_TABLE) {
  11. fail(tab.getFullyQualifiedName() + " is an external table");
  12. }
  13. return scan;
  14. }
  15. // TableScan of a non-Hive table - don't support for materializations.
  16. fail(scan.getTable().getQualifiedName() + " is a table scan of a non-Hive table.");
  17. return scan;
  18. }

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

  1. /**
  2. * validates if a table can be exported, similar to EximUtil.shouldExport with few replication
  3. * specific checks.
  4. */
  5. public static Boolean shouldReplicate(ReplicationSpec replicationSpec, Table tableHandle,
  6. HiveConf hiveConf) {
  7. if (replicationSpec == null) {
  8. replicationSpec = new ReplicationSpec();
  9. }
  10. if (replicationSpec.isNoop() || tableHandle == null) {
  11. return false;
  12. }
  13. // if its metadata only, then dump metadata of non native tables also.
  14. if (tableHandle.isNonNative() && !replicationSpec.isMetadataOnly()) {
  15. return false;
  16. }
  17. if (replicationSpec.isInReplicationScope()) {
  18. if (tableHandle.isTemporary()) {
  19. return false;
  20. }
  21. if (MetaStoreUtils.isExternalTable(tableHandle.getTTable())) {
  22. return hiveConf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) || replicationSpec.isMetadataOnly();
  23. }
  24. }
  25. return true;
  26. }

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

  1. isSrcLocal, isAutoPurge);
  2. } else {
  3. if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary() && oldPart != null) {
  4. newFiles = Collections.synchronizedList(new ArrayList<Path>());

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

  1. && (privObject.getT() == null || privObject.getT().isTemporary())) {

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

  1. destPath = loadPath = tgtPath;
  2. isAutoPurge = "true".equalsIgnoreCase(table.getProperty("auto.purge"));
  3. if (table.isTemporary()) {
  4. needRecycle = false;
  5. } else {

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

  1. boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl);
  2. if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
  3. newFiles = Collections.synchronizedList(new ArrayList<Path>());
  4. boolean needRecycle = !tbl.isTemporary()
  5. && ReplChangeManager.isSourceOfReplication(Hive.get().getDatabase(tbl.getDbName()));
  6. replaceFiles(tblPath, loadPath, destPath, tblPath, conf, isSrcLocal, isAutopurge,

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

  1. Table tbl = getTable(tableName);
  2. HiveConf sessionConf = SessionState.getSessionConf();
  3. if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
  4. newFiles = Collections.synchronizedList(new ArrayList<Path>());

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

  1. destPath = tgtLocation;
  2. isAutoPurge = "true".equalsIgnoreCase(table.getProperty("auto.purge"));
  3. if (table.isTemporary()) {
  4. needRecycle = false;
  5. } else {

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

  1. try {
  2. Table table = this.getTableObjectByName(qb.getTabNameForAlias(alias));
  3. if (table.isTemporary()) {
  4. throw new SemanticException("View definition references temporary table " + alias);

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

  1. if (table.isTemporary()) {
  2. throw new SemanticException("View definition references temporary table " + alias);

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

  1. table.getTableName(),
  2. false, // isExternal: set to false here, can be overwritten by the IMPORT stmt
  3. table.isTemporary(),
  4. table.getSd().getCols(),
  5. table.getPartitionKeys(),

相关文章

Table类方法