|
@@ -64,7 +64,7 @@ public class DebugAdmin extends Configured implements Tool {
|
|
|
/**
|
|
|
* All the debug commands we can run.
|
|
|
*/
|
|
|
- private DebugCommand DEBUG_COMMANDS[] = {
|
|
|
+ private final DebugCommand[] DEBUG_COMMANDS = {
|
|
|
new VerifyMetaCommand(),
|
|
|
new ComputeMetaCommand(),
|
|
|
new RecoverLeaseCommand(),
|
|
@@ -74,7 +74,7 @@ public class DebugAdmin extends Configured implements Tool {
|
|
|
/**
|
|
|
* The base class for debug commands.
|
|
|
*/
|
|
|
- private abstract class DebugCommand {
|
|
|
+ private abstract static class DebugCommand {
|
|
|
final String name;
|
|
|
final String usageText;
|
|
|
final String helpText;
|
|
@@ -93,15 +93,15 @@ public class DebugAdmin extends Configured implements Tool {
|
|
|
/**
|
|
|
* The command for verifying a block metadata file and possibly block file.
|
|
|
*/
|
|
|
- private class VerifyMetaCommand extends DebugCommand {
|
|
|
+ private static class VerifyMetaCommand extends DebugCommand {
|
|
|
VerifyMetaCommand() {
|
|
|
super("verifyMeta",
|
|
|
-"verifyMeta -meta <metadata-file> [-block <block-file>]",
|
|
|
-" Verify HDFS metadata and block files. If a block file is specified, we" +
|
|
|
- System.lineSeparator() +
|
|
|
-" will verify that the checksums in the metadata file match the block" +
|
|
|
- System.lineSeparator() +
|
|
|
-" file.");
|
|
|
+ "verifyMeta -meta <metadata-file> [-block <block-file>]",
|
|
|
+ " Verify HDFS metadata and block files. If a block file is specified, we" +
|
|
|
+ System.lineSeparator() +
|
|
|
+ " will verify that the checksums in the metadata file match the block" +
|
|
|
+ System.lineSeparator() +
|
|
|
+ " file.");
|
|
|
}
|
|
|
|
|
|
int run(List<String> args) throws IOException {
|
|
@@ -209,7 +209,7 @@ public class DebugAdmin extends Configured implements Tool {
|
|
|
/**
|
|
|
* The command for verifying a block metadata file and possibly block file.
|
|
|
*/
|
|
|
- private class ComputeMetaCommand extends DebugCommand {
|
|
|
+ private static class ComputeMetaCommand extends DebugCommand {
|
|
|
ComputeMetaCommand() {
|
|
|
super("computeMeta",
|
|
|
"computeMeta -block <block-file> -out <output-metadata-file>",
|