Skip to content

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#520
jasonjckn wants to merge 1 commit intonathanmarz:0.9.0from
jasonjckn:0.9.0-cluster-state-inimbus

Conversation

@jasonjckn
Copy link
Collaborator

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.

@nathanmarz
Copy link
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.

@nathanmarz nathanmarz closed this Mar 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants