本文整理了Java中org.apache.hadoop.hive.ql.exec.Utilities.getInputPaths()
方法的一些代码示例,展示了Utilities.getInputPaths()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.getInputPaths()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.exec.Utilities
类名称:Utilities
方法名:getInputPaths
[英]Computes a list of all input paths needed to compute the given MapWork. All aliases are considered and a merged list of input paths is returned. If any input path points to an empty table or partition a dummy file in the scratch dir is instead created and added to the list. This is needed to avoid special casing the operator pipeline for these cases.
[中]计算计算给定地图工作所需的所有输入路径的列表。将考虑所有别名,并返回输入路径的合并列表。如果任何输入路径指向空表或分区,则会在scratch dir中创建一个虚拟文件,并将其添加到列表中。这是为了避免在这些情况下对操作管道进行特殊套管。
代码示例来源:origin: apache/hive
/**
* On Tez we're not creating dummy files when getting/setting input paths.
* We let Tez handle the situation. We're also setting the paths in the AM
* so we don't want to depend on scratch dir and context.
*/
public static List<Path> getInputPathsTez(JobConf job, MapWork work) throws Exception {
String scratchDir = job.get(DagUtils.TEZ_TMP_DIR_KEY);
List<Path> paths = getInputPaths(job, work, new Path(scratchDir), null, true);
return paths;
}
代码示例来源:origin: apache/drill
/**
* On Tez we're not creating dummy files when getting/setting input paths.
* We let Tez handle the situation. We're also setting the paths in the AM
* so we don't want to depend on scratch dir and context.
*/
public static List<Path> getInputPathsTez(JobConf job, MapWork work) throws Exception {
String scratchDir = job.get(DagUtils.TEZ_TMP_DIR_KEY);
List<Path> paths = getInputPaths(job, work, new Path(scratchDir), null, true);
return paths;
}
代码示例来源:origin: apache/drill
List<Path> inputPaths = Utilities.getInputPaths(cloned, (MapWork) work,
scratchDir, context, false);
Utilities.setInputPaths(cloned, inputPaths);
代码示例来源:origin: apache/hive
List<Path> inputPaths = Utilities.getInputPaths(jobConf, mapWork, scratchDir, mock(Context.class), false);
assertEquals(inputPaths.size(), numOfPartitions);
for (int i=0; i<numOfPartitions; i++) {
代码示例来源:origin: apache/hive
MapWork mapWork = (MapWork) work;
cloned.setBoolean("mapred.task.is.map", true);
List<Path> inputPaths = Utilities.getInputPaths(cloned, mapWork,
scratchDir, context, false);
Utilities.setInputPaths(cloned, inputPaths);
代码示例来源:origin: apache/hive
Path scratchDir = new Path(HiveConf.getVar(jobConf, HiveConf.ConfVars.LOCALSCRATCHDIR));
List<Path> inputPaths1 = Utilities.getInputPaths(jobConf, mapWork1, scratchDir,
mock(Context.class), false);
inputPaths.addAll(inputPaths1);
assertFalse(nonExistentPath1.getFileSystem(conf).exists(nonExistentPath1));
List<Path> inputPaths2 = Utilities.getInputPaths(jobConf, mapWork2, scratchDir,
mock(Context.class), false);
inputPaths.addAll(inputPaths2);
代码示例来源:origin: apache/hive
List<Path> inputPaths = Utilities.getInputPaths(jobConf, mapWork,
new Path(HiveConf.getVar(jobConf, HiveConf.ConfVars.LOCALSCRATCHDIR)), mock(Context.class), false);
assertEquals(inputPaths.size(), numPartitions);
代码示例来源:origin: apache/hive
MapRedTask selectTask = (MapRedTask)plan.getRootTasks().get(0);
List<Path> inputPaths = Utilities.getInputPaths(newJob, selectTask.getWork().getMapWork(), emptyScratchDir, ctx, false);
Utilities.setInputPaths(newJob, inputPaths);
代码示例来源:origin: apache/hive
List<Path> inputPaths = Utilities.getInputPaths(job, mWork, emptyScratchDir, ctx, false);
Utilities.setInputPaths(job, inputPaths);
代码示例来源:origin: apache/drill
List<Path> inputPaths = Utilities.getInputPaths(job, mWork, emptyScratchDir, ctx, false);
Utilities.setInputPaths(job, inputPaths);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
/**
* On Tez we're not creating dummy files when getting/setting input paths.
* We let Tez handle the situation. We're also setting the paths in the AM
* so we don't want to depend on scratch dir and context.
*/
public static List<Path> getInputPathsTez(JobConf job, MapWork work) throws Exception {
String scratchDir = job.get(DagUtils.TEZ_TMP_DIR_KEY);
// we usually don't want to create dummy files for tez, however the metadata only
// optimization relies on it.
List<Path> paths = getInputPaths(job, work, new Path(scratchDir), null,
!work.isUseOneNullRowInputFormat());
return paths;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
List<Path> inputPaths = Utilities.getInputPaths(cloned, (MapWork) work,
scratchDir, context, false);
Utilities.setInputPaths(cloned, inputPaths);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
List<Path> inputPaths = Utilities.getInputPaths(job, mWork, emptyScratchDir, ctx, false);
Utilities.setInputPaths(job, inputPaths);
内容来源于网络,如有侵权,请联系作者删除!