本文整理了Java中org.apache.hadoop.hive.ql.metadata.Hive.mvFile()
方法的一些代码示例,展示了Hive.mvFile()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hive.mvFile()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Hive
类名称:Hive
方法名:mvFile
[英]Moves a file from one Path to another. If isRenameAllowed is true then the FileSystem#rename(Path,Path) method is used to move the file. If its false then the data is copied, if isSrcLocal is true then the FileSystem#copyFromLocalFile(Path,Path) method is used, else FileUtils#copy(FileSystem,Path,FileSystem,Path,boolean,boolean,HiveConf) is used.
If the destination file already exists, then copy[counter] is appended to the file name, where counter is an integer starting from 1.
[中]将文件从一个路径移动到另一个路径。如果isRenameAllowed为true,则使用FileSystem#rename(Path,Path)方法移动文件。如果为false,则复制数据;如果isSrcLocal为true,则使用FileSystem#copyFromLocalFile(Path,Path)方法,否则使用FileUtils#copy(FileSystem,Path,FileSystem,Path,boolean,boolean,HiveConf)。
如果目标文件已存在,则会将_copy_[counter]追加到文件名,其中counter是从1开始的整数。
代码示例来源:origin: apache/hive
Path destPath = mvFile(conf, srcFs, srcP, destFs, destf, isSrcLocal, isOverwrite, isRenameAllowed,
acidRename ? taskId++ : -1);
代码示例来源:origin: apache/drill
if (null == pool) {
try {
Path destPath = mvFile(conf, srcFs, srcP, destFs, destf, isSrcLocal, isRenameAllowed);
内容来源于网络,如有侵权,请联系作者删除!