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

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_r61951218
  
    --- Diff: engine/src/main/java/com/datatorrent/stram/cli/ApexCli.java ---
    @@ -3366,6 +3370,28 @@ public void execute(String[] args, ConsoleReader 
reader) throws Exception
     
       }
     
    +  private class GetContainerStackTrace implements Command
    +  {
    +    @Override
    +    public void execute(String[] args, ConsoleReader reader) throws 
Exception
    +    {
    +      String containerLongId = getContainerLongId(args[1]);
    +      if (containerLongId == null) {
    +        throw new CliException("Container " + args[1] + " not found");
    +      }
    +
    +      JSONObject response;
    +      try {
    +        response = 
getResource(StramWebServices.PATH_PHYSICAL_PLAN_CONTAINERS + "/" + args[1] + 
"/" + StramWebServices.PATH_STACKTRACE, currentApp);
    +      } catch (Exception ex) {
    +        throw new CliException(ex.toString());
    --- End diff --
    
    instead of new CliException(ex.toString), can you do:
    ```java
    throw new CliException("<Some meaningful error message for the user>", ex);
    ```


> 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)

Reply via email to