@InterfaceAudience.LimitedPrivate(value="Tools") public class CoprocessorValidator extends AbstractHBaseTool
Modifier and Type | Class and Description |
---|---|
private static class |
CoprocessorValidator.ResolverUrlClassLoader
This classloader implementation calls
ClassLoader.resolveClass(Class)
method for every loaded class. |
Modifier and Type | Field and Description |
---|---|
private CoprocessorMethods |
branch1 |
private List<String> |
classes |
private boolean |
config |
private CoprocessorMethods |
current |
private boolean |
dieOnWarnings |
private List<String> |
jars |
private static org.slf4j.Logger |
LOG |
private List<Pattern> |
tablePatterns |
cmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION
Constructor and Description |
---|
CoprocessorValidator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addOptions()
Override this to add command-line options using
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods. |
private List<URL> |
buildClasspath(List<String> jars) |
private CoprocessorValidator.ResolverUrlClassLoader |
createClassLoader(ClassLoader parent,
org.apache.hadoop.fs.Path path) |
private CoprocessorValidator.ResolverUrlClassLoader |
createClassLoader(URL[] urls) |
private CoprocessorValidator.ResolverUrlClassLoader |
createClassLoader(URL[] urls,
ClassLoader parent) |
protected int |
doWork()
The "main function" of the tool
|
protected void |
printUsage() |
protected void |
processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
This method is called to process the options after they have been parsed.
|
private void |
validate(ClassLoader classLoader,
String className,
List<CoprocessorViolation> violations) |
void |
validateClasses(ClassLoader classLoader,
List<String> classNames,
List<CoprocessorViolation> violations) |
void |
validateClasses(ClassLoader classLoader,
String[] classNames,
List<CoprocessorViolation> violations) |
protected void |
validateTables(ClassLoader classLoader,
Admin admin,
Pattern pattern,
List<CoprocessorViolation> violations) |
private void |
validateTables(ClassLoader classLoader,
Pattern pattern,
List<CoprocessorViolation> violations) |
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, getOptionAsDouble, getOptionAsInt, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, processOldArgs, run, setConf
private static final org.slf4j.Logger LOG
private CoprocessorMethods branch1
private CoprocessorMethods current
private final List<Pattern> tablePatterns
private boolean config
private boolean dieOnWarnings
public CoprocessorValidator()
private CoprocessorValidator.ResolverUrlClassLoader createClassLoader(URL[] urls)
private CoprocessorValidator.ResolverUrlClassLoader createClassLoader(URL[] urls, ClassLoader parent)
private CoprocessorValidator.ResolverUrlClassLoader createClassLoader(ClassLoader parent, org.apache.hadoop.fs.Path path) throws IOException
IOException
private void validate(ClassLoader classLoader, String className, List<CoprocessorViolation> violations)
public void validateClasses(ClassLoader classLoader, List<String> classNames, List<CoprocessorViolation> violations)
public void validateClasses(ClassLoader classLoader, String[] classNames, List<CoprocessorViolation> violations)
protected void validateTables(ClassLoader classLoader, Admin admin, Pattern pattern, List<CoprocessorViolation> violations) throws IOException
IOException
private void validateTables(ClassLoader classLoader, Pattern pattern, List<CoprocessorViolation> violations) throws IOException
IOException
protected void printUsage()
printUsage
in class AbstractHBaseTool
protected void addOptions()
AbstractHBaseTool
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods.addOptions
in class AbstractHBaseTool
protected void processOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd)
AbstractHBaseTool
processOptions
in class AbstractHBaseTool
private List<URL> buildClasspath(List<String> jars) throws IOException
IOException
protected int doWork() throws Exception
AbstractHBaseTool
doWork
in class AbstractHBaseTool
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.