brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [2/3] brooklyn-server git commit: only search in legacy catalog items in a couple other places
Date Wed, 13 Sep 2017 15:51:27 GMT
only search in legacy catalog items in a couple other places

and disable by default a feature that searches in all catalog bundles when rebinding
(as persistence should now include bundles)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/cc597770
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/cc597770
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/cc597770

Branch: refs/heads/master
Commit: cc597770823a4c8dbe659eaed1e310bfe90dd0a5
Parents: 1941021
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Sep 13 16:39:04 2017 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Sep 13 16:39:04 2017 +0100

----------------------------------------------------------------------
 .../org/apache/brooklyn/core/BrooklynFeatureEnablement.java     | 2 +-
 .../brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java    | 2 +-
 .../org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java   | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/cc597770/core/src/main/java/org/apache/brooklyn/core/BrooklynFeatureEnablement.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/BrooklynFeatureEnablement.java b/core/src/main/java/org/apache/brooklyn/core/BrooklynFeatureEnablement.java
index 8bbe2a4..55d6af0 100644
--- a/core/src/main/java/org/apache/brooklyn/core/BrooklynFeatureEnablement.java
+++ b/core/src/main/java/org/apache/brooklyn/core/BrooklynFeatureEnablement.java
@@ -146,7 +146,7 @@ public class BrooklynFeatureEnablement {
         setDefault(FEATURE_DEFAULT_STANDBY_IS_HOT_PROPERTY, false);
         setDefault(FEATURE_RENAME_THREADS, false);
         setDefault(FEATURE_JITTER_THREADS, false);
-        setDefault(FEATURE_BACKWARDS_COMPATIBILITY_INFER_CATALOG_ITEM_ON_REBIND, true);
+        setDefault(FEATURE_BACKWARDS_COMPATIBILITY_INFER_CATALOG_ITEM_ON_REBIND, false);
         setDefault(FEATURE_AUTO_FIX_CATALOG_REF_ON_REBIND, false);
         setDefault(FEATURE_SSH_ASYNC_EXEC, false);
         setDefault(FEATURE_VALIDATE_LOCATION_SSH_KEYS, true);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/cc597770/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
index ca63cce..4c424b4 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
@@ -189,7 +189,7 @@ public class BrooklynPersistenceUtils {
                 result.policy(instanceAdjunct.getId(), serializer.toString(newObjectMemento(instanceAdjunct)));
             }
         }
-        for (CatalogItem<?,?> instance: mgmt.getCatalog().getCatalogItems()) {
+        for (CatalogItem<?,?> instance: mgmt.getCatalog().getCatalogItemsLegacy())
{
             result.catalogItem(instance.getId(), serializer.toString(newObjectMemento(instance)));
         }
         OsgiManager osgi = ((LocalManagementContext)mgmt).getOsgiManager().orNull();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/cc597770/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
index 76a4d31..36f4275 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
@@ -1122,12 +1122,13 @@ public abstract class RebindIteration {
                 throw new IllegalStateException("Unable to load "+jType+" for catalog item
" + catalogItemId + " for " + contextSuchAsId);
                 
             } else if (BrooklynFeatureEnablement.isEnabled(FEATURE_BACKWARDS_COMPATIBILITY_INFER_CATALOG_ITEM_ON_REBIND))
{
-                //Try loading from whichever catalog bundle succeeds.
+                //Try loading from whichever catalog bundle succeeds (legacy CI items only;
also disabling this, as no longer needed 2017-09)
                 BrooklynCatalog catalog = managementContext.getCatalog();
-                for (CatalogItem<?, ?> item : catalog.getCatalogItems()) {
+                for (CatalogItem<?, ?> item : catalog.getCatalogItemsLegacy()) {
                     BrooklynClassLoadingContext catalogLoader = CatalogUtils.newClassLoadingContext(managementContext,
item);
                     Maybe<Class<?>> catalogClass = catalogLoader.tryLoadClass(jType);
                     if (catalogClass.isPresent()) {
+                        LOG.warn("Found "+jType+" only by scanning catalog item search paths");
                         return new LoadedClass<T>((Class<? extends T>) catalogClass.get(),
catalogItemId, reboundSearchPath);
                     }
                 }


Mime
View raw message