Skip to content

Commit

Permalink
KNOX-2956 - Removing CM-specific 'advanced service discovery' handler…
Browse files Browse the repository at this point in the history
… and have everything process by the HXR parser (#821)

Change-Id: Ib1837610e4b222282af7bef98fc6f27af5169e88
  • Loading branch information
smolnar82 authored Dec 12, 2023
1 parent 6f89529 commit 14954a0
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 448 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.apache.knox.gateway.topology.Topology;
import org.apache.knox.gateway.topology.TopologyEvent;
import org.apache.knox.gateway.topology.TopologyListener;
import org.apache.knox.gateway.topology.discovery.advanced.AdvancedServiceDiscoveryConfigurationMonitor;
import org.apache.knox.gateway.topology.hadoop.xml.HadoopXmlResourceMonitor;
import org.apache.knox.gateway.topology.hadoop.xml.HadoopXmlResourceParser;
import org.apache.knox.gateway.trace.AccessHandler;
Expand Down Expand Up @@ -719,10 +718,6 @@ public void run() {
private void handleHadoopXmlResources() {
final HadoopXmlResourceParser hadoopXmlResourceParser = new HadoopXmlResourceParser(config);
final HadoopXmlResourceMonitor hadoopXmlResourceMonitor = new HadoopXmlResourceMonitor(config, hadoopXmlResourceParser);
final AdvancedServiceDiscoveryConfigurationMonitor advancedServiceDiscoveryConfigurationMonitor = new AdvancedServiceDiscoveryConfigurationMonitor(config);
advancedServiceDiscoveryConfigurationMonitor.registerListener(hadoopXmlResourceParser);
advancedServiceDiscoveryConfigurationMonitor.registerListener(hadoopXmlResourceMonitor);
advancedServiceDiscoveryConfigurationMonitor.init();
hadoopXmlResourceMonitor.setupMonitor();
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public interface HadoopXmlResourceMessages {
@Message(level = MessageLevel.ERROR, text = "Parsing XML configuration {0} failed: {1}")
void failedToParseXmlConfiguration(String path, String errorMessage, @StackTrace(level = MessageLevel.DEBUG) Exception e);

@Message(level = MessageLevel.DEBUG, text = "Processing Hadoop XML resource {0} (force = {1}; lastReloadTime = {2}; lastModified = {3})")
void processHadoopXmlResource(String descriptorPath, boolean force, FileTime lastReloadTime, FileTime lastModifiedTime);
@Message(level = MessageLevel.DEBUG, text = "Processing Hadoop XML resource {0} (lastReloadTime = {1}; lastModified = {2})")
void processHadoopXmlResource(String descriptorPath, FileTime lastReloadTime, FileTime lastModifiedTime);

@Message(level = MessageLevel.DEBUG, text = "Skipping Hadoop XML resource monitoring of {0} (force = {1}; lastReloadTime = {2}; lastModified = {3})")
void skipMonitorHadoopXmlResource(String descriptorPath, boolean force, FileTime lastReloadTime, FileTime lastModifiedTime);
@Message(level = MessageLevel.DEBUG, text = "Skipping Hadoop XML resource monitoring of {0} (lastReloadTime = {1}; lastModified = {2})")
void skipMonitorHadoopXmlResource(String descriptorPath, FileTime lastReloadTime, FileTime lastModifiedTime);

@Message(level = MessageLevel.ERROR, text = "Error while monitoring Hadoop style XML configuration {0}: {1}")
void failedToMonitorHadoopXmlResource(String descriptorPath, String errorMessage, @StackTrace(level = MessageLevel.DEBUG) Exception e);
Expand All @@ -71,9 +71,6 @@ public interface HadoopXmlResourceMessages {
@Message(level = MessageLevel.ERROR, text = "Error while producing Knox provider: {0}")
void failedToProduceKnoxProvider(String errorMessage, @StackTrace(level = MessageLevel.DEBUG) Exception e);

@Message(level = MessageLevel.WARN, text = "Service {0} is disabled. It will NOT be added in {1}")
void serviceDisabled(String serviceName, String descriptorName);

@Message(level = MessageLevel.INFO, text = "Updated advanced service discovery configuration for {0}.")
void updatedAdvanceServiceDiscoverytConfiguration(String topologyName);

Expand Down
Loading

0 comments on commit 14954a0

Please sign in to comment.