Examples of saveNamespace()


Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      System.err.println("FileSystem is " + fs.getUri());
      return exitCode;
    }

    DistributedFileSystem dfs = (DistributedFileSystem) fs;
    dfs.saveNamespace();
    exitCode = 0;
  
    return exitCode;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      ((DFSOutputStream) out.getWrappedStream()).hsync(EnumSet
          .of(SyncFlag.UPDATE_LENGTH));

      // checkpoint
      fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      fs.saveNamespace();
      fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);

      cluster.restartNameNode();
      cluster.waitActive();
      fs = cluster.getFileSystem();
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

    MiniDFSCluster cluster = null;
    try {
      cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();
      DistributedFileSystem fs = cluster.getFileSystem();
      fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
      fs.saveNamespace();
      fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
      File currentDir = FSImageTestUtil.getNameNodeCurrentDirs(cluster, 0).get(
          0);
      File fsimage = FSImageTestUtil.findNewestImageFile(currentDir
          .getAbsolutePath());
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      long mtimeLink = hdfs.getFileLinkStatus(link).getModificationTime();
      long atimeLink = hdfs.getFileLinkStatus(link).getAccessTime();

      // save namespace and restart cluster
      hdfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_ENTER);
      hdfs.saveNamespace();
      hdfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_LEAVE);
      cluster.shutdown();
      cluster = new MiniDFSCluster.Builder(conf).format(false)
          .numDataNodes(1).build();
      cluster.waitActive();
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      hdfs.setXAttr(xattr, "user.a3", null);
      writtenFiles.put(xattr.toString(), hdfs.getFileStatus(xattr));

      // Write results to the fsimage file
      hdfs.setSafeMode(SafeModeAction.SAFEMODE_ENTER, false);
      hdfs.saveNamespace();

      // Determine location of fsimage file
      originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil
          .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));
      if (originalFsimage == null) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

          aclEntry(ACCESS, OTHER, NONE)));
      writtenAcls.put(file.toString(), hdfs.getAclStatus(file));

      // Write results to the fsimage file
      hdfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_ENTER, false);
      hdfs.saveNamespace();

      // Determine the location of the fsimage file
      originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil
          .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));
      if (originalFsimage == null) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

   */
  public int saveNamespace() throws IOException {
    int exitCode = -1;

    DistributedFileSystem dfs = getDFS();
    dfs.saveNamespace();
    exitCode = 0;
  
    return exitCode;
  }

View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      System.err.println("FileSystem is " + fs.getUri());
      return exitCode;
    }

    DistributedFileSystem dfs = (DistributedFileSystem) fs;
    dfs.saveNamespace();
    exitCode = 0;
  
    return exitCode;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

      } else {
        printUsage("saveNamespace");
        return exitCode;
      }
    }
    dfs.saveNamespace(force, uncompressed);
    return 0;
  }

  /**
   * Command to ask the namenode to reread the hosts and excluded hosts
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.saveNamespace()

        proxy.getProxy().saveNamespace();
        System.out.println("Save namespace successful for " +
            proxy.getAddress());
      }
    } else {
      dfs.saveNamespace();
      System.out.println("Save namespace successful");
    }
    exitCode = 0;
  
    return exitCode;
View Full Code Here
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.