apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (APEXCORE-330) Ability to obtain a thread dump from a container
Date Mon, 02 May 2016 18:21:13 GMT

    [ https://issues.apache.org/jira/browse/APEXCORE-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15267186#comment-15267186
] 

ASF GitHub Bot commented on APEXCORE-330:
-----------------------------------------

Github user davidyan74 commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/321#discussion_r61779390
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/webapp/StramWebServices.java ---
    @@ -492,6 +494,42 @@ public JSONObject getContainer(@PathParam("containerId") String containerId)
thr
         return new JSONObject(objectMapper.writeValueAsString(ci));
       }
     
    +  @GET
    +  @Path(PATH_PHYSICAL_PLAN_CONTAINERS + "/{containerId}" + "/stackTrace")
    +  @Produces(MediaType.APPLICATION_JSON)
    +  public JSONObject getContainerStackTrace(@PathParam("containerId") String containerId)
throws Exception
    +  {
    +    init();
    +
    +    if (containerId.equals(System.getenv(ApplicationConstants.Environment.CONTAINER_ID.toString())))
{
    +      return new JSONObject(StackTrace.getJsonFormat());
    +    }
    +
    +    StreamingContainerAgent sca = dagManager.getContainerAgent(containerId);
    +
    +    if (sca == null) {
    +      throw new NotFoundException();
    +    }
    +
    +    if (!sca.getContainerInfo().state.equals("ACTIVE")) {
    +      throw new RuntimeException("Container is not active");
    --- End diff --
    
    This would return status code 500 to the user. We should probably return a 404.


> Ability to obtain a thread dump from a container
> ------------------------------------------------
>
>                 Key: APEXCORE-330
>                 URL: https://issues.apache.org/jira/browse/APEXCORE-330
>             Project: Apache Apex Core
>          Issue Type: Improvement
>            Reporter: Thomas Weise
>            Assignee: Sandesh
>
> To analyze issues such as "stuck operator", it is useful to obtain stats from the running
JVM. Often needed are GC stats and thread dump. In production environments users often don't
have direct access to the machines, making it available through the REST API will help.



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

Mime
View raw message