[
https://issues.apache.org/jira/browse/HIVE-23835?focusedWorklogId=460288&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-460288
]
ASF GitHub Bot logged work on HIVE-23835:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Jul/20 12:59
Start Date: 17/Jul/20 12:59
Worklog Time Spent: 10m
Work Description: pkumarsinha commented on a change in pull request #1249:
URL: https://github.com/apache/hive/pull/1249#discussion_r456425658
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/events/CreateFunctionHandler.java
##########
@@ -41,13 +53,36 @@ CreateFunctionMessage eventMessage(String
stringRepresentation) {
public void handle(Context withinContext) throws Exception {
LOG.info("Processing#{} CREATE_FUNCTION message : {}", fromEventId(),
eventMessageAsJSON);
Path metadataPath = new Path(withinContext.eventRoot,
EximUtil.METADATA_NAME);
+ Path dataPath = new Path(withinContext.eventRoot, EximUtil.DATA_PATH_NAME);
FileSystem fileSystem = metadataPath.getFileSystem(withinContext.hiveConf);
-
+ List<DataCopyPath> functionBinaryCopyPaths = new ArrayList<>();
try (JsonWriter jsonWriter = new JsonWriter(fileSystem, metadataPath)) {
- new FunctionSerializer(eventMessage.getFunctionObj(),
withinContext.hiveConf)
- .writeTo(jsonWriter, withinContext.replicationSpec);
+ FunctionSerializer serializer = new
FunctionSerializer(eventMessage.getFunctionObj(),
+ dataPath, withinContext.hiveConf);
+ serializer.writeTo(jsonWriter, withinContext.replicationSpec);
+ functionBinaryCopyPaths.addAll(serializer.getFunctionBinaryCopyPaths());
}
withinContext.createDmd(this).write();
+ copyFunctionBinaries(functionBinaryCopyPaths, withinContext.hiveConf);
+ }
+
+ private void copyFunctionBinaries(List<DataCopyPath>
functionBinaryCopyPaths, HiveConf hiveConf)
Review comment:
no, for function binary copy, we are not using the load flag. It is
retained as it is currently. meaning: earlier during load it used to copy from
src location. Now with this change, it will copy from staging location. So that
src cluster visibility in not required during load of function.
----------------------------------------------------------------
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: 460288)
Time Spent: 50m (was: 40m)
> Repl Dump should dump function binaries to staging directory
> ------------------------------------------------------------
>
> Key: HIVE-23835
> URL: https://issues.apache.org/jira/browse/HIVE-23835
> Project: Hive
> Issue Type: Task
> Reporter: Pravin Sinha
> Assignee: Pravin Sinha
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-23835.01.patch, HIVE-23835.02.patch
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> {color:#172b4d}When hive function's binaries are on source HDFS, repl dump
> should dump it to the staging location in order to break cross clusters
> visibility requirement.{color}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)