[
https://issues.apache.org/jira/browse/HIVE-23351?focusedWorklogId=432134&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-432134
]
ASF GitHub Bot logged work on HIVE-23351:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/May/20 14:19
Start Date: 08/May/20 14:19
Worklog Time Spent: 10m
Work Description: aasha commented on a change in pull request #1004:
URL: https://github.com/apache/hive/pull/1004#discussion_r422170394
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -103,13 +105,43 @@ public int execute() {
}
work.setRootTask(this);
this.parentTasks = null;
+ if (shouldLoadAuthorizationMetadata()) {
+ LOG.info("Loading authorization data");
+ try {
+ initiateAuthorizationLoadTask(work.dumpDirectory);
+ } catch (Exception e) {
+ LOG.error("failed", e);
+ setException(e);
+ return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode();
+ }
+ }
if (work.isIncrementalLoad()) {
return executeIncrementalLoad();
} else {
return executeBootStrapLoad();
}
}
+ private boolean shouldLoadAuthorizationMetadata() {
+ return
conf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_AUTHORIZATION_METADATA);
+ }
+
+ private void initiateAuthorizationLoadTask(String hiveDumpDirectory) throws
SemanticException {
+ if
(RANGER_AUTHORIZER.equalsIgnoreCase(conf.getVar(HiveConf.ConfVars.REPL_AUTHORIZATION_PROVIDER_SERVICE)))
{
+ Path rangerLoadRoot = new Path(new Path(hiveDumpDirectory).getParent(),
ReplUtils.REPL_RANGER_BASE_DIR);
+ LOG.info("Importing Authorization Metadata from {} ", rangerLoadRoot);
+ RangerLoadWork rangerLoadWork = new RangerLoadWork(rangerLoadRoot,
work.getSourceDbName(), work.dbNameToLoadIn);
+ Task<RangerLoadWork> rangerLoadTask = TaskFactory.get(rangerLoadWork,
conf);
+ if (childTasks == null) {
+ childTasks = new ArrayList<>();
+ }
+ childTasks.add(rangerLoadTask);
Review comment:
No, load tasks are added after this ranger task. Even metadata is loaded
through tasks in Repl Load. No?
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 432134)
Time Spent: 1h 50m (was: 1h 40m)
> Ranger Replication Scheduling
> -----------------------------
>
> Key: HIVE-23351
> URL: https://issues.apache.org/jira/browse/HIVE-23351
> Project: Hive
> Issue Type: Task
> Reporter: Aasha Medhi
> Assignee: Aasha Medhi
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-23351.01.patch, HIVE-23351.02.patch,
> HIVE-23351.03.patch, HIVE-23351.04.patch, HIVE-23351.05.patch,
> HIVE-23351.06.patch
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)