You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Jagadish (JIRA)" <ji...@apache.org> on 2016/03/14 07:17:33 UTC

[jira] [Resolved] (SAMZA-890) ThreadFactory used by HttpServer should use Daemon threads

     [ https://issues.apache.org/jira/browse/SAMZA-890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jagadish resolved SAMZA-890.
----------------------------
    Resolution: Fixed

> ThreadFactory used by HttpServer should use Daemon threads
> ----------------------------------------------------------
>
>                 Key: SAMZA-890
>                 URL: https://issues.apache.org/jira/browse/SAMZA-890
>             Project: Samza
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Jagadish
>            Assignee: Jagadish
>             Fix For: 0.10.1
>
>
> The Samza HttpServer.scala encapsulates a Jetty Http Server. The default constructor of the Jetty Http Server includes a QueuedThreadPool of Non-Daemon threads. This has the following problem:
> 1. If there is a bug/ or an error in the SamzaAppMaster and the SamzaAppMaster is shutting down, the threads in the QueuedThreadPool stay alive. The process does not terminate as a result. So, even subtle bugs that cause AppMaster failures will be magnified because the process will not terminate and merely hang. Yarn's RM will not restart the process because the process is still alive.
> The fix is to ensure that the QueuedThreadPool creates Daemon threads by setting isDaemon to true.
> Here's an example of Apache Calcite's HttpServer handling this: 
> http://www.programcreek.com/java-api-examples/index.php?source_dir=calcite-master/spark/src/main/java/org/apache/calcite/adapter/spark/HttpServer.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)