Examples of allowSnapshot()


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

   * @exception IOException
   */
  public void allowSnapshot(String[] argv) throws IOException {  
    DistributedFileSystem dfs = getDFS();
    try {
      dfs.allowSnapshot(new Path(argv[1]));
    } catch (SnapshotException e) {
      throw new RemoteException(e.getClass().getName(), e.getMessage());
    }
    System.out.println("Allowing snaphot on " + argv[1] + " succeeded");
  }
View Full Code Here

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

        LOG.debug("got token " + t);
      }

      final Path snapshot = new Path("/snapshot");
      hdfs.mkdirs(snapshot);
      hdfs.allowSnapshot(snapshot);
      hdfs.mkdirs(new Path("/snapshot/1"));
      hdfs.delete(snapshot, true);

      // Write results to the fsimage file
      hdfs.setSafeMode(SafeModeAction.SAFEMODE_ENTER, false);
View Full Code Here

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

      assertTrue(runFsck.contains("HEALTHY"));
      final String fileName = "/srcdat";
      DistributedFileSystem hdfs = cluster.getFileSystem();
      Path file1 = new Path(fileName);
      DFSTestUtil.createFile(hdfs, file1, 1024, (short) 1, 1000L);
      hdfs.allowSnapshot(new Path("/"));
      hdfs.createSnapshot(new Path("/"), "mySnapShot");
      runFsck = runFsck(conf, 0, true, "/", "-includeSnapshots", "-files");
      assertTrue(runFsck.contains("/.snapshot/mySnapShot/srcdat"));
      runFsck = runFsck(conf, 0, true, "/", "-files");
      assertFalse(runFsck.contains("mySnapShot"));
View Full Code Here

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

   * @exception IOException
   */
  public void allowSnapshot(String[] argv) throws IOException {  
    DistributedFileSystem dfs = getDFS();
    try {
      dfs.allowSnapshot(new Path(argv[1]));
    } catch (SnapshotException e) {
      throw new RemoteException(e.getClass().getName(), e.getMessage());
    }
    System.out.println("Allowing snaphot on " + argv[1] + " succeeded");
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.client.HdfsAdmin.allowSnapshot()

      assertEquals(0, secondarySnapshotManager.getNumSnapshots());
      assertEquals(0, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 1. Create a snapshottable directory foo on the NN.
      fs.mkdirs(TEST_PATH);
      admin.allowSnapshot(TEST_PATH);
      assertEquals(0, nnSnapshotManager.getNumSnapshots());
      assertEquals(1, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 2. Create a snapshot of the dir foo. This will be referenced both in
      // the SnapshotManager as well as in the file system tree. The snapshot
View Full Code Here

Examples of org.apache.hadoop.hdfs.client.HdfsAdmin.allowSnapshot()

      assertEquals(0, secondarySnapshotManager.getNumSnapshots());
      assertEquals(0, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 1. Create a snapshottable directory foo on the NN.
      fs.mkdirs(TEST_PATH);
      admin.allowSnapshot(TEST_PATH);
      assertEquals(0, nnSnapshotManager.getNumSnapshots());
      assertEquals(1, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 2. Create a snapshot of the dir foo. This will be referenced both in
      // the SnapshotManager as well as in the file system tree. The snapshot
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.