File tree Expand file tree Collapse file tree 9 files changed +19
-19
lines changed
main/java/io/trino/gateway
test/java/io/trino/gateway/ha Expand file tree Collapse file tree 9 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 3434
3535import static com .google .common .base .Strings .isNullOrEmpty ;
3636import static io .airlift .http .client .HttpStatus .fromStatusCode ;
37- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .UI_API_QUEUED_LIST_PATH ;
38- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .UI_API_STATS_PATH ;
39- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .UI_LOGIN_PATH ;
37+ import static io .trino .gateway .ha .handler .HttpUtils .UI_API_QUEUED_LIST_PATH ;
38+ import static io .trino .gateway .ha .handler .HttpUtils .UI_API_STATS_PATH ;
39+ import static io .trino .gateway .ha .handler .HttpUtils .UI_LOGIN_PATH ;
4040import static java .util .Objects .requireNonNull ;
4141
4242public class ClusterStatsHttpMonitor
Original file line number Diff line number Diff line change 2121import java .util .List ;
2222import java .util .Map ;
2323
24- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_STATEMENT_PATH ;
24+ import static io .trino .gateway .ha .handler .HttpUtils .V1_STATEMENT_PATH ;
2525
2626public class HaGatewayConfiguration
2727{
Original file line number Diff line number Diff line change 1313 */
1414package io .trino .gateway .ha .handler ;
1515
16- public class QueryIdCachingProxyHandler
16+ public class HttpUtils
1717{
1818 public static final String V1_STATEMENT_PATH = "/v1/statement" ;
1919 public static final String V1_QUERY_PATH = "/v1/query" ;
@@ -26,5 +26,5 @@ public class QueryIdCachingProxyHandler
2626 public static final String OAUTH_PATH = "/oauth2" ;
2727 public static final String USER_HEADER = "X-Trino-User" ;
2828
29- private QueryIdCachingProxyHandler () {}
29+ private HttpUtils () {}
3030}
Original file line number Diff line number Diff line change 2424import java .util .regex .Pattern ;
2525
2626import static com .google .common .base .Strings .isNullOrEmpty ;
27- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .TRINO_UI_PATH ;
28- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_QUERY_PATH ;
27+ import static io .trino .gateway .ha .handler .HttpUtils .TRINO_UI_PATH ;
28+ import static io .trino .gateway .ha .handler .HttpUtils .V1_QUERY_PATH ;
2929import static java .nio .charset .StandardCharsets .UTF_8 ;
3030import static java .util .Locale .ENGLISH ;
3131
Original file line number Diff line number Diff line change 2929
3030import static com .google .common .base .Strings .isNullOrEmpty ;
3131import static com .google .common .collect .ImmutableList .toImmutableList ;
32+ import static io .trino .gateway .ha .handler .HttpUtils .OAUTH_PATH ;
33+ import static io .trino .gateway .ha .handler .HttpUtils .TRINO_UI_PATH ;
34+ import static io .trino .gateway .ha .handler .HttpUtils .UI_API_STATS_PATH ;
35+ import static io .trino .gateway .ha .handler .HttpUtils .USER_HEADER ;
36+ import static io .trino .gateway .ha .handler .HttpUtils .V1_INFO_PATH ;
37+ import static io .trino .gateway .ha .handler .HttpUtils .V1_NODE_PATH ;
38+ import static io .trino .gateway .ha .handler .HttpUtils .V1_QUERY_PATH ;
3239import static io .trino .gateway .ha .handler .ProxyUtils .buildUriWithNewBackend ;
3340import static io .trino .gateway .ha .handler .ProxyUtils .extractQueryIdIfPresent ;
34- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .OAUTH_PATH ;
35- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .TRINO_UI_PATH ;
36- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .UI_API_STATS_PATH ;
37- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .USER_HEADER ;
38- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_INFO_PATH ;
39- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_NODE_PATH ;
40- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_QUERY_PATH ;
4141import static java .util .Objects .requireNonNull ;
4242
4343public class RoutingTargetHandler
Original file line number Diff line number Diff line change 2727
2828import java .net .URI ;
2929
30- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_STATEMENT_PATH ;
30+ import static io .trino .gateway .ha .handler .HttpUtils .V1_STATEMENT_PATH ;
3131import static io .trino .gateway .proxyserver .RouterPreMatchContainerRequestFilter .ROUTE_TO_BACKEND ;
3232import static java .util .Objects .requireNonNull ;
3333
Original file line number Diff line number Diff line change 1818
1919import java .util .List ;
2020
21- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .V1_STATEMENT_PATH ;
21+ import static io .trino .gateway .ha .handler .HttpUtils .V1_STATEMENT_PATH ;
2222import static org .assertj .core .api .Assertions .assertThat ;
2323import static org .assertj .core .api .Assertions .assertThatThrownBy ;
2424
Original file line number Diff line number Diff line change 4646import static io .airlift .http .client .JsonResponseHandler .createJsonResponseHandler ;
4747import static io .airlift .http .client .Request .Builder .preparePost ;
4848import static io .airlift .json .JsonCodec .jsonCodec ;
49- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .USER_HEADER ;
49+ import static io .trino .gateway .ha .handler .HttpUtils .USER_HEADER ;
5050import static io .trino .gateway .ha .router .RoutingGroupSelector .ROUTING_GROUP_HEADER ;
5151import static io .trino .gateway .ha .router .TrinoQueryProperties .TRINO_CATALOG_HEADER_NAME ;
5252import static io .trino .gateway .ha .router .TrinoQueryProperties .TRINO_SCHEMA_HEADER_NAME ;
Original file line number Diff line number Diff line change 2626import java .util .Optional ;
2727
2828import static com .auth0 .jwt .algorithms .Algorithm .HMAC256 ;
29- import static io .trino .gateway .ha .handler .QueryIdCachingProxyHandler .USER_HEADER ;
29+ import static io .trino .gateway .ha .handler .HttpUtils .USER_HEADER ;
3030import static jakarta .ws .rs .core .HttpHeaders .AUTHORIZATION ;
3131import static java .nio .charset .StandardCharsets .UTF_8 ;
3232import static org .assertj .core .api .Assertions .assertThat ;
You can’t perform that action at this time.
0 commit comments