brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #746: Auto wrap YAML BOMs as catalog bundles
Date Mon, 17 Jul 2017 10:34:28 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/746#discussion_r127675863
  
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/ha/OsgiArchiveInstaller.java
---
    @@ -371,23 +394,36 @@ public void run() {
                                 osgiManager.uninstallCatalogItemsFromBundle( result.getVersionedName()
);
                                 // (ideally removal and addition would be atomic)
                             }
    -                        for (CatalogItem<?,?> ci: osgiManager.loadCatalogBom(result.bundle))
{
    +                        osgiManager.loadCatalogBom(result.bundle, force, validateTypes);
    +                        Iterable<RegisteredType> items = mgmt().getTypeRegistry().getMatching(RegisteredTypePredicates.containingBundle(result.getMetadata()));
    +                        log.debug("Adding items from bundle "+result.getVersionedName()+":
"+items);
    +                        for (RegisteredType ci: items) {
                                 result.catalogItemsInstalled.add(ci.getId());
                             }
                         }
                     }
                 };
                 if (deferredStart) {
                     result.deferredStart = startRunnable;
    +                log.debug(result.message+" (Brooklyn load deferred)");
                 } else {
                     startRunnable.run();
    +                if (!result.catalogItemsInstalled.isEmpty()) {
    +                    // show fewer info messages, only for 'interesting' and non-deferred
installations
    +                    // (rebind is deferred, as are tests, but REST is not)
    +                    MutableList<String> firstFive = MutableList.copyOf(Iterables.limit(result.catalogItemsInstalled,
5));
    +                    log.info(result.message+", items: "+firstFive+
    +                        (result.catalogItemsInstalled.size() > 5 ? " (and others,
"+result.catalogItemsInstalled.size()+" total)" : "") );
    --- End diff --
    
    done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message