[ https://issues.apache.org/jira/browse/HIVE-24380?focusedWorklogId=513089&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-513089 ]
ASF GitHub Bot logged work on HIVE-24380: ----------------------------------------- Author: ASF GitHub Bot Created on: 17/Nov/20 18:37 Start Date: 17/Nov/20 18:37 Worklog Time Spent: 10m Work Description: mustafaiman commented on a change in pull request #1670: URL: https://github.com/apache/hive/pull/1670#discussion_r525396299 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/NullScanTaskDispatcher.java ########## @@ -159,21 +165,46 @@ private void processTableScans(MapWork work, Set<TableScanOperator> tableScans) } else { managedEmptyPathMap.put(path, false); } + } else { + numberOfUnmanagedPaths++; } } } + int fetcherPoolParallelism = Math.min(MAXIMUM_ASYNC_STATUS_FETCHER_COUNT, (int)Math.sqrt(numberOfUnmanagedPaths)); + ForkJoinPool pool = null; + if (fetcherPoolParallelism > 1) { // dont create thread pool for a few partitions Review comment: No, in that case lookup will happen in another thread than calling thread. So we would pay the price of creating a new thread for no benefit. This check ensures that we do the lookup in calling thread when creating a new thread is not justified performance wise. ---------------------------------------------------------------- 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: 513089) Time Spent: 0.5h (was: 20m) > NullScanTaskDispatcher should liststatus in parallel > ---------------------------------------------------- > > Key: HIVE-24380 > URL: https://issues.apache.org/jira/browse/HIVE-24380 > Project: Hive > Issue Type: Sub-task > Reporter: Mustafa İman > Assignee: Mustafa İman > Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > NullScanTaskDispatcher does listStatus for hundreds of partition directories > in case of external tables. This is big problem in cloud installations where > directory listings are in object store like S3. We can do this in parallel. -- This message was sent by Atlassian Jira (v8.3.4#803005)