Examples of HFileV1Detector


Examples of org.apache.hadoop.hbase.util.HFileV1Detector

  }

  private int doHFileV1Check() throws Exception {
    String[] args = null;
    if (dirToCheckForHFileV1 != null) args = new String[] { "-p" + dirToCheckForHFileV1 };
    return ToolRunner.run(getConf(), new HFileV1Detector(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

   * Tests a 0.94 filesystem for any HFileV1.
   * @throws Exception
   */
  @Test
  public void testHFileV1Detector() throws Exception {
    assertEquals(0, ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), null));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

    LOG.debug("target columnFamilyDir: " + columnFamilyDir);
    // now insert a corrupt file in the columnfamily.
    Path corruptFile = new Path(columnFamilyDir, "corrupt_file");
    if (!fs.createNewFile(corruptFile)) throw new IOException("Couldn't create corrupt file: "
        + corruptFile);
    assertEquals(1, ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), null));
    // remove the corrupt file
    FileSystem.get(TEST_UTIL.getConfiguration()).delete(corruptFile, false);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

    boolean preNSTempPathExists = false;
    assertTrue(HFileLink.isHFileLink(aFileLink));
    HFileLink hFileLink = new HFileLink(TEST_UTIL.getConfiguration(), aFileLink);
    assertTrue(hFileLink.getArchivePath().toString().startsWith(rootDir.toString()));

    HFileV1Detector t = new HFileV1Detector();
    t.setConf(TEST_UTIL.getConfiguration());
    FileLink fileLink = t.getFileLinkWithPreNSPath(aFileLink);
    //assert it has 6 paths (2 NS, 2 Pre NS, and 2 .tmp)  to look.
    assertTrue(fileLink.getLocations().length == 6);
    for (Path p : fileLink.getLocations()) {
      if (p.equals(preNamespaceArchivePath)) preNSArchivePathExists = true;
      if (p.equals(preNamespaceTablePath)) preNSTablePathExists = true;
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

  public void testADirForHFileV1() throws Exception {
    Path tablePath = new Path(hbaseRootDir, "foo");
    System.out.println("testADirForHFileV1: " + tablePath.makeQualified(fs));
    System.out.println("Passed: " + hbaseRootDir + "/foo");
    assertEquals(0,
      ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), new String[] { "-p"
          + "foo" }));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

  }

  private int doHFileV1Check() throws Exception {
    String[] args = null;
    if (dirToCheckForHFileV1 != null) args = new String[] { "-p" + dirToCheckForHFileV1 };
    return ToolRunner.run(getConf(), new HFileV1Detector(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

   * Tests a 0.94 filesystem for any HFileV1.
   * @throws Exception
   */
  @Test
  public void testHFileV1Detector() throws Exception {
    assertEquals(0, ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), null));
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

    LOG.debug("target columnFamilyDir: " + columnFamilyDir);
    // now insert a corrupt file in the columnfamily.
    Path corruptFile = new Path(columnFamilyDir, "corrupt_file");
    if (!fs.createNewFile(corruptFile)) throw new IOException("Couldn't create corrupt file: "
        + corruptFile);
    assertEquals(1, ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), null));
    // remove the corrupt file
    FileSystem.get(TEST_UTIL.getConfiguration()).delete(corruptFile, false);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

    boolean preNSTempPathExists = false;
    assertTrue(HFileLink.isHFileLink(aFileLink));
    HFileLink hFileLink = new HFileLink(TEST_UTIL.getConfiguration(), aFileLink);
    assertTrue(hFileLink.getArchivePath().toString().startsWith(rootDir.toString()));

    HFileV1Detector t = new HFileV1Detector();
    t.setConf(TEST_UTIL.getConfiguration());
    FileLink fileLink = t.getFileLinkWithPreNSPath(aFileLink);
    //assert it has 6 paths (2 NS, 2 Pre NS, and 2 .tmp)  to look.
    assertTrue(fileLink.getLocations().length == 6);
    for (Path p : fileLink.getLocations()) {
      if (p.equals(preNamespaceArchivePath)) preNSArchivePathExists = true;
      if (p.equals(preNamespaceTablePath)) preNSTablePathExists = true;
View Full Code Here

Examples of org.apache.hadoop.hbase.util.HFileV1Detector

  public void testADirForHFileV1() throws Exception {
    Path tablePath = new Path(hbaseRootDir, "foo");
    System.out.println("testADirForHFileV1: " + tablePath.makeQualified(fs));
    System.out.println("Passed: " + hbaseRootDir + "/foo");
    assertEquals(0,
      ToolRunner.run(TEST_UTIL.getConfiguration(), new HFileV1Detector(), new String[] { "-p"
          + "foo" }));
  }
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.