public static class SolrCLI.RunExampleTool extends SolrCLI.ToolBase
Modifier and Type | Field and Description |
---|---|
protected File |
exampleDir |
protected org.apache.commons.exec.Executor |
executor |
protected String |
script |
protected File |
serverDir |
protected String |
urlScheme |
protected InputStream |
userInput |
stdout, verbose
Constructor and Description |
---|
RunExampleTool()
Default constructor used by the framework when running as a command-line application.
|
RunExampleTool(org.apache.commons.exec.Executor executor,
InputStream userInput,
PrintStream stdout) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
checkPortConflict(String solrUrl,
File solrHomeDir,
int port,
org.apache.commons.cli.CommandLine cli) |
protected void |
copyIfNeeded(File src,
File dest) |
protected String |
createCloudExampleCollection(int numNodes,
Scanner readInput,
boolean prompt,
String solrUrl) |
String |
getName() |
protected Map<String,Object> |
getNodeStatus(String solrUrl,
int maxWaitSecs) |
org.apache.commons.cli.Option[] |
getOptions() |
protected boolean |
isPortAvailable(int port) |
protected boolean |
isValidConfig(File configsetsDir,
String config) |
protected String |
prompt(Scanner s,
String prompt) |
protected String |
prompt(Scanner s,
String prompt,
String defaultValue) |
protected Integer |
promptForInt(Scanner s,
String prompt,
String label,
Integer defVal,
Integer min,
Integer max) |
protected Integer |
promptForPort(Scanner s,
int node,
String prompt,
Integer defVal) |
protected String |
readExtraArgs(String[] extraArgsArr) |
protected void |
runCloudExample(org.apache.commons.cli.CommandLine cli) |
protected void |
runDihExample(org.apache.commons.cli.CommandLine cli) |
protected void |
runExample(org.apache.commons.cli.CommandLine cli,
String exampleName) |
protected void |
runImpl(org.apache.commons.cli.CommandLine cli) |
protected void |
setCollectionConfigProperty(String solrUrl,
String collectionName,
String propName,
String propValue) |
protected File |
setupExampleDir(File serverDir,
File exampleParentDir,
String dirName) |
protected Map<String,Object> |
startSolr(File solrHomeDir,
boolean cloudMode,
org.apache.commons.cli.CommandLine cli,
int port,
String zkHost,
int maxWaitSecs) |
protected void |
waitToSeeLiveNodes(int maxWaitSecs,
String zkHost,
int numNodes) |
echo, echoIfVerbose, runTool
protected InputStream userInput
protected org.apache.commons.exec.Executor executor
protected String script
protected File serverDir
protected File exampleDir
protected String urlScheme
public RunExampleTool()
public RunExampleTool(org.apache.commons.exec.Executor executor, InputStream userInput, PrintStream stdout)
public String getName()
public org.apache.commons.cli.Option[] getOptions()
protected void runImpl(org.apache.commons.cli.CommandLine cli) throws Exception
runImpl
in class SolrCLI.ToolBase
Exception
protected void runDihExample(org.apache.commons.cli.CommandLine cli) throws Exception
Exception
protected void runExample(org.apache.commons.cli.CommandLine cli, String exampleName) throws Exception
Exception
protected void runCloudExample(org.apache.commons.cli.CommandLine cli) throws Exception
Exception
protected void setCollectionConfigProperty(String solrUrl, String collectionName, String propName, String propValue)
protected void waitToSeeLiveNodes(int maxWaitSecs, String zkHost, int numNodes)
protected Map<String,Object> startSolr(File solrHomeDir, boolean cloudMode, org.apache.commons.cli.CommandLine cli, int port, String zkHost, int maxWaitSecs) throws Exception
Exception
protected Map<String,Object> checkPortConflict(String solrUrl, File solrHomeDir, int port, org.apache.commons.cli.CommandLine cli)
protected String createCloudExampleCollection(int numNodes, Scanner readInput, boolean prompt, String solrUrl) throws Exception
Exception
protected Map<String,Object> getNodeStatus(String solrUrl, int maxWaitSecs) throws Exception
Exception
protected File setupExampleDir(File serverDir, File exampleParentDir, String dirName) throws IOException
IOException
protected void copyIfNeeded(File src, File dest) throws IOException
IOException
protected boolean isPortAvailable(int port)
protected Integer promptForInt(Scanner s, String prompt, String label, Integer defVal, Integer min, Integer max)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.