Package org.opensearch.env
Class NodeRepurposeCommand
java.lang.Object
org.opensearch.cli.Command
org.opensearch.cli.EnvironmentAwareCommand
org.opensearch.cluster.coordination.OpenSearchNodeCommand
org.opensearch.env.NodeRepurposeCommand
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class NodeRepurposeCommand extends OpenSearchNodeCommand
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.cluster.coordination.OpenSearchNodeCommand
OpenSearchNodeCommand.UnknownCondition, OpenSearchNodeCommand.UnknownMetadataCustom
-
Field Summary
Fields inherited from class org.opensearch.cluster.coordination.OpenSearchNodeCommand
CS_MISSING_MSG, DELIMITER, namedXContentRegistry
-
Constructor Summary
Constructors Constructor Description NodeRepurposeCommand()
-
Method Summary
Modifier and Type Method Description protected void
processNodePaths(org.opensearch.cli.Terminal terminal, java.nio.file.Path[] dataPaths, int nodeLockId, joptsimple.OptionSet options, Environment env)
Process the paths.protected boolean
validateBeforeLock(org.opensearch.cli.Terminal terminal, Environment env)
Validate that the command can run before taking any locks.Methods inherited from class org.opensearch.cluster.coordination.OpenSearchNodeCommand
clusterState, confirm, createPersistedClusterStateService, execute, loadTermAndClusterState, processNodePaths, toNodePaths
Methods inherited from class org.opensearch.cli.EnvironmentAwareCommand
createEnv, createEnv, execute
-
Constructor Details
-
NodeRepurposeCommand
public NodeRepurposeCommand()
-
-
Method Details
-
validateBeforeLock
Description copied from class:OpenSearchNodeCommand
Validate that the command can run before taking any locks.- Overrides:
validateBeforeLock
in classOpenSearchNodeCommand
- Parameters:
terminal
- the terminal to print toenv
- the env to validate.- Returns:
- true to continue, false to stop (must print message in validate).
-
processNodePaths
protected void processNodePaths(org.opensearch.cli.Terminal terminal, java.nio.file.Path[] dataPaths, int nodeLockId, joptsimple.OptionSet options, Environment env) throws java.io.IOExceptionDescription copied from class:OpenSearchNodeCommand
Process the paths. Locks for the paths is held during this method invocation.- Specified by:
processNodePaths
in classOpenSearchNodeCommand
- Parameters:
terminal
- the terminal to use for messagesdataPaths
- the paths of the node to processoptions
- the command line optionsenv
- the env of the node to process- Throws:
java.io.IOException
-