[
https://issues.apache.org/jira/browse/STORM-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14988738#comment-14988738
]
ASF GitHub Bot commented on STORM-1157:
---------------------------------------
Github user zhuoliu commented on a diff in the pull request:
https://github.com/apache/storm/pull/842#discussion_r43835385
--- Diff: storm-core/src/clj/backtype/storm/ui/core.clj ---
@@ -986,6 +1021,127 @@
(log-message "Setting topology " id " log config " new-log-config)
(.setLogConfig nimbus id new-log-config)
(json-response (log-config id) (m "callback")))))
+
+ (GET "/api/v1/topology/:id/profiling/start/:host-port/:timeout"
+ [:as {:keys [servlet-request]} id host-port timeout & m]
+ (thrift/with-configured-nimbus-connection nimbus
+ (let [user (.getUserName http-creds-handler servlet-request)
+ topology-conf (from-json
+ (.getTopologyConf ^Nimbus$Client nimbus id))]
+ (assert-authorized-user "setWorkerProfiler" (topology-config
id))
+ (assert-authorized-profiler-action "start"))
+
+ (let [[host, port] (split host-port #":")
+ nodeinfo (NodeInfo. host (set [(Long. port)]))
+ timestamp (+ (System/currentTimeMillis) (* 60000 (Long.
timeout)))
+ request (ProfileRequest. nodeinfo
+ ProfileAction/JPROFILE_STOP)]
+ (.set_time_stamp request timestamp)
+ (.setWorkerProfiler nimbus id request)
+ (json-response {"status" "ok"
+ "id" host-port
+ "timeout" timeout
+ "dumplink" (worker-dump-link
+ host
+ port
+ id)}
+ (m "callback")))))
+
+ (GET "/api/v1/topology/:id/profiling/stop/:host-port"
--- End diff --
Same here and below.
> Dynamic Worker Profiler - jmap, jstack, profiling and restarting worker
> -----------------------------------------------------------------------
>
> Key: STORM-1157
> URL: https://issues.apache.org/jira/browse/STORM-1157
> Project: Apache Storm
> Issue Type: Improvement
> Components: storm-core
> Reporter: Kishor Patil
> Assignee: Kishor Patil
>
> In multi-tenant mode, storm launches long-running JVMs across cluster without
> sudo access to user. Self-serving of Java heap-dumps, jstacks and java
> profiling of these JVMs would improve users' ability to analyze and debug
> issues when monitoring it actively.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)