Package org.elasticsearch.env
Class NodeRepurposeCommand
java.lang.Object
org.elasticsearch.cli.Command
org.elasticsearch.cli.EnvironmentAwareCommand
org.elasticsearch.cluster.coordination.ElasticsearchNodeCommand
org.elasticsearch.env.NodeRepurposeCommand
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class NodeRepurposeCommand extends ElasticsearchNodeCommand
-
Nested Class Summary
Nested 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
CS_MISSING_MSG, DELIMITER, namedXContentRegistryFields inherited from class org.elasticsearch.cli.Command
description, parser -
Constructor Summary
Constructors Constructor Description NodeRepurposeCommand() -
Method Summary
Modifier and Type Method Description protected voidprocessNodePaths(org.elasticsearch.cli.Terminal terminal, java.nio.file.Path[] dataPaths, int nodeLockId, joptsimple.OptionSet options, Environment env)Process the paths.protected booleanvalidateBeforeLock(org.elasticsearch.cli.Terminal terminal, Environment env)Validate that the command can run before taking any locks.Methods inherited from class org.elasticsearch.cluster.coordination.ElasticsearchNodeCommand
clusterState, confirm, createPersistedClusterStateService, execute, loadTermAndClusterState, processNodePaths, toNodePathsMethods inherited from class org.elasticsearch.cli.EnvironmentAwareCommand
createEnv, createEnv, executeMethods inherited from class org.elasticsearch.cli.Command
addShutdownHook, close, exit, main, printAdditionalHelpMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
NodeRepurposeCommand
public NodeRepurposeCommand()
-
-
Method Details
-
validateBeforeLock
Description copied from class:ElasticsearchNodeCommandValidate that the command can run before taking any locks.- Overrides:
validateBeforeLockin classElasticsearchNodeCommand- 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.elasticsearch.cli.Terminal terminal, java.nio.file.Path[] dataPaths, int nodeLockId, joptsimple.OptionSet options, Environment env) throws java.io.IOExceptionDescription copied from class:ElasticsearchNodeCommandProcess the paths. Locks for the paths is held during this method invocation.- Specified by:
processNodePathsin classElasticsearchNodeCommand- 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
-