From 534d80540f9e8e38cb82a2c6db8868cc24aa0c74 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 3 Nov 2023 11:21:58 -0600 Subject: [PATCH] Move master file watcher to make it available to other modules (#101754) This commit moves the new master node file watcher to the o.e.common.file package so that it can be accessible to existing uses of AbstractFileWatchingService. --- .../service => common/file}/MasterNodeFileWatchingService.java | 3 +-- .../reservedstate/service/FileSettingsService.java | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) rename server/src/main/java/org/elasticsearch/{reservedstate/service => common/file}/MasterNodeFileWatchingService.java (97%) diff --git a/server/src/main/java/org/elasticsearch/reservedstate/service/MasterNodeFileWatchingService.java b/server/src/main/java/org/elasticsearch/common/file/MasterNodeFileWatchingService.java similarity index 97% rename from server/src/main/java/org/elasticsearch/reservedstate/service/MasterNodeFileWatchingService.java rename to server/src/main/java/org/elasticsearch/common/file/MasterNodeFileWatchingService.java index 444cde45d6961..6da0845a7c7ba 100644 --- a/server/src/main/java/org/elasticsearch/reservedstate/service/MasterNodeFileWatchingService.java +++ b/server/src/main/java/org/elasticsearch/common/file/MasterNodeFileWatchingService.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.reservedstate.service; +package org.elasticsearch.common.file; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -15,7 +15,6 @@ import org.elasticsearch.cluster.ClusterStateListener; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.file.AbstractFileWatchingService; import java.io.IOException; import java.nio.file.Files; diff --git a/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java b/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java index 2d13af0248a73..83676925a3ae7 100644 --- a/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java +++ b/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java @@ -16,6 +16,7 @@ import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.cluster.metadata.ReservedStateMetadata; import org.elasticsearch.cluster.service.ClusterService; +import org.elasticsearch.common.file.MasterNodeFileWatchingService; import org.elasticsearch.env.Environment; import org.elasticsearch.xcontent.XContentParserConfiguration;