[
https://issues.apache.org/jira/browse/HIVE-16385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965008#comment-15965008
]
Chao Sun edited comment on HIVE-16385 at 4/11/17 9:45 PM:
----------------------------------------------------------
{quote}
Chao Sun, do you intend to commit this to branch-2.3, branch-2.2, branch-2.1,
and branch-2.0? If not, please change the fix version to 3.0.0 (master). Thanks.
{quote}
Oops. No that's not what I intended. Fixed. Thanks!
was (Author: csun):
> Chao Sun, do you intend to commit this to branch-2.3, branch-2.2, branch-2.1,
> and branch-2.0? If not, please change the fix version to 3.0.0 (master).
> Thanks.
Oops. No that's not what I intended. Fixed. Thanks!
> StatsNoJobTask could exit early before all partitions have been processed
> -------------------------------------------------------------------------
>
> Key: HIVE-16385
> URL: https://issues.apache.org/jira/browse/HIVE-16385
> Project: Hive
> Issue Type: Bug
> Components: Statistics
> Reporter: Chao Sun
> Assignee: Chao Sun
> Fix For: 3.0.0
>
> Attachments: HIVE-16385.1.patch
>
>
> For a partitioned table, the class {{StatsNoJobTask}} is supposed to launch
> threads for all partitions and compute their stats. However, it could exit
> early after at most 100 seconds:
> {code}
> private void shutdownAndAwaitTermination(ExecutorService threadPool) {
> // Disable new tasks from being submitted
> threadPool.shutdown();
> try {
> // Wait a while for existing tasks to terminate
> if (!threadPool.awaitTermination(100, TimeUnit.SECONDS)) {
> // Cancel currently executing tasks
> threadPool.shutdownNow();
> // Wait a while for tasks to respond to being cancelled
> if (!threadPool.awaitTermination(100, TimeUnit.SECONDS)) {
> LOG.debug("Stats collection thread pool did not terminate");
> }
> }
> } catch (InterruptedException ie) {
> // Cancel again if current thread also interrupted
> threadPool.shutdownNow();
> // Preserve interrupt status
> Thread.currentThread().interrupt();
> }
> }
> {code}
> The {{shutdown}} call does not wait for all submitted tasks to complete, and
> the {{awaitTermination}} call waits at most 100 seconds.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)