Skip to content

Commit 16e509e

Browse files
ebyhrRiyaJohn
andcommitted
Rename QueryIdCachingProxyHandler to HttpUtils
Co-Authored-By: Riya John <[email protected]>
1 parent d8ecc25 commit 16e509e

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/clustermonitor/ClusterStatsHttpMonitor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434

3535
import static com.google.common.base.Strings.isNullOrEmpty;
3636
import 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;
4040
import static java.util.Objects.requireNonNull;
4141

4242
public class ClusterStatsHttpMonitor

gateway-ha/src/main/java/io/trino/gateway/ha/config/HaGatewayConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.List;
2222
import 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

2626
public class HaGatewayConfiguration
2727
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
package 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
}

gateway-ha/src/main/java/io/trino/gateway/ha/handler/ProxyUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import java.util.regex.Pattern;
2525

2626
import 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;
2929
import static java.nio.charset.StandardCharsets.UTF_8;
3030
import static java.util.Locale.ENGLISH;
3131

gateway-ha/src/main/java/io/trino/gateway/ha/handler/RoutingTargetHandler.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
import static com.google.common.base.Strings.isNullOrEmpty;
3131
import 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;
3239
import static io.trino.gateway.ha.handler.ProxyUtils.buildUriWithNewBackend;
3340
import 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;
4141
import static java.util.Objects.requireNonNull;
4242

4343
public class RoutingTargetHandler

gateway-ha/src/main/java/io/trino/gateway/proxyserver/RouteToBackendResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import 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;
3131
import static io.trino.gateway.proxyserver.RouterPreMatchContainerRequestFilter.ROUTE_TO_BACKEND;
3232
import static java.util.Objects.requireNonNull;
3333

gateway-ha/src/test/java/io/trino/gateway/ha/config/TestHaGatewayConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import 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;
2222
import static org.assertj.core.api.Assertions.assertThat;
2323
import static org.assertj.core.api.Assertions.assertThatThrownBy;
2424

gateway-ha/src/test/java/io/trino/gateway/ha/router/TestRoutingGroupSelectorExternal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import static io.airlift.http.client.JsonResponseHandler.createJsonResponseHandler;
4747
import static io.airlift.http.client.Request.Builder.preparePost;
4848
import 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;
5050
import static io.trino.gateway.ha.router.RoutingGroupSelector.ROUTING_GROUP_HEADER;
5151
import static io.trino.gateway.ha.router.TrinoQueryProperties.TRINO_CATALOG_HEADER_NAME;
5252
import static io.trino.gateway.ha.router.TrinoQueryProperties.TRINO_SCHEMA_HEADER_NAME;

gateway-ha/src/test/java/io/trino/gateway/ha/router/TestTrinoRequestUser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.Optional;
2727

2828
import 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;
3030
import static jakarta.ws.rs.core.HttpHeaders.AUTHORIZATION;
3131
import static java.nio.charset.StandardCharsets.UTF_8;
3232
import static org.assertj.core.api.Assertions.assertThat;

0 commit comments

Comments
 (0)