[ 
https://issues.apache.org/jira/browse/HIVE-24738?focusedWorklogId=556314&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-556314
 ]

ASF GitHub Bot logged work on HIVE-24738:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Feb/21 12:53
            Start Date: 23/Feb/21 12:53
    Worklog Time Spent: 10m 
      Work Description: pvargacl commented on a change in pull request #1971:
URL: https://github.com/apache/hive/pull/1971#discussion_r581010173



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -2362,10 +2362,17 @@ private Partition loadPartitionInternal(Path loadPath, 
Table tbl, Map<String, St
               + ", Direct insert = " + isDirectInsert + ")");
         }
         if (newFiles != null) {
-          newFileStatuses = listFilesCreatedByQuery(loadPath, writeId, stmtId);
-          newFiles.addAll(newFileStatuses.stream()
-              .map(FileStatus::getPath)
-              .collect(Collectors.toList()));
+          if (!newFiles.isEmpty()) {
+            // We already know the file list from the direct insert 
manifestfile
+            FileSystem srcFs = loadPath.getFileSystem(conf);
+            newFileStatuses = new ArrayList<>();
+            for (Path filePath : newFiles) {
+              newFileStatuses.add(srcFs.getFileStatus(filePath));
+            }
+          } else {
+            newFileStatuses = listFilesCreatedByQuery(loadPath, writeId, 
stmtId);
+            
newFiles.addAll(newFileStatuses.stream().map(FileStatus::getPath).collect(Collectors.toList()));

Review comment:
       done




----------------------------------------------------------------
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: 556314)
    Time Spent: 2h 10m  (was: 2h)

> Reuse committed filelist from directInsert manifest during loadPartition
> ------------------------------------------------------------------------
>
>                 Key: HIVE-24738
>                 URL: https://issues.apache.org/jira/browse/HIVE-24738
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Peter Varga
>            Assignee: Peter Varga
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> This way the costly FileSystem listing can be avoided



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to