public static class SolrCLI.AssertTool extends SolrCLI.ToolBase
stdout, verbose
Constructor and Description |
---|
AssertTool() |
AssertTool(PrintStream stdout) |
Modifier and Type | Method and Description |
---|---|
static int |
assertFileExists(String directory) |
static int |
assertFileNotExists(String directory) |
static int |
assertNotRootUser() |
static int |
assertRootUser() |
static int |
assertSolrNotRunning(String url) |
static int |
assertSolrNotRunningInCloudMode(String url) |
static int |
assertSolrRunning(String url) |
static int |
assertSolrRunningInCloudMode(String url) |
static String |
currentUser() |
String |
getName() |
org.apache.commons.cli.Option[] |
getOptions() |
protected int |
runAssert(org.apache.commons.cli.CommandLine cli)
Custom run method which may return exit code
|
protected void |
runImpl(org.apache.commons.cli.CommandLine cli) |
int |
runTool(org.apache.commons.cli.CommandLine cli) |
static int |
sameUser(String directory) |
static String |
userForDir(Path pathToDir) |
echo, echoIfVerbose
public AssertTool()
public AssertTool(PrintStream stdout)
public String getName()
public org.apache.commons.cli.Option[] getOptions()
public int runTool(org.apache.commons.cli.CommandLine cli) throws Exception
runTool
in interface SolrCLI.Tool
runTool
in class SolrCLI.ToolBase
Exception
protected void runImpl(org.apache.commons.cli.CommandLine cli) throws Exception
runImpl
in class SolrCLI.ToolBase
Exception
protected int runAssert(org.apache.commons.cli.CommandLine cli) throws Exception
cli
- the command line objectException
- if a tool failed, e.g. authentication failurepublic static int assertSolrRunning(String url) throws Exception
Exception
public static int assertSolrNotRunning(String url) throws Exception
Exception
public static int assertSolrRunningInCloudMode(String url) throws Exception
Exception
public static int assertSolrNotRunningInCloudMode(String url) throws Exception
Exception
public static int assertFileExists(String directory) throws Exception
Exception
public static int assertFileNotExists(String directory) throws Exception
Exception
public static String currentUser()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.