Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.HardLink$HardLinkCGUnix


   * @param fromDir directory where the snapshot is stored
   * @param toDir the current data directory
   * @throws IOException if error occurs during hardlink
   */
  private void linkAllBlocks(File fromDir, File toDir) throws IOException {
    HardLink hardLink = new HardLink();
    // do the link
    int diskLayoutVersion = this.getLayoutVersion();
    if (LayoutVersion.supports(Feature.APPEND_RBW_DIR, diskLayoutVersion)) {
      // hardlink finalized blocks in tmpDir/finalized
      linkBlocks(new File(fromDir, STORAGE_DIR_FINALIZED),
View Full Code Here


        assert srcNSDir.exists() : "Source directory must exist.";
        File mergeTmpNSDir = nsStorage.getNsRoot(mergeTmpDir);
        File srcCurNsDir = new File(srcNSDir, STORAGE_DIR_CURRENT);
        File mergeTmpCurNSDir = new File(mergeTmpNSDir, STORAGE_DIR_CURRENT);
        // hardlink all blocks 
        HardLink hardLink = new HardLink();
        linkBlocks(new File(srcCurNsDir, STORAGE_DIR_FINALIZED),
            new File(mergeTmpCurNSDir, STORAGE_DIR_FINALIZED),
            nsInfo.getLayoutVersion(), hardLink, true);
        linkBlocks(new File(srcCurNsDir, STORAGE_DIR_RBW),
            new File(mergeTmpCurNSDir, STORAGE_DIR_RBW),
View Full Code Here

      }
    }
   
    private void upgrade(int oldLayoutVersion, int curLayoutVersion,
        File tmpDir, File curDir) throws IOException {
      HardLink hardLink = new HardLink();
      if (oldLayoutVersion <= FSConstants.FEDERATION_VERSION) {
        // upgrade from a federation version to a newer federation version
        // link top directory
        linkBlocks(new File(tmpDir, STORAGE_DIR_FINALIZED),
            new File(curDir, STORAGE_DIR_FINALIZED), curLayoutVersion,
View Full Code Here

        assert srcNSDir.exists() : "Source directory must exist.";
        File mergeTmpNSDir = nsStorage.getNsRoot(mergeTmpDir);
        File srcCurNsDir = new File(srcNSDir, STORAGE_DIR_CURRENT);
        File mergeTmpCurNSDir = new File(mergeTmpNSDir, STORAGE_DIR_CURRENT);
        // hardlink all blocks 
        HardLink hardLink = new HardLink();
        linkBlocks(new File(srcCurNsDir, STORAGE_DIR_FINALIZED),
            new File(mergeTmpCurNSDir, STORAGE_DIR_FINALIZED),
            nsInfo.getLayoutVersion(), hardLink, true);
        linkBlocks(new File(srcCurNsDir, STORAGE_DIR_RBW),
            new File(mergeTmpCurNSDir, STORAGE_DIR_RBW),
View Full Code Here

      }
    }
   
    private void upgrade(int oldLayoutVersion, int curLayoutVersion,
        File tmpDir, File curDir) throws IOException {
      HardLink hardLink = new HardLink();
      if (oldLayoutVersion <= FSConstants.FEDERATION_VERSION) {
        // upgrade from a federation version to a newer federation version
        // link top directory
        linkBlocks(new File(tmpDir, STORAGE_DIR_FINALIZED),
            new File(curDir, STORAGE_DIR_FINALIZED), curLayoutVersion,
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.HardLink$HardLinkCGUnix

Copyright © 2018 www.massapicom. 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.