HBASE-20649 Validate HFiles do not have PREFIX_TREE DataBlockEncoding
This commit is contained in:
parent
b837b89e6b
commit
147694bb08
|
@ -76,9 +76,8 @@ public class DataBlockEncodingValidator extends AbstractHBaseTool {
|
||||||
|
|
||||||
if (incompatibilities > 0) {
|
if (incompatibilities > 0) {
|
||||||
LOG.warn("There are {} column families with incompatible Data Block Encodings. Do not "
|
LOG.warn("There are {} column families with incompatible Data Block Encodings. Do not "
|
||||||
+ "upgrade until these encodings are converted to a supported one.", incompatibilities);
|
+ "upgrade until these encodings are converted to a supported one. "
|
||||||
LOG.warn("Check http://hbase.apache.org/book.html#upgrade2.0.prefix-tree.removed "
|
+ "Check https://s.apache.org/prefixtree for instructions.", incompatibilities);
|
||||||
+ "for instructions.");
|
|
||||||
} else {
|
} else {
|
||||||
LOG.info("The used Data Block Encodings are compatible with HBase 2.0.");
|
LOG.info("The used Data Block Encodings are compatible with HBase 2.0.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import org.slf4j.LoggerFactory;
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>validate-cp: Validates Co-processors compatibility</li>
|
* <li>validate-cp: Validates Co-processors compatibility</li>
|
||||||
* <li>validate-dbe: Check Data Block Encoding for column families</li>
|
* <li>validate-dbe: Check Data Block Encoding for column families</li>
|
||||||
|
* <li>validate-hfile: Check for corrupted HFiles</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
|
@ -49,6 +50,7 @@ public class PreUpgradeValidator implements Tool {
|
||||||
public static final String TOOL_NAME = "pre-upgrade";
|
public static final String TOOL_NAME = "pre-upgrade";
|
||||||
public static final String VALIDATE_CP_NAME = "validate-cp";
|
public static final String VALIDATE_CP_NAME = "validate-cp";
|
||||||
public static final String VALIDATE_DBE_NAME = "validate-dbe";
|
public static final String VALIDATE_DBE_NAME = "validate-dbe";
|
||||||
|
public static final String VALIDATE_HFILE = "validate-hfile";
|
||||||
|
|
||||||
private Configuration configuration;
|
private Configuration configuration;
|
||||||
|
|
||||||
|
@ -69,6 +71,8 @@ public class PreUpgradeValidator implements Tool {
|
||||||
VALIDATE_CP_NAME);
|
VALIDATE_CP_NAME);
|
||||||
System.out.printf(" %-15s Validate DataBlockEncodings are compatible with HBase%n",
|
System.out.printf(" %-15s Validate DataBlockEncodings are compatible with HBase%n",
|
||||||
VALIDATE_DBE_NAME);
|
VALIDATE_DBE_NAME);
|
||||||
|
System.out.printf(" %-15s Validate HFile contents are readable%n",
|
||||||
|
VALIDATE_HFILE);
|
||||||
System.out.println("For further information, please use command -h");
|
System.out.println("For further information, please use command -h");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +92,9 @@ public class PreUpgradeValidator implements Tool {
|
||||||
case VALIDATE_DBE_NAME:
|
case VALIDATE_DBE_NAME:
|
||||||
tool = new DataBlockEncodingValidator();
|
tool = new DataBlockEncodingValidator();
|
||||||
break;
|
break;
|
||||||
|
case VALIDATE_HFILE:
|
||||||
|
tool = new HFileContentValidator();
|
||||||
|
break;
|
||||||
case "-h":
|
case "-h":
|
||||||
printUsage();
|
printUsage();
|
||||||
return AbstractHBaseTool.EXIT_FAILURE;
|
return AbstractHBaseTool.EXIT_FAILURE;
|
||||||
|
|
Loading…
Reference in New Issue