pass cluster-state to INimbus#520
Closed
jasonjckn wants to merge 1 commit intonathanmarz:0.9.0from
jasonjckn:0.9.0-cluster-state-inimbus
Closed
pass cluster-state to INimbus#520jasonjckn wants to merge 1 commit intonathanmarz:0.9.0from jasonjckn:0.9.0-cluster-state-inimbus
jasonjckn wants to merge 1 commit intonathanmarz:0.9.0from
jasonjckn:0.9.0-cluster-state-inimbus
Conversation
Owner
|
I don't like the design of this. You shouldn't be exposing the cluster state directly like that. Besides just being dirty from an interface standpoint (random Object which is unclear how to use it), there's way too much opportunity here for abuse and subtle bugs. I would instead just add the ability to INimbus to return metadata for a newly created topology. And then that metadata can be stored in the topology base and provided in the TopologyDetails for the scheduler/INimbus implementation to use later. The metadata should be serialized as JSON. Gonna close this pull request in anticipation of a new one using a better design. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull gives me access to cluster-state in INimbus, which is needed for this pull nathanmarz/storm-mesos#5
"IMPORTANT: CuratorFramework instances are fully thread-safe. You should share one CuratorFramework per ZooKeeper cluster in your application." https://github.com/Netflix/curator/wiki/Framework
MesosNimbus needed zk style state, so this pull gets it done. Without making a 2nd curator framework.
I had to use Object for clusterState because ClusterState is a protocol, and therefore not accessible due to compilation ordering where javac goes first in storm source code. The clojure compiler does generate a class byte code for ClusterState but that comes after javac is finished. So other projects which depend on storm can merely cast the argument clusterState to ClusterState.