@@ -0,0 +1,1721 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.shell.command;%0A%0Aimport alluxio.AlluxioURI;%0Aimport alluxio.client.file.FileSystem;%0Aimport alluxio.exception.AlluxioException;%0A%0Aimport org.apache.commons.cli.CommandLine;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * Command for checking the consistency of a file or folder between Alluxio and the under storage.%0A */%0Apublic class CheckConsistencyCommand extends AbstractShellCommand %7B%0A  public CheckConsistencyCommand(FileSystem fs) %7B%0A    super(fs);%0A  %7D%0A%0A  @Override%0A  int getNumOfArgs() %7B%0A    return 1;%0A  %7D%0A%0A  @Override%0A  public String getCommandName() %7B%0A    return %22checkConsistency%22;%0A  %7D%0A%0A  @Override%0A  public void run(CommandLine cl) throws AlluxioException, IOException %7B%0A    String%5B%5D args = cl.getArgs();%0A    AlluxioURI root = new AlluxioURI(args%5B0%5D);%0A  %7D%0A%0A  @Override%0A  public String getUsage() %7B%0A    return %22checkConsistency %3CAlluxio path%3E%22;%0A  %7D%0A%0A  @Override%0A  public String getDescription() %7B%0A    return %22Checks the consistency of a persisted file or directory in Alluxio. Any files or %22 +%0A        %22directories which only exist in Alluxio or do not match the metadata of files in the %22 +%0A        %22under storage will be returned. An administrator should then reconcile the differences.%22;%0A  %7D%0A%7D%0A

Add shell command for check consistency.