Package org.codice.ddf.commands.solr
Class SolrCommands
java.lang.Object
org.codice.ddf.commands.catalog.CommandSupport
org.codice.ddf.commands.solr.SolrCommands
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
- Direct Known Subclasses:
BackupCommand,CacheCommand,ReindexCommand,RestoreCommand
public abstract class SolrCommands
extends org.codice.ddf.commands.catalog.CommandSupport
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected org.osgi.service.cm.ConfigurationAdminprotected static final Stringprotected static final org.slf4j.Loggerprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Pathprotected static final StringFields inherited from class org.codice.ddf.commands.catalog.CommandSupport
console, MS_PER_SECOND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancollectionExists(org.apache.solr.client.solrj.SolrClient client, String collection) protected final Stringprotected org.apache.solr.client.solrj.SolrClientprotected StringgetCoreUrl(String coreName) protected StringgetReplicationUrl(String coreName) protected static Stringprotected booleanisSolrClientAvailable(org.apache.solr.client.solrj.SolrClient solrClient) protected booleanprotected voidoptimizeCollection(org.apache.solr.client.solrj.SolrClient client, String collection) protected voidprintColor(org.fusesource.jansi.Ansi.Color color, String message) protected voidprintErrorMessage(String message) protected voidprintInfoMessage(String message) protected voidprintResponseErrorMessages(org.apache.solr.client.solrj.response.CollectionAdminResponse response) protected voidprintStatus(org.apache.solr.client.solrj.SolrClient client, String requestId) protected voidprintSuccessMessage(String message) voidsetConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin) protected voidshutdown(org.apache.solr.client.solrj.SolrClient client) Methods inherited from class org.codice.ddf.commands.catalog.CommandSupport
calculateRecordsPerSecond, printHeaderMessage, printProgressAndFlushMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.karaf.shell.api.action.Action
execute
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
configurationMap
-
NAMESPACE
- See Also:
-
configurationAdmin
protected org.osgi.service.cm.ConfigurationAdmin configurationAdmin -
DEFAULT_CORE_NAME
- See Also:
-
SEE_COMMAND_USAGE_MESSAGE
- See Also:
-
ZOOKEEPER_HOSTS_PROP
- See Also:
-
SYSTEM_PROPERTIES_PATH
-
SOLR_CLIENT_PROP
- See Also:
-
CLOUD_SOLR_CLIENT_TYPE
- See Also:
-
-
Constructor Details
-
SolrCommands
public SolrCommands()
-
-
Method Details
-
setConfigurationAdmin
public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin) -
printColor
- Overrides:
printColorin classorg.codice.ddf.commands.catalog.CommandSupport
-
printSuccessMessage
- Overrides:
printSuccessMessagein classorg.codice.ddf.commands.catalog.CommandSupport
-
printErrorMessage
- Overrides:
printErrorMessagein classorg.codice.ddf.commands.catalog.CommandSupport
-
printInfoMessage
-
getCloudSolrClient
protected org.apache.solr.client.solrj.SolrClient getCloudSolrClient() -
shutdown
- Throws:
IOException
-
isSystemConfiguredWithSolrCloud
protected boolean isSystemConfiguredWithSolrCloud() -
getCoreUrl
-
getBackupUrl
-
getSolrDataDir
-
getReplicationUrl
-
optimizeCollection
protected void optimizeCollection(org.apache.solr.client.solrj.SolrClient client, String collection) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
printStatus
-
printResponseErrorMessages
protected void printResponseErrorMessages(org.apache.solr.client.solrj.response.CollectionAdminResponse response) -
collectionExists
protected static boolean collectionExists(org.apache.solr.client.solrj.SolrClient client, String collection) throws IOException, org.apache.solr.client.solrj.SolrServerException - Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
isSolrClientAvailable
protected boolean isSolrClientAvailable(org.apache.solr.client.solrj.SolrClient solrClient)
-