ChengbingLiu commented on a change in pull request #15653:
URL: https://github.com/apache/flink/pull/15653#discussion_r646508085
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/util/JobConfUtils.java
##########
@@ -40,4 +44,24 @@ public static String getDefaultPartitionName(JobConf
jobConf) {
HiveConf.ConfVars.DEFAULTPARTITIONNAME.varname,
HiveConf.ConfVars.DEFAULTPARTITIONNAME.defaultStrVal);
}
+
+ private static void addCredentialsIntoJobConf(JobConf jobConf) {
+ try {
+ Credentials currentUserCreds =
+ HadoopInputFormatCommonBase.getCredentialsFromUGI(
+ UserGroupInformation.getCurrentUser());
+ if (currentUserCreds != null) {
+ jobConf.getCredentials().mergeAll(currentUserCreds);
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(
Review comment:
`HadoopInputFormatCommonBase.getCredentialsFromUGI` can be rewritten to
`return ugi.getCredentials();` since Flink has already dropped support for
Hadoop 1.x (https://issues.apache.org/jira/browse/FLINK-4895)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]