[
https://issues.apache.org/jira/browse/HIVE-24535?focusedWorklogId=526953&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-526953
]
ASF GitHub Bot logged work on HIVE-24535:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Dec/20 21:11
Start Date: 21/Dec/20 21:11
Worklog Time Spent: 10m
Work Description: pvargacl commented on a change in pull request #1779:
URL: https://github.com/apache/hive/pull/1779#discussion_r546931357
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -3360,14 +3257,13 @@ public static Directory
getAcidStateFromCache(Supplier<FileSystem> fileSystem,
// compute and add to cache
if (recompute || (value == null)) {
- Directory dirInfo = getAcidState(fileSystem.get(), candidateDirectory,
conf,
+ AcidDirectory dirInfo = getAcidState(fileSystem.get(),
candidateDirectory, conf,
writeIdList, useFileIds, ignoreEmptyFiles);
value = new DirInfoValue(writeIdList.writeToString(), dirInfo);
if (value.dirInfo != null && value.dirInfo.getBaseDirectory() != null
&& value.dirInfo.getCurrentDirectories().isEmpty()) {
if (dirCacheDuration > 0) {
- populateBaseFiles(dirInfo, useFileIds, fileSystem);
Review comment:
The basefiles were populated and stored in cache, so they could be later
used in OrcInputFormat if no write happens to the table before the next query.
This is not necessary now, because ParsedBase will handle this when getFiles is
called, if the baseFiles are not there it will do the listing once and store
it. What is even better, if we are on S3 the files will be there already from
the first recursive listing, so the FS is not even called once.
----------------------------------------------------------------
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: 526953)
Time Spent: 1h 20m (was: 1h 10m)
> Cleanup AcidUtils.Directory and remove unnecessary filesystem listings
> ----------------------------------------------------------------------
>
> Key: HIVE-24535
> URL: https://issues.apache.org/jira/browse/HIVE-24535
> Project: Hive
> Issue Type: Improvement
> Reporter: Peter Varga
> Assignee: Peter Varga
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> * AcidUtils.getAcidState is doing a recursive listing on S3 FileSystem, it
> already knows the content of each delta and base directory, this could be
> returned to OrcInputFormat, to avoid listing each delta directory again there.
> * AcidUtils.getAcidstate submethods are collecting more and more infos about
> the state of the data directory. This could be done directly to the final
> Directory object to avoid 10+ parameters in methods.
> * AcidUtils.Directory, OrcInputFormat.AcidDirInfo and AcidUtils.TxnBase can
> be merged to one class, to clean up duplications.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)