[ 
https://issues.apache.org/jira/browse/HIVE-15546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sahil Takiar updated HIVE-15546:
--------------------------------
    Attachment: HIVE-15546.2.patch

Original attempt was to just remove the check for empty input paths, but that 
turned out to be much more difficult than I originally thought.

Attaching a revised path that makes it multi-threaded. I decided to re-use the 
config mapred.dfsclient.parallelism.max since it seems to be used for other 
methods in the Utilities class relevant to MR job setup (e.g. content summary 
calculations).

> Optimize Utilities.getInputPaths()
> ----------------------------------
>
>                 Key: HIVE-15546
>                 URL: https://issues.apache.org/jira/browse/HIVE-15546
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>         Attachments: HIVE-15546.1.patch, HIVE-15546.2.patch
>
>
> When running on blobstores (like S3) where metadata operations (like 
> listStatus) are costly, Utilities.getInputPaths() can add significant 
> overhead when setting up the input paths for an MR / Spark / Tez job.
> The method performs a listStatus on all input paths in order to check if the 
> path is empty. If the path is empty, a dummy file is created for the given 
> partition. This is all done sequentially. This can be really slow when there 
> are a lot of empty partitions. Even when all partitions have input data, this 
> can take a long time.
> We should either:
> (1) Just remove the logic to check if each input path is empty, and handle 
> any edge cases accordingly.
> (2) Multi-thread the listStatus calls



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to