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

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

                Author: ASF GitHub Bot
            Created on: 20/Jan/21 15:19
            Start Date: 20/Jan/21 15:19
    Worklog Time Spent: 10m 
      Work Description: pvargacl commented on a change in pull request #1893:
URL: https://github.com/apache/hive/pull/1893#discussion_r561046305



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2671,6 +2671,28 @@ public boolean accept(Path path) {
     }
   }
 
+  /**
+   * Full recursive PathFilter version of IdPathFilter (filtering files for a 
given writeId and stmtId).
+   * This can be used by recursive filelisting, when we want to match the 
delta / base pattern on the bucketFiles.
+   */
+  public static class IdFullPathFiler extends IdPathFilter {
+    private final Path basePath;
+
+    public IdFullPathFiler(long writeId, int stmtId, Path basePath) {
+      super(writeId, stmtId);
+      this.basePath = basePath;
+    }
+    @Override
+    public boolean accept(Path path) {
+      do {
+        if (super.accept(path)) {
+          return true;
+        }
+        path = path.getParent();
+      } while (!path.equals(basePath));

Review comment:
       It will fail with a nullpointer if you call it with an unrelated path, I 
will add the nullcheck




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 538500)
    Time Spent: 2h  (was: 1h 50m)

> Improve Filesystem usage in Hive::loadPartitionInternal
> -------------------------------------------------------
>
>                 Key: HIVE-24669
>                 URL: https://issues.apache.org/jira/browse/HIVE-24669
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Peter Varga
>            Assignee: Peter Varga
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> * Use native recursive listing instead doing it on the Hive side
>  * Reuse the file list determined for writeNotificationlogs in quickstat 
> generation



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

Reply via email to