-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get cluster health from v1/info #264
Conversation
...-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsCoordinatorInfoMonitor.java
Outdated
Show resolved
Hide resolved
...-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsCoordinatorInfoMonitor.java
Outdated
Show resolved
Hide resolved
...-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsCoordinatorInfoMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/config/ClusterStatsMonitorType.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/test/java/io/trino/gateway/ha/clustermonitor/TestClusterStatsMonitor.java
Outdated
Show resolved
Hide resolved
...-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsCoordinatorInfoMonitor.java
Outdated
Show resolved
Hide resolved
...-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsCoordinatorInfoMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/module/ClusterStatsMonitorModule.java
Outdated
Show resolved
Hide resolved
Can we deprecate UI API based monitoring? |
I think ultimately yes .. we still have to chat to the upstream Trino project itself about maybe having a better REST endpoint for cluster health / readiness with info such as attached worker number. I still have to even initiate that discussion |
836fec5
to
14b18b6
Compare
14b18b6
to
4fad665
Compare
gateway-ha/src/test/java/io/trino/gateway/ha/clustermonitor/TestClusterStatsMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
4fad665
to
34bc9e0
Compare
@@ -97,6 +97,22 @@ | |||
</exclusions> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>io.airlift</groupId> | |||
<artifactId>http-client</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we potentially removing OkHttp to use this in the future? Or we will keep both in the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to eliminate the runtime dependency on OkHttp
. It is used in several tests, but the gateway itself only uses it in ClusterStatsApiMonitor
. We can probably switch over for tests too, just a bit more work.
gateway-ha/src/test/java/io/trino/gateway/ha/clustermonitor/TestClusterStatsMonitor.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Show resolved
Hide resolved
a9a0fb5
to
80f3e1c
Compare
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
6b66c61
to
0bb38f8
Compare
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsInfoApiMonitor.java
Outdated
Show resolved
Hide resolved
0bb38f8
to
0aa7332
Compare
Just quick note.. this is definitely the right approach .. we might have it even more useful from the Trino side soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ServerInfo.java
Outdated
Show resolved
Hide resolved
0aa7332
to
388172f
Compare
This adds a lightweight health check against the coordinator's
v1/info
. A cluster is set to healthy as long as the coordinator returns a 200 response and is not in the process of starting.v1/info
does not require authentication, which addresses the concerns raised in