Apache Whirr (retired)
  1. Apache Whirr (retired)
  2. WHIRR-548

Allow whirr to reuse existing compute services

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      When using whirr as a library or inside a managed environment it's possible that the compute service is managed separately from whirr.

      For these cases it would be useful to allow whirr to reuse an existing compute service.

      I am thinking that we could have the a compute service property as part of ClusterSpec. In these cases whirr could reuse the compute service if available.

      1. whirr-548-update-3.patch
        106 kB
        Ioannis Canellos
      2. WHIRR-548.patch
        123 kB
        Ioannis Canellos
      3. WHIRR-548.patch
        27 kB
        Adrian Cole

        Activity

        Hide
        Ioannis Canellos added a comment -

        I am attaching a patch which adds the following:

        a) ClusterSpec can be assigned directly a ComputeService.
        b) ComputeCache will now check the clusterSpec for an existing compute service.
        c) Minor modifications to the api, so that the clusterSpec is passed directly in some methods (and not obtained throught the instance template as this patch makes possible to use whirr witout recipies).
        d) Karaf commands have been updated to support reusing ComputeService from the OSGi service registry. Also code completion has been implemented for misc options including templates.

        Show
        Ioannis Canellos added a comment - I am attaching a patch which adds the following: a) ClusterSpec can be assigned directly a ComputeService. b) ComputeCache will now check the clusterSpec for an existing compute service. c) Minor modifications to the api, so that the clusterSpec is passed directly in some methods (and not obtained throught the instance template as this patch makes possible to use whirr witout recipies). d) Karaf commands have been updated to support reusing ComputeService from the OSGi service registry. Also code completion has been implemented for misc options including templates.
        Hide
        Ioannis Canellos added a comment -

        Can anyone spent some time reviewing this, so that I can commit it?

        Show
        Ioannis Canellos added a comment - Can anyone spent some time reviewing this, so that I can commit it?
        Hide
        Adrian Cole (Inactive) added a comment -

        updated

        Show
        Adrian Cole (Inactive) added a comment - updated
        Hide
        Adrian Cole (Inactive) added a comment -

        I updated with a much smaller patch. If we delegate calls to create context directly to the osgi stuff, there's little code to do!

        Show
        Adrian Cole (Inactive) added a comment - I updated with a much smaller patch. If we delegate calls to create context directly to the osgi stuff, there's little code to do!
        Hide
        Adrian Cole (Inactive) added a comment -

        note a couple TODOs:
        1. we should similarly unwrap the BlobStore stuff from ClusterStateStoreFactory so that we can inject our own fn to get BlobStores (ex. from OSGi) into the ctor of ClusterControllerFactory
        2. might need to guard close of contexts returned by WhirrCommandSupport.apply similar or equiv to ComputeCache.IgnoreCloseComputeServiceContext
        3. tests?

        otherwise.. looks almost done!

        Show
        Adrian Cole (Inactive) added a comment - note a couple TODOs: 1. we should similarly unwrap the BlobStore stuff from ClusterStateStoreFactory so that we can inject our own fn to get BlobStores (ex. from OSGi) into the ctor of ClusterControllerFactory 2. might need to guard close of contexts returned by WhirrCommandSupport.apply similar or equiv to ComputeCache.IgnoreCloseComputeServiceContext 3. tests? otherwise.. looks almost done!
        Hide
        Ioannis Canellos added a comment -

        I am attaching a rewrite of the initial patch that does the following:

        i) Introduces DynamicComputeCache, which is a ComputeCache that can be externally added compute services.
        ii) In OSGi the DynamicComputeCache is used by default.
        iii) Fixed minor issues in the activator of whirr-core.
        iv) Fixed an IllegalStateException when uninstalling whirr-hbase from OSGi.
        v) Brought back karaf commands blueprint descriptor.
        vi) Improved loading of default-xxxx.properties files to be more OSGi friendly.
        vii) Added TCCL trick to make velocity play nicely inside OSGI (hbase + hadoop).

        Show
        Ioannis Canellos added a comment - I am attaching a rewrite of the initial patch that does the following: i) Introduces DynamicComputeCache, which is a ComputeCache that can be externally added compute services. ii) In OSGi the DynamicComputeCache is used by default. iii) Fixed minor issues in the activator of whirr-core. iv) Fixed an IllegalStateException when uninstalling whirr-hbase from OSGi. v) Brought back karaf commands blueprint descriptor. vi) Improved loading of default-xxxx.properties files to be more OSGi friendly. vii) Added TCCL trick to make velocity play nicely inside OSGI (hbase + hadoop).
        Hide
        Andrew Bayer added a comment -

        +1 by me.

        Show
        Andrew Bayer added a comment - +1 by me.
        Hide
        Andrei Savu added a comment -

        Marking this as fixed because the patch was committed on September 10. I have also updated CHANGES.txt on trunk and branch-0.8.

        Show
        Andrei Savu added a comment - Marking this as fixed because the patch was committed on September 10. I have also updated CHANGES.txt on trunk and branch-0.8.

          People

          • Assignee:
            Ioannis Canellos
            Reporter:
            Ioannis Canellos
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development