hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sahil Takiar (JIRA)" <>
Subject [jira] [Commented] (HIVE-15546) Optimize Utilities.getInputPaths() so each listStatus of a partition is done in parallel
Date Sat, 21 Jan 2017 00:06:26 GMT


Sahil Takiar commented on HIVE-15546:

[~sershe] yes, when {{Utilities.getInputPaths()}} is called (it is called right before split
generation) the method has to check if each given input path (e.g. a partition or a table)
is empty or not. In order to do this, it has to run a listStatus against the actual filesystem.
If it is not empty, Hive can proceed normally, if it is empty, then it can use {{NullScanFileSystem}}
/ {{ZeroRowsInputFormat}} to add a "dummy" path to the partition / table description.

In this patch, I just made the listStatus against the filesystem multi-threaded, since it
is unavoidable. Making this listStatus multi-threaded should provide significant performance

> Optimize Utilities.getInputPaths() so each listStatus of a partition is done in parallel
> ----------------------------------------------------------------------------------------
>                 Key: HIVE-15546
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Sahil Takiar
>            Assignee: Sahil Takiar
>         Attachments: HIVE-15546.1.patch, HIVE-15546.2.patch, HIVE-15546.3.patch, HIVE-15546.4.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
> (2) Multi-thread the listStatus calls

This message was sent by Atlassian JIRA

View raw message