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

Joydeep Sen Sarma commented on HIVE-1852:
-----------------------------------------

Hive..java:1564 - this should read fs.rename(srcs[0]) (since srcf may have been 
a wildcard that matched a single dir)
Hive.java:1574 - we can optimize this loop i think. if the wildcard does not 
match a single directory - then it has to match a set of files. the 
loadsemantic analyzer already enforces this. so we don't need a second 
listStatus and loop over the entries here. can directly move each of the srcs 
into destf/srcs.getName

we have lost the atomic move for the wildcard case. i think it's ok (it's not 
used much i would imagine) - at least leave a note/todo saying that this would 
be nice to have atomic.

new tests look pretty good to me - the load/move case with wildcards is getting 
covered. we could add one where the load path is a wildcard that matches a 
single dir to cover the first comment here.


> Reduce unnecessary DFSClient.rename() calls
> -------------------------------------------
>
>                 Key: HIVE-1852
>                 URL: https://issues.apache.org/jira/browse/HIVE-1852
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ning Zhang
>            Assignee: Ning Zhang
>         Attachments: HIVE-1852.2.patch, HIVE-1852.3.patch, HIVE-1852.4.patch, 
> HIVE-1852.5.patch, HIVE-1852.patch
>
>
> In Hive client side (MoveTask etc), DFSCleint.rename() is called for every 
> file inside a directory. It is very expensive for a large directory in a busy 
> DFS namenode. We should replace it with a single rename() call on the whole 
> directory. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to