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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to