org.apache.hadoop.hive.ql.exec.Utilities.mvFileToFinalPath()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(124)

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

Utilities.mvFileToFinalPath介绍

暂无

代码示例

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

public static void jobClose(Path outputPath, boolean success, JobConf job,
  LogHelper console, DynamicPartitionCtx dynPartCtx, Reporter reporter
  ) throws HiveException, IOException {
 FileSystem fs = outputPath.getFileSystem(job);
 Path backupPath = backupOutputPath(fs, outputPath, job);
 Utilities.mvFileToFinalPath(outputPath, job, success, LOG, dynPartCtx, null,
  reporter);
 if (backupPath != null) {
  fs.delete(backupPath, true);
 }
}

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

public static void jobClose(Path outputPath, boolean success, JobConf job,
  LogHelper console, DynamicPartitionCtx dynPartCtx, Reporter reporter
  ) throws HiveException, IOException {
 FileSystem fs = outputPath.getFileSystem(job);
 Path backupPath = backupOutputPath(fs, outputPath, job);
 Utilities.mvFileToFinalPath(outputPath, job, success, LOG, dynPartCtx, null,
  reporter);
 fs.delete(backupPath, true);
}

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

@Override
public void jobCloseOp(Configuration hconf, boolean success)
  throws HiveException {
 try {
  Path outputDir = conf.getOutputPath();
  FileSystem fs = outputDir.getFileSystem(hconf);
  Path backupPath = backupOutputPath(fs, outputDir);
  Utilities
    .mvFileToFinalPath(outputDir, hconf, success, LOG, conf.getDpCtx(),
      null, reporter);
  if (success) {
   LOG.info("jobCloseOp moved merged files to output dir: " + outputDir);
  }
  if (backupPath != null) {
   fs.delete(backupPath, true);
  }
 } catch (IOException e) {
  throw new HiveException("Failed jobCloseOp for AbstractFileMergeOperator",
    e);
 }
 super.jobCloseOp(hconf, success);
}

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

if (!isMmTable) {
 Path backupPath = backupOutputPath(fs, outputDir);
 Utilities.mvFileToFinalPath(
   outputDir, hconf, success, LOG, conf.getDpCtx(), null, reporter);
 if (success) {

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

@Override
public void jobCloseOp(Configuration hconf, boolean success)
  throws HiveException {
 try {
  if ((conf != null) && isNativeTable) {
   Path specPath = conf.getDirName();
   DynamicPartitionCtx dpCtx = conf.getDynPartCtx();
   if (conf.isLinkedFileSink() && (dpCtx != null)) {
    specPath = conf.getParentDir();
   }
   Utilities.mvFileToFinalPath(specPath, hconf, success, LOG, dpCtx, conf,
    reporter);
  }
 } catch (IOException e) {
  throw new HiveException(e);
 }
 super.jobCloseOp(hconf, success);
}

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

Utilities.mvFileToFinalPath(specPath, hconf, success, LOG, dpCtx, conf, reporter);
} else {
 int dpLevels = dpCtx == null ? 0 : dpCtx.getNumDPCols(),

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

public static void jobClose(Path outputPath, boolean success, JobConf job,
  LogHelper console, DynamicPartitionCtx dynPartCtx, Reporter reporter
  ) throws HiveException, IOException {
 FileSystem fs = outputPath.getFileSystem(job);
 Path backupPath = backupOutputPath(fs, outputPath, job);
 Utilities.mvFileToFinalPath(outputPath, job, success, LOG, dynPartCtx, null,
  reporter);
 fs.delete(backupPath, true);
}

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

@Override
public void jobCloseOp(Configuration hconf, boolean success)
  throws HiveException {
 try {
  Path outputDir = conf.getOutputPath();
  FileSystem fs = outputDir.getFileSystem(hconf);
  Path backupPath = backupOutputPath(fs, outputDir);
  Utilities
    .mvFileToFinalPath(outputDir, hconf, success, LOG, conf.getDpCtx(),
      null, reporter);
  if (success) {
   LOG.info("jobCloseOp moved merged files to output dir: " + outputDir);
  }
  if (backupPath != null) {
   fs.delete(backupPath, true);
  }
 } catch (IOException e) {
  throw new HiveException("Failed jobCloseOp for AbstractFileMergeOperator",
    e);
 }
 super.jobCloseOp(hconf, success);
}

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

@Override
public void jobCloseOp(Configuration hconf, boolean success)
  throws HiveException {
 try {
  if ((conf != null) && isNativeTable) {
   Path specPath = conf.getDirName();
   DynamicPartitionCtx dpCtx = conf.getDynPartCtx();
   if (conf.isLinkedFileSink() && (dpCtx != null)) {
    specPath = conf.getParentDir();
   }
   Utilities.mvFileToFinalPath(specPath, hconf, success, LOG, dpCtx, conf,
    reporter);
  }
 } catch (IOException e) {
  throw new HiveException(e);
 }
 super.jobCloseOp(hconf, success);
}

相关文章

微信公众号

最新文章

更多

Utilities类方法