You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2011/04/27 20:04:03 UTC

[jira] [Commented] (WHIRR-246) Single place to store/load cluster state

    [ https://issues.apache.org/jira/browse/WHIRR-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025925#comment-13025925 ] 

Tom White commented on WHIRR-246:
---------------------------------

I like this change. A few comments, mainly to do with naming and organization:

* The new by ID instance predicates really belong in RolePredicates with the other ones.
* I would add ClusterStateStore in the org.apache.whirr.service package. It seems odd having a org.apache.whirr.cluster without the Cluster class being in it.
* Change ClusterStateStore to be an abstract class (like Service is) so we have more flexibility over evolving it in the future.
* For consistency with ClusterControllerFactory, ClusterStateStoreFactory should not have static methods. This will make it easier to use the service loader pattern, which we'll need when there are more implementations of ClusterStateStore (to be done in later JIRA?).

> Single place to store/load cluster state
> ----------------------------------------
>
>                 Key: WHIRR-246
>                 URL: https://issues.apache.org/jira/browse/WHIRR-246
>             Project: Whirr
>          Issue Type: Improvement
>            Reporter: David Alves
>            Assignee: Andrei Savu
>            Priority: Minor
>         Attachments: WHIRR-246.patch, WHIRR-246.patch, WHIRR-246.patch
>
>
> Right now cluster state is written and read from the ~/.whirr/cluster-name/instances file and logic to write and update it is spread between the Service and DestroyInstanceCommand (that I know of).
> Since for WHIRR-214 the file must be updated (in another class) and for WHIRR-238 an altogether different method of storing cluster state will be required I think it might be time to move the read/write state logic to its own file (or factory in the future).
> I'll attach a very preliminary patch just to get some feedback.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira