From 119e5c751bda6711a4d74e682eefb9a7fa152e12 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 6 Dec 2024 15:17:12 -0800 Subject: [PATCH] iter --- .../cluster/local/AbstractLocalClusterFactory.java | 11 ----------- .../test/cluster/local/DefaultLocalClusterHandle.java | 7 ------- .../local/DefaultLocalElasticsearchCluster.java | 6 ------ .../test/cluster/local/LocalClusterHandle.java | 6 ------ 4 files changed, 30 deletions(-) diff --git a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/AbstractLocalClusterFactory.java b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/AbstractLocalClusterFactory.java index ba2d3505ad7ed..6070ec140d254 100644 --- a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/AbstractLocalClusterFactory.java +++ b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/AbstractLocalClusterFactory.java @@ -148,17 +148,6 @@ public Node( } public synchronized void start(Version version) { - if (process != null) { - // ES was previously started, so we don't need to reconfigure, just start - if (process.isAlive() == false) { - LOGGER.info("Restarting Elasticsearch node '{}'", name); - startElasticsearch(); - return; - } else { - throw new AssertionError("Elasticsearch is already started"); - } - } - LOGGER.info("Starting Elasticsearch node '{}'", name); if (version != null) { spec.setVersion(version); diff --git a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalClusterHandle.java b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalClusterHandle.java index fb01d13da93e3..13adde1da8a69 100644 --- a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalClusterHandle.java +++ b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalClusterHandle.java @@ -181,13 +181,6 @@ public void stopNode(int index, boolean forcibly) { nodes.get(index).stop(forcibly); } - public void restartNode(int index, boolean forcibly) { - Node node = nodes.get(index); - node.stop(forcibly); - node.start(null); - writeUnicastHostsFile(); - } - @Override public InputStream getNodeLog(int index, LogType logType) { return nodes.get(index).getLog(logType); diff --git a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalElasticsearchCluster.java b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalElasticsearchCluster.java index 81b267d1da49f..3853c60687a0d 100644 --- a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalElasticsearchCluster.java +++ b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/DefaultLocalElasticsearchCluster.java @@ -78,12 +78,6 @@ public void stopNode(int index, boolean forcibly) { handle.stopNode(index, forcibly); } - @Override - public void restartNode(int index, boolean forcibly) { - checkHandle(); - handle.restartNode(index, forcibly); - } - @Override public void restart(boolean forcibly) { checkHandle(); diff --git a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/LocalClusterHandle.java b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/LocalClusterHandle.java index b218bf2786ef2..acceb14e6460e 100644 --- a/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/LocalClusterHandle.java +++ b/test/test-clusters/src/main/java/org/elasticsearch/test/cluster/local/LocalClusterHandle.java @@ -29,12 +29,6 @@ public interface LocalClusterHandle extends ClusterHandle { */ void stopNode(int index, boolean forcibly); - /** - * Restarts the node by first stopping it and then starting it again. - * @param index of the node to stop - */ - void restartNode(int index, boolean forcibly); - /** * Restarts the cluster. Effectively the same as calling {@link #stop(boolean)} followed by {@link #start()} *