Whirr
  1. Whirr
  2. WHIRR-195

Display available roles instead of service names when running ./bin/whirr

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: cli
    • Labels:
      None

      Description

      Now that service-name is optional I believe that we should display a list of the available roles (with a small description) instead of service names.

      Similar to:

      $ ./bin/whirr 
      Usage: whirr COMMAND [ARGS]
      where COMMAND may be one of:
      
              version  Print the version number and exit.
       launch-cluster  Launch a new cluster running a service.
      destroy-cluster  Terminate and cleanup resources for a running cluster.
         list-cluster  List the nodes in a cluster.
      
      Available roles for instances:
        nn             hadoop name node
        jt             hadoop job trackers
        ... 
      
      1. WHIRR-195.patch
        5 kB
        Andrei Savu
      2. WHIRR-195.patch
        6 kB
        Andrei Savu
      3. WHIRR-195.patch
        2 kB
        Andrei Savu

        Activity

        Hide
        Andrei Savu added a comment -

        I've just committed this. Thanks Tom for reviewing.

        Show
        Andrei Savu added a comment - I've just committed this. Thanks Tom for reviewing.
        Hide
        Tom White added a comment -

        +1

        Show
        Tom White added a comment - +1
        Hide
        Andrei Savu added a comment -

        I've removed the useless factory.

        Show
        Andrei Savu added a comment - I've removed the useless factory.
        Hide
        Tom White added a comment -

        Not a big deal either way, but the ClusterActionHandlerFactory didn't seem to "pull its weight".

        Show
        Tom White added a comment - Not a big deal either way, but the ClusterActionHandlerFactory didn't seem to "pull its weight".
        Hide
        Andrei Savu added a comment -

        That was the first thing I've done before adding the ClusterActionHandlerFactory class. I will rewrite the patch if you think that adding a new class it's too much.

        Show
        Andrei Savu added a comment - That was the first thing I've done before adding the ClusterActionHandlerFactory class. I will rewrite the patch if you think that adding a new class it's too much.
        Hide
        Tom White added a comment -

        I'm not sure we need the (publicly visible) ClusterActionHandlerFactory class. How about having the role sort code in Main (since that is the only place it's used), and just call ServiceLoader.load() as needed?

        Show
        Tom White added a comment - I'm not sure we need the (publicly visible) ClusterActionHandlerFactory class. How about having the role sort code in Main (since that is the only place it's used), and just call ServiceLoader.load() as needed?
        Hide
        Andrei Savu added a comment -

        Done.

        Show
        Andrei Savu added a comment - Done.
        Hide
        Tom White added a comment -

        > Should I add some sort of grouping based on the role prefix?

        Yes, I would just sort the list.

        Show
        Tom White added a comment - > Should I add some sort of grouping based on the role prefix? Yes, I would just sort the list.
        Hide
        Andrei Savu added a comment -

        With an experimental version of WHIRR-199:

        $ ./bin/whirr 
        Usage: whirr COMMAND [ARGS]
        where COMMAND may be one of:
        
                version  Print the version number and exit.
         launch-cluster  Launch a new cluster running a service.
        destroy-cluster  Terminate and cleanup resources for a running cluster.
           list-cluster  List the nodes in a cluster.
        
        Available roles:
          cassandra
          hadoop-namenode
          hadoop-datanode
          hadoop-jobtracker
          hadoop-tasktracker
          zookeeper
          hbase-master
          hbase-regionserver
          hbase-restserver
          hbase-avroserver
          hbase-thriftserver
        

        Should I add some sort of grouping based on the role prefix?

        Show
        Andrei Savu added a comment - With an experimental version of WHIRR-199 : $ ./bin/whirr Usage: whirr COMMAND [ARGS] where COMMAND may be one of: version Print the version number and exit. launch-cluster Launch a new cluster running a service. destroy-cluster Terminate and cleanup resources for a running cluster. list-cluster List the nodes in a cluster. Available roles: cassandra hadoop-namenode hadoop-datanode hadoop-jobtracker hadoop-tasktracker zookeeper hbase-master hbase-regionserver hbase-restserver hbase-avroserver hbase-thriftserver Should I add some sort of grouping based on the role prefix?
        Hide
        Andrei Savu added a comment -

        This patch needs WHIRR-199 in order to look good I haven't added descriptions because the role names should be self explanatory for now.

        Show
        Andrei Savu added a comment - This patch needs WHIRR-199 in order to look good I haven't added descriptions because the role names should be self explanatory for now.

          People

          • Assignee:
            Andrei Savu
            Reporter:
            Andrei Savu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development