Whirr
  1. Whirr
  2. WHIRR-170

Instances should be started in the order specified in the template

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: core
    • Labels:
      None

      Description

      For example, with a template "1 nn+jt, 1 dn+tt" we sometimes see the dn+tt instance launched before the nn+jt instance. This doesn't cause a problem in this case, but it's slightly confusing and easy to fix by using LinkedHashSet rather than HashSet.

        Activity

        Hide
        Adrian Cole added a comment -

        +1 to LinkedHashSet.. and any future DeterministicIteratable interface that springs up

        Show
        Adrian Cole added a comment - +1 to LinkedHashSet.. and any future DeterministicIteratable interface that springs up
        Hide
        Lars George added a comment -

        +1 to be able to optionally control the order. This could be role based and specified like so

        whirr.role-order=zk,nn+jt,dn+tt,hbase-master,hbase-regionserver

        If not specified the system should make any effort to start the services as quickly as possible, for example in multiple threads. In other words, when the role-order is not given no guarantee about order can be given.

        Show
        Lars George added a comment - +1 to be able to optionally control the order. This could be role based and specified like so whirr.role-order=zk,nn+jt,dn+tt,hbase-master,hbase-regionserver If not specified the system should make any effort to start the services as quickly as possible, for example in multiple threads. In other words, when the role-order is not given no guarantee about order can be given.
        Hide
        Tom White added a comment -

        This patch uses LinkedHashSet instead of HashSet. It doesn't introduce role order - perhaps we can do that in another JIRA when we have a service that relies on it?

        Show
        Tom White added a comment - This patch uses LinkedHashSet instead of HashSet. It doesn't introduce role order - perhaps we can do that in another JIRA when we have a service that relies on it?
        Hide
        Andrei Savu added a comment -

        +1 for this patch and for opening a new JIRA for whirr.role-order .

        Tom, what's the reason for making the change in services/cassandra/.../integration/CassandraServiceTest.java ?

        Show
        Andrei Savu added a comment - +1 for this patch and for opening a new JIRA for whirr.role-order . Tom, what's the reason for making the change in services/cassandra/.../integration/CassandraServiceTest.java ?
        Hide
        Tom White added a comment -

        It was to be consistent in the use of Sets for constructing new Set instances. Not strictly needed, but I thought now was a good time to do it.

        Show
        Tom White added a comment - It was to be consistent in the use of Sets for constructing new Set instances. Not strictly needed, but I thought now was a good time to do it.
        Hide
        Andrei Savu added a comment -

        I've just committed this. Thanks Tom. I have also opened a new JIRA, WHIRR-221, for adding whirr.role-order as Lars suggested.

        Show
        Andrei Savu added a comment - I've just committed this. Thanks Tom. I have also opened a new JIRA, WHIRR-221 , for adding whirr.role-order as Lars suggested.

          People

          • Assignee:
            Tom White
            Reporter:
            Tom White
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development