Class RemoveCorruptedShardDataCommand

All Implemented Interfaces:
Closeable, AutoCloseable

public class RemoveCorruptedShardDataCommand extends ElasticsearchNodeCommand
  • Constructor Details

    • RemoveCorruptedShardDataCommand

      public RemoveCorruptedShardDataCommand()
  • Method Details

    • printAdditionalHelp

      protected void printAdditionalHelp(Terminal terminal)
      Overrides:
      printAdditionalHelp in class Command
    • getParser

      public joptsimple.OptionParser getParser()
    • getPath

      protected Path getPath(String dirValue)
    • findAndProcessShardPath

      protected void findAndProcessShardPath(joptsimple.OptionSet options, Environment environment, Path[] dataPaths, int nodeLockId, 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 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, int nodeLockId, joptsimple.OptionSet options, Environment environment) throws IOException
      Description copied from class: ElasticsearchNodeCommand
      Process the paths. Locks for the paths is held during this method invocation.
      Specified by:
      processDataPaths in 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
    • addNewHistoryCommit

      protected void addNewHistoryCommit(org.apache.lucene.store.Directory indexDirectory, Terminal terminal, boolean updateLocalCheckpoint) throws IOException
      Throws:
      IOException