Github user knusbaum commented on a diff in the pull request:
https://github.com/apache/storm/pull/845#discussion_r43811398
--- Diff: storm-core/src/clj/backtype/storm/daemon/nimbus.clj ---
@@ -1586,6 +1719,172 @@
topology-id
(doto (GetInfoOptions.)
(.set_num_err_choice NumErrorsChoice/ALL))))
+ ;;Blobstore implementation code
+ (^String beginCreateBlob [this
+ ^String blob-key
+ ^SettableBlobMeta blob-meta]
+ (let [session-id (uuid)]
+ (.put (:blob-uploaders nimbus)
+ session-id
+ (->> (ReqContext/context)
+ (.subject)
+ (.createBlob (:blob-store nimbus) blob-key blob-meta)))
+ (log-message "Created blob for " blob-key
+ " with session id " session-id)
+ (str session-id)))
+
+ (^String beginUpdateBlob [this ^String blob-key]
+ (if-let [^AtomicOutputStream os (->> (ReqContext/context)
+ (.subject)
+ (.updateBlob (:blob-store nimbus)
+ blob-key))]
+ (let [session-id (uuid)]
+ (.put (:blob-uploaders nimbus) session-id os)
+ (log-message "Created upload session for " blob-key
+ " with id " session-id)
+ (str session-id))
+ (throw-runtime "Could not find blob for key " blob-key)))
+
+ (^void createStateInZookeeper [this ^String blob-key]
+ (let [storm-cluster-state (:storm-cluster-state nimbus)
+ blob-store (:blob-store nimbus)
+ nimbus-host-port-info (:nimbus-host-port-info nimbus)]
+ (if (instance? LocalFsBlobStore blob-store)
+ (.setup-blobstore! storm-cluster-state blob-key
nimbus-host-port-info (get-metadata-version blob-store blob-key
(get-nimbus-subject))))
+ (log-debug "Created state in zookeeper" storm-cluster-state
blob-store nimbus-host-port-info)
+ ))
--- End diff --
Parens
---
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.
---