Skip to content

Commit 0231bcb

Browse files
committed
Load ActiveClusterMonitor by default
1 parent ccadea8 commit 0231bcb

File tree

7 files changed

+3
-19
lines changed

7 files changed

+3
-19
lines changed

docs/quickstart-config.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ dataStore:
1212

1313
clusterStatsConfiguration:
1414
monitorType: INFO_API
15-
16-
managedApps:
17-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor

gateway-ha/gateway-ha-config-docker.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ dataStore:
1515

1616
clusterStatsConfiguration:
1717
monitorType: INFO_API
18-
19-
managedApps:
20-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor

gateway-ha/gateway-ha-config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ clusterStatsConfiguration:
1919
# This can be adjusted based on the coordinator state
2020
monitor:
2121
taskDelaySeconds: 10
22-
23-
managedApps:
24-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor

gateway-ha/src/main/java/io/trino/gateway/baseapp/BaseApp.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.google.inject.Module;
1818
import com.google.inject.Scopes;
1919
import io.airlift.log.Logger;
20+
import io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor;
2021
import io.trino.gateway.ha.clustermonitor.ForMonitor;
2122
import io.trino.gateway.ha.config.HaGatewayConfiguration;
2223
import io.trino.gateway.ha.handler.ProxyHandlerStats;
@@ -118,6 +119,7 @@ public static List<Module> addModules(HaGatewayConfiguration configuration)
118119
public void configure(Binder binder)
119120
{
120121
binder.bind(HaGatewayConfiguration.class).toInstance(configuration);
122+
binder.bind(ActiveClusterMonitor.class).in(Scopes.SINGLETON);
121123
registerAuthFilters(binder);
122124
registerResources(binder);
123125
registerProxyResources(binder);
@@ -131,7 +133,7 @@ public void configure(Binder binder)
131133
private static void addManagedApps(HaGatewayConfiguration configuration, Binder binder)
132134
{
133135
if (configuration.getManagedApps() == null) {
134-
logger.error("No managed apps found");
136+
logger.info("No managed apps found");
135137
return;
136138
}
137139
configuration.getManagedApps().forEach(

gateway-ha/src/test/resources/test-config-template.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ dataStore:
1010
driver: org.h2.Driver
1111
runMigrationsEnabled: false
1212

13-
managedApps:
14-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor
15-
1613
clusterStatsConfiguration:
1714
monitorType: INFO_API
1815

gateway-ha/src/test/resources/test-config-with-routing-template.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ dataStore:
99
driver: org.h2.Driver
1010
runMigrationsEnabled: false
1111

12-
managedApps:
13-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor
14-
1512
clusterStatsConfiguration:
1613
monitorType: INFO_API
1714

gateway-ha/src/test/resources/test-config-without-x-forwarded-template.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ dataStore:
99
driver: org.h2.Driver
1010
runMigrationsEnabled: false
1111

12-
managedApps:
13-
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor
14-
1512
clusterStatsConfiguration:
1613
monitorType: INFO_API
1714

0 commit comments

Comments
 (0)