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 Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommand
ElasticsearchNodeCommand.UnknownCondition, ElasticsearchNodeCommand.UnknownMetadataCustom -
Field Summary
Fields inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommand
ABORTED_BY_USER_MSG, CS_MISSING_MSG, DELIMITER, FAILED_TO_OBTAIN_NODE_LOCK_MSG, namedXContentRegistryFields inherited from class org.elasticsearch.cli.Command
description, parser -
Constructor Summary
Constructors -
Method Summary
Modifier 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.ElasticsearchNodeCommand
clusterState, confirm, createPersistedClusterStateService, execute, loadTermAndClusterState, processDataPaths, toDataPaths, validateBeforeLockMethods inherited from class org.elasticsearch.common.cli.EnvironmentAwareCommand
createEnv, execute, getBuildTypeMethods inherited from class org.elasticsearch.cli.Command
close, exit, main, mainWithoutErrorHandling, parseOptions, printUserException
-
Constructor Details
-
RemoveCorruptedShardDataCommand
public RemoveCorruptedShardDataCommand()
-
-
Method Details
-
printAdditionalHelp
- Overrides:
printAdditionalHelpin classCommand
-
getParser
public joptsimple.OptionParser getParser() -
getPath
-
findAndProcessShardPath
protected void findAndProcessShardPath(joptsimple.OptionSet options, Environment environment, Path[] dataPaths, ClusterState clusterState, CheckedConsumer<ShardPath, IOException> consumer) throws IOException- Throws:
IOException
-
isCorruptMarkerFileIsPresent
public static boolean isCorruptMarkerFileIsPresent(org.apache.lucene.store.Directory directory) throws IOException - Throws:
IOException
-
dropCorruptMarkerFiles
protected static void dropCorruptMarkerFiles(Terminal terminal, Path path, org.apache.lucene.store.Directory directory, boolean clean) throws IOException - Throws:
IOException
-
processDataPaths
public 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 classElasticsearchNodeCommand- Parameters:
terminal- the terminal to use for messagesdataPaths- the paths of the node to processoptions- the command line optionsenvironment- the env of the node to process- Throws:
IOException
-
addNewHistoryCommit
protected static void addNewHistoryCommit(org.apache.lucene.store.Directory indexDirectory, Terminal terminal, boolean updateLocalCheckpoint) throws IOException - Throws:
IOException
-