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

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

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

Utilities.isTempPath介绍

[英]Detect if the supplied file is a temporary path.
[中]检测提供的文件是否为临时路径。

代码示例

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

private static HashMap<String, FileStatus> removeTempOrDuplicateFilesNonMm(
  FileStatus[] files, FileSystem fs) throws IOException {
 if (files == null || fs == null) {
  return null;
 }
 HashMap<String, FileStatus> taskIdToFile = new HashMap<String, FileStatus>();
 for (FileStatus one : files) {
  if (isTempPath(one)) {
   Path onePath = one.getPath();
   Utilities.FILE_OP_LOGGER.trace("removeTempOrDuplicateFiles deleting {}", onePath);
   if (!fs.delete(onePath, true)) {
    throw new IOException("Unable to delete tmp file: " + onePath);
   }
  } else {
   // This would be a single file. See if we need to remove it.
   ponderRemovingTempOrDuplicateFile(fs, one, taskIdToFile);
  }
 }
 return taskIdToFile;
}

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

if (isTempPath(one)) {
 if (!fs.delete(one.getPath(), true)) {
  throw new IOException("Unable to delete tmp file: " + one.getPath());

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

if (isTempPath(one)) {
 if (!fs.delete(one.getPath(), true)) {
  throw new IOException("Unable to delete tmp file: " + one.getPath());

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

if (isTempPath(one)) {
 if (!fs.delete(one.getPath(), true)) {
  throw new IOException("Unable to delete tmp file: " + one.getPath());

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

Path itemStaging = item.getPath();
if (Utilities.isTempPath(item)) {

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

if (Utilities.isTempPath(item)) {

相关文章

微信公众号

最新文章

更多

Utilities类方法