Github user d2r commented on a diff in the pull request:
https://github.com/apache/storm/pull/845#discussion_r43937682
--- Diff: storm-core/src/clj/backtype/storm/daemon/nimbus.clj ---
@@ -130,22 +162,40 @@
(defn inbox [nimbus]
(master-inbox (:conf nimbus)))
-(defn- read-storm-conf [conf storm-id]
- (let [stormroot (master-stormdist-root conf storm-id)]
- (merge conf
- (clojurify-structure
- (Utils/fromCompressedJsonConf
- (FileUtils/readFileToByteArray
- (File. (master-stormconf-path stormroot))))))))
+(defn- get-subject []
+ (let [req (ReqContext/context)]
+ (.subject req)))
+
+(defn- read-storm-conf [conf storm-id blob-store]
+ (clojurify-structure
+ (Utils/fromCompressedJsonConf
+ (.readBlob blob-store (master-stormconf-key storm-id)
(get-subject)))))
(declare delay-event)
(declare mk-assignments)
+(defn nimbus-subject
+ []
+ (let [subject (Subject.)
+ principal (NimbusPrincipal.)
+ principals (.getPrincipals subject)]
+ (.add principals principal)
+ subject))
+
+(def get-nimbus-subject
+ (nimbus-subject))
--- End diff --
Looks like the var `get-nimbus-subject` and the function above
`nimbus-subject` it have swapped names. Can we switch them?
---
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.
---