Module org.elasticsearch.server
Package org.elasticsearch.index.shard
Class RemoveCorruptedShardDataCommand
java.lang.Object
org.elasticsearch.cli.Command
org.elasticsearch.common.cli.EnvironmentAwareCommand
org.elasticsearch.cluster.coordination.ElasticsearchNodeCommand
org.elasticsearch.index.shard.RemoveCorruptedShardDataCommand
- All Implemented Interfaces:
- Closeable,- AutoCloseable
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommandElasticsearchNodeCommand.UnknownCondition, ElasticsearchNodeCommand.UnknownMetadataCustom
- 
Field SummaryFields inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommandABORTED_BY_USER_MSG, CS_MISSING_MSG, DELIMITER, FAILED_TO_OBTAIN_NODE_LOCK_MSG, namedXContentRegistryFields inherited from class org.elasticsearch.cli.Commanddescription, parser
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static voidaddNewHistoryCommit(org.apache.lucene.store.Directory indexDirectory, Terminal terminal, boolean updateLocalCheckpoint) protected static voiddropCorruptMarkerFiles(Terminal terminal, Path path, org.apache.lucene.store.Directory directory, boolean clean) protected voidfindAndProcessShardPath(joptsimple.OptionSet options, Environment environment, Path[] dataPaths, ClusterState clusterState, CheckedConsumer<ShardPath, IOException> consumer) joptsimple.OptionParserprotected static Pathstatic booleanisCorruptMarkerFileIsPresent(org.apache.lucene.store.Directory directory) protected voidprintAdditionalHelp(Terminal terminal) voidprocessDataPaths(Terminal terminal, Path[] dataPaths, joptsimple.OptionSet options, Environment environment) Process the paths.Methods inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommandclusterState, confirm, createPersistedClusterStateService, execute, loadTermAndClusterState, processDataPaths, toDataPaths, validateBeforeLockMethods inherited from class org.elasticsearch.common.cli.EnvironmentAwareCommandcreateEnv, execute, getBuildTypeMethods inherited from class org.elasticsearch.cli.Commandclose, exit, main, mainWithoutErrorHandling, parseOptions, printUserException
- 
Constructor Details- 
RemoveCorruptedShardDataCommandpublic RemoveCorruptedShardDataCommand()
 
- 
- 
Method Details- 
printAdditionalHelp- Overrides:
- printAdditionalHelpin class- Command
 
- 
getParserpublic joptsimple.OptionParser getParser()
- 
getPath
- 
findAndProcessShardPathprotected void findAndProcessShardPath(joptsimple.OptionSet options, Environment environment, Path[] dataPaths, ClusterState clusterState, CheckedConsumer<ShardPath, IOException> consumer) throws IOException- Throws:
- IOException
 
- 
isCorruptMarkerFileIsPresentpublic static boolean isCorruptMarkerFileIsPresent(org.apache.lucene.store.Directory directory) throws IOException - Throws:
- IOException
 
- 
dropCorruptMarkerFilesprotected static void dropCorruptMarkerFiles(Terminal terminal, Path path, org.apache.lucene.store.Directory directory, boolean clean) throws IOException - Throws:
- IOException
 
- 
processDataPathspublic void processDataPaths(Terminal terminal, Path[] dataPaths, joptsimple.OptionSet options, Environment environment) throws IOException Description copied from class:ElasticsearchNodeCommandProcess the paths. Locks for the paths is held during this method invocation.- Specified by:
- processDataPathsin class- ElasticsearchNodeCommand
- Parameters:
- terminal- the terminal to use for messages
- dataPaths- the paths of the node to process
- options- the command line options
- environment- the env of the node to process
- Throws:
- IOException
 
- 
addNewHistoryCommitprotected static void addNewHistoryCommit(org.apache.lucene.store.Directory indexDirectory, Terminal terminal, boolean updateLocalCheckpoint) throws IOException - Throws:
- IOException
 
 
-