Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.FileSystem.deleteSnapshot()


      Assert.assertTrue(webHdfs.exists(spath));
      final Path s1path = SnapshotTestHelper.getSnapshotRoot(foo, "s1");
      Assert.assertTrue(webHdfs.exists(s1path));

      // delete the two snapshots
      webHdfs.deleteSnapshot(foo, "s1");
      Assert.assertFalse(webHdfs.exists(s1path));
      webHdfs.deleteSnapshot(foo, spath.getName());
      Assert.assertFalse(webHdfs.exists(spath));
    } finally {
      if (cluster != null) {
View Full Code Here


      Assert.assertTrue(webHdfs.exists(s1path));

      // delete the two snapshots
      webHdfs.deleteSnapshot(foo, "s1");
      Assert.assertFalse(webHdfs.exists(s1path));
      webHdfs.deleteSnapshot(foo, spath.getName());
      Assert.assertFalse(webHdfs.exists(spath));
    } finally {
      if (cluster != null) {
        cluster.shutdown();
      }
View Full Code Here

      webHdfs.renameSnapshot(foo, "s1", "s2");
      Assert.assertFalse(webHdfs.exists(s1path));
      final Path s2path = SnapshotTestHelper.getSnapshotRoot(foo, "s2");
      Assert.assertTrue(webHdfs.exists(s2path));

      webHdfs.deleteSnapshot(foo, "s2");
      Assert.assertFalse(webHdfs.exists(s2path));
    } finally {
      if (cluster != null) {
        cluster.shutdown();
      }
View Full Code Here

      assertEquals(1, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 4. Disallow snapshots on and delete foo on the NN. The snapshot count
      // will go down to 0 and the snapshottable dir will be removed from the fs
      // tree.
      fs.deleteSnapshot(TEST_PATH, snapshotPath.getName());
      admin.disallowSnapshot(TEST_PATH);
      assertEquals(0, nnSnapshotManager.getNumSnapshots());
      assertEquals(0, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 5. Have the NN do a saveNamespace, writing out a new fsimage with
View Full Code Here

      assertEquals(1, secondarySnapshotManager.getNumSnapshottableDirs());
     
      // 4. Disallow snapshots on and delete foo on the NN. The snapshot count
      // will go down to 0 and the snapshottable dir will be removed from the fs
      // tree.
      fs.deleteSnapshot(TEST_PATH, snapshotPath.getName());
      admin.disallowSnapshot(TEST_PATH);
      assertEquals(0, nnSnapshotManager.getNumSnapshots());
      assertEquals(0, nnSnapshotManager.getNumSnapshottableDirs());
     
      // 5. Have the NN do a saveNamespace, writing out a new fsimage with
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.