You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/11/17 18:37:23 UTC

[GitHub] [hive] mustafaiman commented on a change in pull request #1670: HIVE-24380: NullScanTaskDispatcher should liststatus in parallel

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org