@Test 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" })); }
@Override public int run(String[] args) throws Exception { if (!parseOption(args)) { printUsage(); return -1; } if (checkForHFileV1) { int res = doHFileV1Check(); if (res == 0) LOG.info("No HFileV1 found."); else { LOG.warn("There are some HFileV1, or corrupt files (files with incorrect major version)."); } return res; } else if (upgrade) { if (isAnyHBaseProcessAlive()) { LOG.error("Some HBase processes are still alive, or znodes not expired yet. " + "Please stop them before upgrade or try after some time."); throw new IOException("Some HBase processes are still alive, or znodes not expired yet"); } return executeUpgrade(); } return -1; }
UpgradeTo96 extends Configured implements Tool { @Override public int run(String[] args) throws Exception { if (!parseOption(args)) { printUsage(); return -1; } if (checkForHFileV1) { int res = doHFileV1Check(); if (res == 0) LOG.info("No HFileV1 found."); else { LOG.warn("There are some HFileV1, or corrupt files (files with incorrect major version)."); } return res; } else if (upgrade) { if (isAnyHBaseProcessAlive()) { LOG.error("Some HBase processes are still alive, or znodes not expired yet. " + "Please stop them before upgrade or try after some time."); throw new IOException("Some HBase processes are still alive, or znodes not expired yet"); } return executeUpgrade(); } return -1; } }
UpgradeTo96 extends Configured implements Tool { @Override public int run(String[] args) throws Exception { if (!parseOption(args)) { printUsage(); return -1; } if (checkForHFileV1) { int res = doHFileV1Check(); if (res == 0) LOG.info("No HFileV1 found."); else { LOG.warn("There are some HFileV1, or corrupt files (files with incorrect major version)."); } return res; } else if (upgrade) { if (isAnyHBaseProcessAlive()) { LOG.error("Some HBase processes are still alive, or znodes not expired yet. " + "Please stop them before upgrade or try after some time."); throw new IOException("Some HBase processes are still alive, or znodes not expired yet"); } return executeUpgrade(); } return -1; } UpgradeTo96(); }
UpgradeTo96 extends Configured implements Tool { @Override public int run(String[] args) throws Exception { if (!parseOption(args)) { printUsage(); return -1; } if (checkForHFileV1) { int res = doHFileV1Check(); if (res == 0) LOG.info("No HFileV1 found."); else { LOG.warn("There are some HFileV1, or corrupt files (files with incorrect major version)."); } return res; } else if (upgrade) { if (isAnyHBaseProcessAlive()) { LOG.error("Some HBase processes are still alive, or znodes not expired yet. " + "Please stop them before upgrade or try after some time."); throw new IOException("Some HBase processes are still alive, or znodes not expired yet"); } return executeUpgrade(); } return -1; } UpgradeTo96(); @Override int run(String[] args); static void main(String[] args); }
UpgradeTo96 extends Configured implements Tool { @Override public int run(String[] args) throws Exception { if (!parseOption(args)) { printUsage(); return -1; } if (checkForHFileV1) { int res = doHFileV1Check(); if (res == 0) LOG.info("No HFileV1 found."); else { LOG.warn("There are some HFileV1, or corrupt files (files with incorrect major version)."); } return res; } else if (upgrade) { if (isAnyHBaseProcessAlive()) { LOG.error("Some HBase processes are still alive, or znodes not expired yet. " + "Please stop them before upgrade or try after some time."); throw new IOException("Some HBase processes are still alive, or znodes not expired yet"); } return executeUpgrade(); } return -1; } UpgradeTo96(); @Override int run(String[] args); static void main(String[] args);  }