Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FileContext.rename()


    FileContext localFc = FileContext.getLocalFSFileContext();
    for (FileStatus edits: localFc.util().globStatus(editsWildcard)) {
      Path src = edits.getPath();
      Path dst = new Path(new File(nameDir, "current").getAbsolutePath(),
        src.getName());
      localFc.rename(src, dst);
    }

    // Start a namenode to try to load the edits.
    cluster = new MiniDFSCluster.Builder(conf)
      .format(false)


    long atime = mtime;
    dfs.setTimes(pathFileCreate, mtime, atime);
    // OP_SET_QUOTA 14
    dfs.setQuota(pathDirectoryMkdir, 1000L, HdfsConstants.QUOTA_DONT_SET);
    // OP_RENAME 15
    fc.rename(pathFileCreate, pathFileMoved, Rename.NONE);
    // OP_CONCAT_DELETE 16
    Path   pathConcatTarget = new Path("/file_concat_target");
    Path[] pathConcatFiles  = new Path[2];
    pathConcatFiles[0]      = new Path("/file_concat_0");
    pathConcatFiles[1]      = new Path("/file_concat_1");

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.