pan3793 commented on code in PR #5114:
URL: https://github.com/apache/hive/pull/5114#discussion_r1512368146
##########
shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java:
##########
@@ -203,100 +187,5 @@ public AppConfigurationEntry[]
getAppConfigurationEntry(String appName) {
}
}
- public static final String XSRF_CUSTOM_HEADER_PARAM = "custom-header";
- public static final String XSRF_CUSTOM_METHODS_TO_IGNORE_PARAM =
"methods-to-ignore";
- private static final String XSRF_HEADER_DEFAULT = "X-XSRF-HEADER";
- private static final Set<String> XSRF_METHODS_TO_IGNORE_DEFAULT = new
HashSet<String>(Arrays.asList("GET", "OPTIONS", "HEAD", "TRACE"));
-
- /*
- * Return Hadoop-native RestCsrfPreventionFilter if it is available.
- * Otherwise, construct our own copy of its logic.
- */
- public static Filter getXSRFFilter() {
Review Comment:
I'm not sure if the Hive community treats it as a public API, if there are
concerns about compatibility, another approach is:
1. leaving `Utils` as-is,
2. creating a `HadoopUtils`, copying all other methods to `HadoopUtils`
3. changing callers to use `HadoopUtils` instead of `Utils` to avoid
initializing `Utils`
##########
shims/common/src/main/java/org/apache/hadoop/hive/shims/Utils.java:
##########
@@ -203,100 +187,5 @@ public AppConfigurationEntry[]
getAppConfigurationEntry(String appName) {
}
}
- public static final String XSRF_CUSTOM_HEADER_PARAM = "custom-header";
- public static final String XSRF_CUSTOM_METHODS_TO_IGNORE_PARAM =
"methods-to-ignore";
- private static final String XSRF_HEADER_DEFAULT = "X-XSRF-HEADER";
- private static final Set<String> XSRF_METHODS_TO_IGNORE_DEFAULT = new
HashSet<String>(Arrays.asList("GET", "OPTIONS", "HEAD", "TRACE"));
-
- /*
- * Return Hadoop-native RestCsrfPreventionFilter if it is available.
- * Otherwise, construct our own copy of its logic.
- */
- public static Filter getXSRFFilter() {
Review Comment:
I'm not sure if the Hive community treats it as a public API, if there are
concerns about compatibility, another approach is:
1. leaving `Utils` as-is
2. creating a `HadoopUtils`, copying all other methods to `HadoopUtils`
3. changing callers to use `HadoopUtils` instead of `Utils` to avoid
initializing `Utils`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]