Package org.apache.hadoop.hdfs

Examples of org.apache.hadoop.hdfs.DistributedRaidFileSystem.rename()


      Path srcParityPath = parity.getPath();
      assertTrue(raidFs.exists(srcParityPath));
     
      raidFs.mkdirs(destPath);
      // do the rename file
      assertTrue(raidFs.rename(files[0], new Path(destPath, "file0")));
      // verify the results.
      assertFalse(raidFs.exists(files[0]));
      assertTrue(raidFs.exists(new Path(destPath, "file0")));
      assertTrue(raidFs.exists(srcParityPath));
     
View Full Code Here


      assertFalse(raidFs.exists(files[0]));
      assertTrue(raidFs.exists(new Path(destPath, "file0")));
      assertTrue(raidFs.exists(srcParityPath));
     
      // rename the left files
      assertTrue(raidFs.rename(files[1], new Path(destPath, "file1")));
      assertTrue(raidFs.rename(files[2], new Path(destPath, "file2")));
      assertFalse(raidFs.exists(srcParityPath));
     
      Path newParityPath = new Path(codec.parityDirectory,
          "user/dikang/raidtest_new");
View Full Code Here

      assertTrue(raidFs.exists(new Path(destPath, "file0")));
      assertTrue(raidFs.exists(srcParityPath));
     
      // rename the left files
      assertTrue(raidFs.rename(files[1], new Path(destPath, "file1")));
      assertTrue(raidFs.rename(files[2], new Path(destPath, "file2")));
      assertFalse(raidFs.exists(srcParityPath));
     
      Path newParityPath = new Path(codec.parityDirectory,
          "user/dikang/raidtest_new");
      assertTrue(raidFs.exists(newParityPath));
View Full Code Here

      ParityFilePair parity = ParityFilePair.getParityFile(
          codec, stat, conf);
      Path srcParityPath = parity.getPath();
      assertTrue(raidFs.exists(srcParityPath));
      // do the rename file
      assertTrue(raidFs.rename(dirPath, destPath));
      // verify the results.
      assertFalse(raidFs.exists(dirPath));
      assertTrue(raidFs.exists(destPath));
      assertFalse(raidFs.exists(srcParityPath));
      FileStatus srcDest = raidFs.getFileStatus(destPath);
View Full Code Here

            "You can not delete a parity file"));
      }
     
      // try to rename the parity
      try {
        raidFs.rename(srcParityPath, destPath);
        fail();
      } catch (IOException e) {
        LOG.warn("Expected exception: " + e.getMessage(), e);
        assertTrue(e.getMessage().startsWith(
            "You can not rename a parity file"));
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.