[ 
https://issues.apache.org/jira/browse/HIVE-17331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130070#comment-16130070
 ] 

Zoltan Haindrich commented on HIVE-17331:
-----------------------------------------

yes...this is really broken by HIVE-12244 - seems like this part does not have 
enough coverage...
Could you intern the path the same time you create it - or reuse the path 
instance ; this would increase readablily a bit.
note: it would seem to be a good idea to move the interning to 
{{addPathToAlias}}...it just makes it more complicated to read all these...and 
it only make sense when it is added... - possibly in a follow up

> Path must be used as key type of the pathToAlises
> -------------------------------------------------
>
>                 Key: HIVE-17331
>                 URL: https://issues.apache.org/jira/browse/HIVE-17331
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Oleg Danilov
>            Assignee: Oleg Danilov
>            Priority: Minor
>         Attachments: HIVE-17331.patch
>
>
> This code uses String instead of Path as key type of the pathToAliases map, 
> so seems like get(String) always null.
> +*GenMapRedUtils.java*+
> {code:java}
>         for (int pos = 0; pos < size; pos++) {
>           String taskTmpDir = taskTmpDirLst.get(pos);
>           TableDesc tt_desc = tt_descLst.get(pos);
>           MapWork mWork = plan.getMapWork();
>           if (mWork.getPathToAliases().get(taskTmpDir) == null) {
>             taskTmpDir = taskTmpDir.intern();
>             Path taskTmpDirPath = 
> StringInternUtils.internUriStringsInPath(new Path(taskTmpDir));
>             mWork.removePathToAlias(taskTmpDirPath);
>             mWork.addPathToAlias(taskTmpDirPath, taskTmpDir);
>             mWork.addPathToPartitionInfo(taskTmpDirPath, new 
> PartitionDesc(tt_desc, null));
>             mWork.getAliasToWork().put(taskTmpDir, topOperators.get(pos));
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to