Repository: karaf-cellar Updated Branches: refs/heads/cellar-3.0.x b68374d8a -> a843ad78a
[KARAF-3614] Fix feature repositories sync Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/a843ad78 Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/a843ad78 Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/a843ad78 Branch: refs/heads/cellar-3.0.x Commit: a843ad78ad215359abd37eab998efcb80d68770c Parents: b68374d Author: Jean-Baptiste Onofré <[email protected]> Authored: Mon Mar 16 22:05:18 2015 +0100 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Mon Mar 16 22:05:18 2015 +0100 ---------------------------------------------------------------------- .../apache/karaf/cellar/features/Constants.java | 2 +- .../cellar/features/FeaturesEventHandler.java | 18 +++++----- .../cellar/features/FeaturesSynchronizer.java | 37 ++++++++++---------- .../cellar/features/LocalFeaturesListener.java | 21 ++++++----- .../cellar/features/RepositoryEventHandler.java | 16 ++++----- .../internal/CellarFeaturesMBeanImpl.java | 6 ++-- .../cellar/features/shell/RepoAddCommand.java | 2 +- .../cellar/features/shell/RepoListCommand.java | 2 +- .../features/shell/RepoRemoveCommand.java | 2 +- 9 files changed, 52 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/Constants.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/Constants.java b/features/src/main/java/org/apache/karaf/cellar/features/Constants.java index 01fcc60..0d11475 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/Constants.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/Constants.java @@ -19,7 +19,7 @@ package org.apache.karaf.cellar.features; public class Constants { // hazelcast distributed resources name - public static final String REPOSITORIES_LIST = "org.apache.karaf.cellar.repositories"; + public static final String REPOSITORIES_MAP = "org.apache.karaf.cellar.repositories"; public static final String FEATURES_MAP = "org.apache.karaf.cellar.features"; // configuration category http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/FeaturesEventHandler.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesEventHandler.java b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesEventHandler.java index 40c9db8..eb706fa 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesEventHandler.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesEventHandler.java @@ -56,19 +56,19 @@ public class FeaturesEventHandler extends FeaturesSupport implements EventHandle public void handle(ClusterFeaturesEvent event) { if (this.getSwitch().getStatus().equals(SwitchStatus.OFF)) { - LOGGER.debug("CELLAR FEATURES: {} switch is OFF, cluster event is not handled", SWITCH_ID); + LOGGER.debug("CELLAR FEATURE: {} switch is OFF, cluster event is not handled", SWITCH_ID); return; } if (groupManager == null) { //in rare cases for example right after installation this happens! - LOGGER.error("CELLAR FEATURES: retrieved event {} while groupManager is not available yet!", event); + LOGGER.error("CELLAR FEATURE: retrieved event {} while groupManager is not available yet!", event); return; } // check if the group is local if (!groupManager.isLocalGroup(event.getSourceGroup().getName())) { - LOGGER.debug("CELLAR FEATURES: node is not part of the event cluster group {}", event.getSourceGroup().getName()); + LOGGER.debug("CELLAR FEATURE: node is not part of the event cluster group {}", event.getSourceGroup().getName()); return; } @@ -93,10 +93,10 @@ public class FeaturesEventHandler extends FeaturesSupport implements EventHandle options.add(FeaturesService.Option.NoAutoStartBundles); } if (version != null) { - LOGGER.debug("CELLAR FEATURES: installing feature {}/{}", name, version); + LOGGER.debug("CELLAR FEATURE: installing feature {}/{}", name, version); featuresService.installFeature(name, version, options); } else { - LOGGER.debug("CELLAR FEATURES: installing feature {}", name); + LOGGER.debug("CELLAR FEATURE: installing feature {}", name); featuresService.installFeature(name, options); } } else if (FeatureEvent.EventType.FeatureUninstalled.equals(type) && isInstalled) { @@ -106,17 +106,17 @@ public class FeaturesEventHandler extends FeaturesSupport implements EventHandle options.add(FeaturesService.Option.NoAutoRefreshBundles); } if (version != null) { - LOGGER.debug("CELLAR FEATURES: uninstalling feature {}/{}", name, version); + LOGGER.debug("CELLAR FEATURE: uninstalling feature {}/{}", name, version); featuresService.uninstallFeature(name, version, options); } else { - LOGGER.debug("CELLAR FEATURES: uninstalling feature {}", name); + LOGGER.debug("CELLAR FEATURE: uninstalling feature {}", name); featuresService.uninstallFeature(name, options); } } } catch (Exception e) { - LOGGER.error("CELLAR FEATURES: failed to handle cluster feature event", e); + LOGGER.error("CELLAR FEATURE: failed to handle cluster feature event", e); } - } else LOGGER.trace("CELLAR FEATURES: feature {} is marked BLOCKED INBOUND for cluster group {}", name, event.getSourceGroup().getName()); + } else LOGGER.trace("CELLAR FEATURE: feature {} is marked BLOCKED INBOUND for cluster group {}", name, event.getSourceGroup().getName()); } /** http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java index 3996e4a..7ab60b7 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/FeaturesSynchronizer.java @@ -27,7 +27,6 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.util.Dictionary; -import java.util.List; import java.util.Map; import java.util.Set; @@ -86,26 +85,26 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize public void pull(Group group) { if (group != null) { String groupName = group.getName(); - LOGGER.debug("CELLAR FEATURES: pulling features repositories and features from cluster group {}", groupName); + LOGGER.debug("CELLAR FEATURE: pulling features repositories and features from cluster group {}", groupName); ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - List<String> clusterRepositories = clusterManager.getList(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName); // get the features repositories URLs from the cluster group if (clusterRepositories != null && !clusterRepositories.isEmpty()) { - for (String url : clusterRepositories) { + for (String url : clusterRepositories.keySet()) { try { if (!isRepositoryRegisteredLocally(url)) { - LOGGER.debug("CELLAR FEATURES: adding repository {}", url); + LOGGER.debug("CELLAR FEATURE: adding repository {}", url); featuresService.addRepository(new URI(url)); } } catch (MalformedURLException e) { - LOGGER.error("CELLAR FEATURES: failed to add repository URL {} (malformed)", url, e); + LOGGER.error("CELLAR FEATURE: failed to add repository URL {} (malformed)", url, e); } catch (Exception e) { - LOGGER.error("CELLAR FEATURES: failed to add repository URL {}", url, e); + LOGGER.error("CELLAR FEATURE: failed to add repository URL {}", url, e); } } } @@ -130,13 +129,13 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize // if feature has to be installed locally if (clusterInstalled && !locallyInstalled) { try { - LOGGER.debug("CELLAR FEATURES: installing feature {}/{}", state.getName(), state.getVersion()); + LOGGER.debug("CELLAR FEATURE: installing feature {}/{}", state.getName(), state.getVersion()); featuresService.installFeature(state.getName(), state.getVersion()); } catch (Exception e) { - LOGGER.error("CELLAR FEATURES: failed to install feature {}/{} ", new Object[]{state.getName(), state.getVersion()}, e); + LOGGER.error("CELLAR FEATURE: failed to install feature {}/{} ", new Object[]{state.getName(), state.getVersion()}, e); } } - } else LOGGER.trace("CELLAR FEATURES: feature {} is marked BLOCKED INBOUND for cluster group {}", name, groupName); + } else LOGGER.trace("CELLAR FEATURE: feature {} is marked BLOCKED INBOUND for cluster group {}", name, groupName); } } } finally { @@ -154,13 +153,13 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize public void push(Group group) { if (group != null) { String groupName = group.getName(); - LOGGER.debug("CELLAR FEATURES: pushing features repositories and features in cluster group {}", groupName); + LOGGER.debug("CELLAR FEATURE: pushing features repositories and features in cluster group {}", groupName); ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); - List<String> clusterRepositories = clusterManager.getList(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName); Repository[] repositoryList = new Repository[0]; @@ -170,17 +169,17 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize repositoryList = featuresService.listRepositories(); featuresList = featuresService.listFeatures(); } catch (Exception e) { - LOGGER.error("CELLAR FEATURES: error listing features", e); + LOGGER.error("CELLAR FEATURE: error listing features", e); } // push features repositories to the cluster group if (repositoryList != null && repositoryList.length > 0) { for (Repository repository : repositoryList) { - if (!clusterRepositories.contains(repository.getURI().toString())) { - clusterRepositories.add(repository.getURI().toString()); - LOGGER.debug("CELLAR FEATURES: pushing repository {} in cluster group {}", repository.getName(), groupName); + if (!clusterRepositories.containsKey(repository.getURI().toString())) { + clusterRepositories.put(repository.getURI().toString(), repository.getName()); + LOGGER.debug("CELLAR FEATURE: pushing repository {} in cluster group {}", repository.getName(), groupName); } else { - LOGGER.debug("CELLAR FEATURES: repository {} is already in cluster group {}", repository.getName(), groupName); + LOGGER.debug("CELLAR FEATURE: repository {} is already in cluster group {}", repository.getName(), groupName); } } } @@ -194,9 +193,9 @@ public class FeaturesSynchronizer extends FeaturesSupport implements Synchronize clusterFeatureState.setVersion(feature.getVersion()); clusterFeatureState.setInstalled(featuresService.isInstalled(feature)); clusterFeatures.put(feature.getName() + "/" + feature.getVersion(), clusterFeatureState); - LOGGER.debug("CELLAR FEATURES : pushing feature {}/{} to cluster group {}", feature.getName(), feature.getVersion(), groupName); + LOGGER.debug("CELLAR FEATURE : pushing feature {}/{} to cluster group {}", feature.getName(), feature.getVersion(), groupName); } else { - LOGGER.debug("CELLAR FEATURES: feature {} is marked BLOCKED OUTBOUND for cluster group {}", feature.getName(), groupName); + LOGGER.debug("CELLAR FEATURE: feature {} is marked BLOCKED OUTBOUND for cluster group {}", feature.getName(), groupName); } } } http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java b/features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java index dc1d4e9..26c5f50 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java @@ -26,7 +26,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Dictionary; -import java.util.List; import java.util.Map; import java.util.Set; @@ -58,13 +57,13 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache public void featureEvent(FeatureEvent event) { if (!isEnabled()) { - LOGGER.debug("CELLAR FEATURES: local listener is disabled"); + LOGGER.debug("CELLAR FEATURE: local listener is disabled"); return; } // check if the producer is ON if (eventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) { - LOGGER.debug("CELLAR FEATURES: cluster event producer is OFF"); + LOGGER.debug("CELLAR FEATURE: cluster event producer is OFF"); return; } @@ -97,7 +96,7 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache ClusterFeaturesEvent featureEvent = new ClusterFeaturesEvent(name, version, type); featureEvent.setSourceGroup(group); eventProducer.produce(featureEvent); - } else LOGGER.trace("CELLAR FEATURES: feature {} is marked BLOCKED OUTBOUND for cluster group {}", name, group.getName()); + } else LOGGER.trace("CELLAR FEATURE: feature {} is marked BLOCKED OUTBOUND for cluster group {}", name, group.getName()); } } } @@ -112,13 +111,13 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache public void repositoryEvent(RepositoryEvent event) { if (!isEnabled()) { - LOGGER.debug("CELLAR FEATURES: local listener is disabled"); + LOGGER.debug("CELLAR FEATURE: local listener is disabled"); return; } // check if the producer is ON if (eventProducer.getSwitch().getStatus().equals(SwitchStatus.OFF)) { - LOGGER.debug("CELLAR FEATURES: cluster event producer is OFF"); + LOGGER.debug("CELLAR FEATURE: cluster event producer is OFF"); return; } @@ -134,12 +133,12 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache clusterRepositoryEvent.setSourceGroup(group); RepositoryEvent.EventType type = event.getType(); - List<String> clusterRepositories = clusterManager.getList(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + group.getName()); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + group.getName()); // update the features repositories in the cluster group if (RepositoryEvent.EventType.RepositoryAdded.equals(type)) { - if (!clusterRepositories.contains(event.getRepository().getURI().toString())) { - clusterRepositories.add(event.getRepository().getURI().toString()); + if (!clusterRepositories.containsKey(event.getRepository().getURI().toString())) { + clusterRepositories.put(event.getRepository().getURI().toString(), event.getRepository().getName()); } // update the features in the cluster group Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + group.getName()); @@ -153,7 +152,7 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache clusterFeatures.put(feature.getName() + "/" + feature.getVersion(), clusterFeatureState); } } catch (Exception e) { - LOGGER.warn("CELLAR FEATURES: failed to update the cluster group", e); + LOGGER.warn("CELLAR FEATURE: failed to update the cluster group", e); } } else { // update the repositories in the cluster group @@ -165,7 +164,7 @@ public class LocalFeaturesListener extends FeaturesSupport implements org.apache clusterFeatures.remove(feature.getName() + "/" + feature.getVersion()); } } catch (Exception e) { - LOGGER.warn("CELLAR FEATURES: failed to update the cluster group", e); + LOGGER.warn("CELLAR FEATURE: failed to update the cluster group", e); } } // broadcast the cluster event http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/RepositoryEventHandler.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/RepositoryEventHandler.java b/features/src/main/java/org/apache/karaf/cellar/features/RepositoryEventHandler.java index 3799ec9..494537c 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/RepositoryEventHandler.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/RepositoryEventHandler.java @@ -54,19 +54,19 @@ public class RepositoryEventHandler extends FeaturesSupport implements EventHand // check if the handler is ON if (eventSwitch.getStatus().equals(SwitchStatus.OFF)) { - LOGGER.debug("CELLAR FEATURES: {} switch is OFF, cluster event is not handled", SWITCH_ID); + LOGGER.debug("CELLAR FEATURE: {} switch is OFF, cluster event is not handled", SWITCH_ID); return; } if (groupManager == null) { //in rare cases for example right after installation this happens! - LOGGER.error("CELLAR FEATURES: retrieved event {} while groupManager is not available yet!", event); + LOGGER.error("CELLAR FEATURE: retrieved event {} while groupManager is not available yet!", event); return; } // check if the group is local if (!groupManager.isLocalGroup(event.getSourceGroup().getName())) { - LOGGER.debug("CELLAR FEATURES: node is not part of the event cluster group"); + LOGGER.debug("CELLAR FEATURE: node is not part of the event cluster group"); return; } @@ -76,21 +76,21 @@ public class RepositoryEventHandler extends FeaturesSupport implements EventHand // TODO check if isAllowed if (RepositoryEvent.EventType.RepositoryAdded.equals(type)) { if (!isRepositoryRegisteredLocally(uri)) { - LOGGER.debug("CELLAR FEATURES: adding repository URI {}", uri); + LOGGER.debug("CELLAR FEATURE: adding repository URI {}", uri); featuresService.addRepository(new URI(uri), event.getInstall()); } else { - LOGGER.debug("CELLAR FEATURES: repository URI {} is already registered locally"); + LOGGER.debug("CELLAR FEATURE: repository URI {} is already registered locally"); } } else { if (isRepositoryRegisteredLocally(uri)) { - LOGGER.debug("CELLAR FEATURES: removing repository URI {}", uri); + LOGGER.debug("CELLAR FEATURE: removing repository URI {}", uri); featuresService.removeRepository(new URI(uri), event.getUninstall()); } else { - LOGGER.debug("CELLAR FEATURES: repository URI {} is not registered locally"); + LOGGER.debug("CELLAR FEATURE: repository URI {} is not registered locally"); } } } catch (Exception e) { - LOGGER.error("CELLAR FEATURES: failed to add/remove repository URL {}", uri, e); + LOGGER.error("CELLAR FEATURE: failed to add/remove repository URL {}", uri, e); } } http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java b/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java index 0ae7bf1..4ff1cc3 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java @@ -380,7 +380,7 @@ public class CellarFeaturesMBeanImpl extends StandardMBean implements CellarFeat } // get the features repositories in the cluster group - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); List<String> result = new ArrayList<String>(); for (String clusterRepository : clusterRepositories.keySet()) { @@ -412,7 +412,7 @@ public class CellarFeaturesMBeanImpl extends StandardMBean implements CellarFeat Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { // get the features repositories in the cluster group - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); // get the features in the cluster group Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName); @@ -501,7 +501,7 @@ public class CellarFeaturesMBeanImpl extends StandardMBean implements CellarFeat } // get the features repositories in the cluster group - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); // get the features in the cluster group Map<FeatureState, Boolean> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName); http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java index ca57b88..0788087 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoAddCommand.java @@ -67,7 +67,7 @@ public class RepoAddCommand extends CellarCommandSupport { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { // get the features repositories in the cluster group - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); // get the features in the cluster group Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName); http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoListCommand.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoListCommand.java b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoListCommand.java index ba04061..770919d 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoListCommand.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoListCommand.java @@ -87,7 +87,7 @@ public class RepoListCommand extends CellarCommandSupport { Map<String, RepositoryState> repositories = new HashMap<String, RepositoryState>(); // get the cluster features repositories - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); for (String url : clusterRepositories.keySet()) { RepositoryState state = new RepositoryState(); state.setCluster(true); http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/a843ad78/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java ---------------------------------------------------------------------- diff --git a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java index 0e11997..0d3c582 100644 --- a/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java +++ b/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java @@ -64,7 +64,7 @@ public class RepoRemoveCommand extends CellarCommandSupport { } // get the features repositories in the cluster group - Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_LIST + Configurations.SEPARATOR + groupName); + Map<String, String> clusterRepositories = clusterManager.getMap(Constants.REPOSITORIES_MAP + Configurations.SEPARATOR + groupName); // get the features in the cluster group Map<String, FeatureState> clusterFeatures = clusterManager.getMap(Constants.FEATURES_MAP + Configurations.SEPARATOR + groupName);
