当前位置: 首页>>代码示例>>Java>>正文


Java Path.mergePaths方法代码示例

本文整理汇总了Java中org.apache.hadoop.fs.Path.mergePaths方法的典型用法代码示例。如果您正苦于以下问题:Java Path.mergePaths方法的具体用法?Java Path.mergePaths怎么用?Java Path.mergePaths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.fs.Path的用法示例。


在下文中一共展示了Path.mergePaths方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: formPath

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
private Path formPath(String dirOrFile1, String dirOrFile2)
{
    String base = config.getMetaserverStore();
    String path1 = dirOrFile1;
    String path2 = dirOrFile2;
    while (base.endsWith("/")) {
        base = base.substring(0, base.length() - 2);
    }
    if (!path1.startsWith("/")) {
        path1 = "/" + path1;
    }
    if (path1.endsWith("/")) {
        path1 = path1.substring(0, path1.length() - 2);
    }
    if (!path2.startsWith("/")) {
        path2 = "/" + path2;
    }
    return Path.mergePaths(Path.mergePaths(new Path(base), new Path(path1)), new Path(path2));
}
 
开发者ID:dbiir,项目名称:paraflow,代码行数:20,代码来源:MetaDataQuery.java

示例2: formPath

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
private Path formPath(String dirOrFile)
{
    String base = config.getHDFSWarehouse();
    String path = dirOrFile;
    while (base.endsWith("/")) {
        base = base.substring(0, base.length() - 2);
    }
    if (!path.startsWith("/")) {
        path = "/" + path;
    }
    return Path.mergePaths(new Path(base), new Path(path));
}
 
开发者ID:dbiir,项目名称:paraflow,代码行数:13,代码来源:FSFactory.java

示例3: addPrefix

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
protected Path addPrefix(Path path) {
  return Path.mergePaths(new Path(PATH_PREFIX), path);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestHttpFSFileSystemLocalFileSystem.java

示例4: createWithFullSchema

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
public static FileSelection createWithFullSchema(final FileSystemWrapper fs, final String parent, final String fullSchemaPath) throws IOException {
  final Path combined = Path.mergePaths(new Path(parent), PathUtils.toFSPath(fullSchemaPath));
  return create(fs, combined);
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:FileSelection.java

示例5: getUploadLocation

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
private Path getUploadLocation(FilePath filePath, String extension) {
  FilePath filePathWithExtension = filePath.rename(format("%s_%s", filePath.getFileName().getName(), extension));
  return Path.mergePaths(config.getUploadsDir(), PathUtils.toFSPath(filePathWithExtension.toPathList()));
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:HomeFileTool.java

示例6: getStagingLocation

import org.apache.hadoop.fs.Path; //导入方法依赖的package包/类
/**
 * Temporary location for file upload.
 * Add uuid so that this location remains unique even across file renames.
 * @param filePath file path in under home space
 * @param extension file extension
 * @return location of staging dir where user file is uploaded.
 */
private Path getStagingLocation(FilePath filePath, String extension) {
  FilePath uniquePath = filePath.rename(format("%s_%s-%s", filePath.getFileName().toString(), extension, UUID.randomUUID().toString()));
  return Path.mergePaths(config.getStagingDir(), PathUtils.toFSPath(uniquePath.toPathList()));
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:12,代码来源:HomeFileTool.java


注:本文中的org.apache.hadoop.fs.Path.mergePaths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。