File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
gateway-ha/src/main/java/io/trino/gateway/ha Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public static final class Builder
4141 private int runningQueryCount ;
4242 private int queuedQueryCount ;
4343 private int numWorkerNodes ;
44- private TrinoStatus trinoStatus ;
44+ private TrinoStatus trinoStatus = TrinoStatus . UNKNOWN ;
4545 private String proxyTo ;
4646 private String externalUrl ;
4747 private String routingGroup ;
Original file line number Diff line number Diff line change 1616import com .google .common .base .Strings ;
1717import com .google .inject .Inject ;
1818import io .trino .gateway .ha .clustermonitor .ClusterStats ;
19- import io .trino .gateway .ha .clustermonitor .TrinoStatus ;
2019import io .trino .gateway .ha .config .ProxyBackendConfiguration ;
2120import io .trino .gateway .ha .domain .Result ;
2221import io .trino .gateway .ha .domain .TableData ;
@@ -98,12 +97,7 @@ public Response getAllBackends()
9897 backendResponse .setName (b .getName ());
9998 backendResponse .setProxyTo (b .getProxyTo ());
10099 backendResponse .setActive (b .isActive ());
101- if (Objects .isNull (backendState .trinoStatus ())) {
102- backendResponse .setStatus (TrinoStatus .UNKNOWN .toString ());
103- }
104- else {
105- backendResponse .setStatus (backendState .trinoStatus ().toString ());
106- }
100+ backendResponse .setStatus (backendState .trinoStatus ().toString ());
107101 backendResponse .setRoutingGroup (b .getRoutingGroup ());
108102 backendResponse .setExternalUrl (b .getExternalUrl ());
109103 return backendResponse ;
You can’t perform that action at this time.
0 commit comments