[
https://issues.apache.org/jira/browse/HIVE-26569?focusedWorklogId=831487&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-831487
]
ASF GitHub Bot logged work on HIVE-26569:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Dec/22 16:49
Start Date: 06/Dec/22 16:49
Worklog Time Spent: 10m
Work Description: abstractdog commented on code in PR #3626:
URL: https://github.com/apache/hive/pull/3626#discussion_r1041218053
##########
llap-client/src/java/org/apache/hadoop/hive/llap/tez/LlapProtocolClientProxy.java:
##########
@@ -94,6 +105,35 @@ public void sendUpdateFragment(final
UpdateFragmentRequestProto request, final S
queueRequest(new SendUpdateFragmentCallable(nodeId, request, callback));
}
+ protected void initPeriodicTokenRefresh(Configuration conf) {
+ if (!UserGroupInformation.isSecurityEnabled()) {
+ return;
+ }
+ long tokenRenewInterval =
+ HiveConf.getTimeVar(conf,
ConfVars.LLAP_DELEGATION_TOKEN_RENEW_INTERVAL, TimeUnit.SECONDS);
+ // if the tokenRenewInterval is low (e.g. testing), let's use the half of
it as interval instead of the constant
+ long interval = Math.min(tokenRenewInterval / 2,
LLAP_TOKEN_REFRESH_INTERVAL_IN_AM_SECONDS);
+
+ LOG.info("Initializing periodic token refresh in AM, will run in every
{}s", interval);
+ tokenClient = new LlapTokenClient(conf);
+
+ newTokenChecker.scheduleAtFixedRate(() -> {
+ fetchToken();
+ }, 0, interval, TimeUnit.SECONDS);
Review Comment:
ack, nice catch
Issue Time Tracking
-------------------
Worklog Id: (was: 831487)
Time Spent: 2h 20m (was: 2h 10m)
> Support renewal and recreation of LLAP_TOKENs
> ---------------------------------------------
>
> Key: HIVE-26569
> URL: https://issues.apache.org/jira/browse/HIVE-26569
> Project: Hive
> Issue Type: Improvement
> Reporter: László Bodor
> Assignee: László Bodor
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)