You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by imesh <gi...@git.apache.org> on 2014/10/07 06:54:37 UTC

[GitHub] stratos pull request: Initial version of docker cluster monitor

Github user imesh commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/35#discussion_r18500435
  
    --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java ---
    @@ -109,4 +113,33 @@ public void setLbMonitors(Map<String, LbClusterMonitor> monitors) {
         public void addLbMonitor(LbClusterMonitor monitor) {
             lbMonitors.put(monitor.getClusterId(), monitor);
         }
    +    
    +    public void addKubernetesClusterMonitor(KubernetesClusterMonitor kubernetesClusterMonitor) {
    +        kubernetesClusterMonitors.put(kubernetesClusterMonitor.getClusterId(), kubernetesClusterMonitor);
    +    }
    +
    +    public KubernetesClusterMonitor getKubernetesClusterMonitor(String clusterId) {
    +        return kubernetesClusterMonitors.get(clusterId);
    +    }
    +    
    +    public boolean kubernetesClusterMonitorExist(String clusterId) {
    +        return kubernetesClusterMonitors.containsKey(clusterId);
    +    }
    +    
    +    public Map<String, KubernetesClusterMonitor> getKubernetesClusterMonitors() {
    +        return kubernetesClusterMonitors;
    +    }
    +
    +    public void setKubernetesClusterMonitors(Map<String, KubernetesClusterMonitor> kubernetesClusterMonitors) {
    +        this.kubernetesClusterMonitors = kubernetesClusterMonitors;
    +    }
    +    
    +    public KubernetesClusterMonitor removeKubernetesClusterMonitor(String clusterId) {
    +    	if(!kubernetesClusterMonitorExist(clusterId)) {
    +    		log.fatal("Kubernetes cluster monitor not found for cluster id: "+clusterId);
    --- End diff --
    
    May be we can change the log level to error or warning here.


---
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.
---