{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/comments/61779390","id":61779390,"diff_hunk":"@@ -492,6 +494,42 @@ public JSONObject getContainer(@PathParam(\"containerId\") String containerId) thr\n     return new JSONObject(objectMapper.writeValueAsString(ci));\n   }\n \n+  @GET\n+  @Path(PATH_PHYSICAL_PLAN_CONTAINERS + \"/{containerId}\" + \"/stackTrace\")\n+  @Produces(MediaType.APPLICATION_JSON)\n+  public JSONObject getContainerStackTrace(@PathParam(\"containerId\") String containerId) throws Exception\n+  {\n+    init();\n+\n+    if (containerId.equals(System.getenv(ApplicationConstants.Environment.CONTAINER_ID.toString()))) {\n+      return new JSONObject(StackTrace.getJsonFormat());\n+    }\n+\n+    StreamingContainerAgent sca = dagManager.getContainerAgent(containerId);\n+\n+    if (sca == null) {\n+      throw new NotFoundException();\n+    }\n+\n+    if (!sca.getContainerInfo().state.equals(\"ACTIVE\")) {\n+      throw new RuntimeException(\"Container is not active\");","path":"engine/src/main/java/com/datatorrent/stram/webapp/StramWebServices.java","position":38,"original_position":38,"commit_id":"3ff661e4bf89b8fa5733bf8a95d556138d482899","original_commit_id":"3ff661e4bf89b8fa5733bf8a95d556138d482899","user":{"login":"davidyan74","id":4419148,"avatar_url":"https://avatars.githubusercontent.com/u/4419148?v=3","gravatar_id":"","url":"https://api.github.com/users/davidyan74","html_url":"https://github.com/davidyan74","followers_url":"https://api.github.com/users/davidyan74/followers","following_url":"https://api.github.com/users/davidyan74/following{/other_user}","gists_url":"https://api.github.com/users/davidyan74/gists{/gist_id}","starred_url":"https://api.github.com/users/davidyan74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidyan74/subscriptions","organizations_url":"https://api.github.com/users/davidyan74/orgs","repos_url":"https://api.github.com/users/davidyan74/repos","events_url":"https://api.github.com/users/davidyan74/events{/privacy}","received_events_url":"https://api.github.com/users/davidyan74/received_events","type":"User","site_admin":false},"body":"This would return status code 500 to the user. We should probably return a 404.","created_at":"2016-05-02T18:21:09Z","updated_at":"2016-05-02T18:21:09Z","html_url":"https://github.com/apache/incubator-apex-core/pull/321#discussion_r61779390","pull_request_url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/comments/61779390"},"html":{"href":"https://github.com/apache/incubator-apex-core/pull/321#discussion_r61779390"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321","id":68526891,"html_url":"https://github.com/apache/incubator-apex-core/pull/321","diff_url":"https://github.com/apache/incubator-apex-core/pull/321.diff","patch_url":"https://github.com/apache/incubator-apex-core/pull/321.patch","issue_url":"https://api.github.com/repos/apache/incubator-apex-core/issues/321","number":321,"state":"open","locked":false,"title":"APEXCORE-330 : Stacktrace of the StreamingContainer exposed through REST ","user":{"login":"sandeshh","id":3878507,"avatar_url":"https://avatars.githubusercontent.com/u/3878507?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeshh","html_url":"https://github.com/sandeshh","followers_url":"https://api.github.com/users/sandeshh/followers","following_url":"https://api.github.com/users/sandeshh/following{/other_user}","gists_url":"https://api.github.com/users/sandeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeshh/subscriptions","organizations_url":"https://api.github.com/users/sandeshh/orgs","repos_url":"https://api.github.com/users/sandeshh/repos","events_url":"https://api.github.com/users/sandeshh/events{/privacy}","received_events_url":"https://api.github.com/users/sandeshh/received_events","type":"User","site_admin":false},"body":"Getting stack trace from the containers, exposed through REST api\r\n\r\nThe return value will in JSON.\r\n\r\nStackTrace can be accessed through the following call.\r\n  \"/ws/v2/stram/physicalPlan/containers/containersID/stackTrace\"","created_at":"2016-05-02T06:34:14Z","updated_at":"2016-05-02T18:21:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"861da06e66f7f80221d0153a29debb60875acb2a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-apex-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-apex-core/issues/321/comments","statuses_url":"https://api.github.com/repos/apache/incubator-apex-core/statuses/3ff661e4bf89b8fa5733bf8a95d556138d482899","head":{"label":"sandeshh:APEXCORE-330","ref":"APEXCORE-330","sha":"3ff661e4bf89b8fa5733bf8a95d556138d482899","user":{"login":"sandeshh","id":3878507,"avatar_url":"https://avatars.githubusercontent.com/u/3878507?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeshh","html_url":"https://github.com/sandeshh","followers_url":"https://api.github.com/users/sandeshh/followers","following_url":"https://api.github.com/users/sandeshh/following{/other_user}","gists_url":"https://api.github.com/users/sandeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeshh/subscriptions","organizations_url":"https://api.github.com/users/sandeshh/orgs","repos_url":"https://api.github.com/users/sandeshh/repos","events_url":"https://api.github.com/users/sandeshh/events{/privacy}","received_events_url":"https://api.github.com/users/sandeshh/received_events","type":"User","site_admin":false},"repo":{"id":41441124,"name":"incubator-apex-core","full_name":"sandeshh/incubator-apex-core","owner":{"login":"sandeshh","id":3878507,"avatar_url":"https://avatars.githubusercontent.com/u/3878507?v=3","gravatar_id":"","url":"https://api.github.com/users/sandeshh","html_url":"https://github.com/sandeshh","followers_url":"https://api.github.com/users/sandeshh/followers","following_url":"https://api.github.com/users/sandeshh/following{/other_user}","gists_url":"https://api.github.com/users/sandeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/sandeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandeshh/subscriptions","organizations_url":"https://api.github.com/users/sandeshh/orgs","repos_url":"https://api.github.com/users/sandeshh/repos","events_url":"https://api.github.com/users/sandeshh/events{/privacy}","received_events_url":"https://api.github.com/users/sandeshh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sandeshh/incubator-apex-core","description":"Mirror of Apache Apex core (Incubating)","fork":true,"url":"https://api.github.com/repos/sandeshh/incubator-apex-core","forks_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/forks","keys_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/teams","hooks_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/hooks","issue_events_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/issues/events{/number}","events_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/events","assignees_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/assignees{/user}","branches_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/branches{/branch}","tags_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/tags","blobs_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/statuses/{sha}","languages_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/languages","stargazers_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/stargazers","contributors_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/contributors","subscribers_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/subscribers","subscription_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/subscription","commits_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/contents/{+path}","compare_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/merges","archive_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/downloads","issues_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/issues{/number}","pulls_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/pulls{/number}","milestones_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/milestones{/number}","notifications_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/labels{/name}","releases_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/releases{/id}","deployments_url":"https://api.github.com/repos/sandeshh/incubator-apex-core/deployments","created_at":"2015-08-26T17:55:37Z","updated_at":"2015-08-26T17:55:38Z","pushed_at":"2016-05-02T06:29:29Z","git_url":"git://github.com/sandeshh/incubator-apex-core.git","ssh_url":"git@github.com:sandeshh/incubator-apex-core.git","clone_url":"https://github.com/sandeshh/incubator-apex-core.git","svn_url":"https://github.com/sandeshh/incubator-apex-core","homepage":null,"size":13143,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"9a726fd898c34ee7a60161c0c2c5529a29fdb044","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":41348333,"name":"incubator-apex-core","full_name":"apache/incubator-apex-core","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-apex-core","description":"Mirror of Apache Apex core (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-apex-core","forks_url":"https://api.github.com/repos/apache/incubator-apex-core/forks","keys_url":"https://api.github.com/repos/apache/incubator-apex-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-apex-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-apex-core/teams","hooks_url":"https://api.github.com/repos/apache/incubator-apex-core/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-apex-core/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-apex-core/events","assignees_url":"https://api.github.com/repos/apache/incubator-apex-core/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-apex-core/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-apex-core/tags","blobs_url":"https://api.github.com/repos/apache/incubator-apex-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-apex-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-apex-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-apex-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-apex-core/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-apex-core/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-apex-core/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-apex-core/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-apex-core/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-apex-core/subscription","commits_url":"https://api.github.com/repos/apache/incubator-apex-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-apex-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-apex-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-apex-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-apex-core/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-apex-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-apex-core/merges","archive_url":"https://api.github.com/repos/apache/incubator-apex-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-apex-core/downloads","issues_url":"https://api.github.com/repos/apache/incubator-apex-core/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-apex-core/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-apex-core/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-apex-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-apex-core/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-apex-core/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-apex-core/deployments","created_at":"2015-08-25T07:00:05Z","updated_at":"2016-05-01T02:43:52Z","pushed_at":"2016-05-02T11:20:23Z","git_url":"git://github.com/apache/incubator-apex-core.git","ssh_url":"git@github.com:apache/incubator-apex-core.git","clone_url":"https://github.com/apache/incubator-apex-core.git","svn_url":"https://github.com/apache/incubator-apex-core","homepage":null,"size":20432,"stargazers_count":112,"watchers_count":112,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":77,"mirror_url":"git://git.apache.org/incubator-apex-core.git","open_issues_count":6,"forks":77,"open_issues":6,"watchers":112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321"},"html":{"href":"https://github.com/apache/incubator-apex-core/pull/321"},"issue":{"href":"https://api.github.com/repos/apache/incubator-apex-core/issues/321"},"comments":{"href":"https://api.github.com/repos/apache/incubator-apex-core/issues/321/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-apex-core/pulls/321/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-apex-core/statuses/3ff661e4bf89b8fa5733bf8a95d556138d482899"}}}}