You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2013/12/05 07:18:18 UTC
[1/3] git commit: Refacter to new cluster context Added debug logs
Updated Branches:
refs/heads/master 419a460dc -> 9cbad2329
Refacter to new cluster context
Added debug logs
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/b7d5e7ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/b7d5e7ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/b7d5e7ef
Branch: refs/heads/master
Commit: b7d5e7ef20d2864f93175040da43d3b1c1ce3fe2
Parents: 7c51d04
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Dec 4 21:52:11 2013 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Dec 4 21:52:11 2013 -0500
----------------------------------------------------------------------
.../health/HealthEventMessageDelegator.java | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/b7d5e7ef/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/HealthEventMessageDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/HealthEventMessageDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/HealthEventMessageDelegator.java
index 2f0a3e2..a5607c6 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/HealthEventMessageDelegator.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/HealthEventMessageDelegator.java
@@ -24,10 +24,12 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.autoscaler.AutoscalerContext;
import org.apache.stratos.autoscaler.ClusterContext;
+import org.apache.stratos.autoscaler.ClusterMonitor;
import org.apache.stratos.autoscaler.Constants;
import org.apache.stratos.autoscaler.client.cloud.controller.CloudControllerClient;
import org.apache.stratos.autoscaler.exception.SpawningException;
import org.apache.stratos.autoscaler.exception.TerminationException;
+import org.apache.stratos.autoscaler.rule.AutoscalerRuleEvaluator;
import org.apache.stratos.cloud.controller.deployment.partition.Partition;
import javax.jms.TextMessage;
@@ -57,6 +59,8 @@ public class HealthEventMessageDelegator implements Runnable {
TextMessage message = HealthEventQueue.getInstance().take();
String messageText = message.getText();
+ if(log.isDebugEnabled())
+ log.debug("Health event message received. Message :" + messageText);
messageProperties = setEventValues(messageText);
this.clusterId = messageProperties.get("cluster_id");
@@ -86,8 +90,8 @@ public class HealthEventMessageDelegator implements Runnable {
messageProperties.clear();
} catch (Exception e) {
- String error = "Failed to retrieve the health stat event message.";
- log.error(error);
+ String error = "Failed to retrieve the health stat event message." + e.getMessage();
+ log.error(error );
}
}
}
@@ -99,9 +103,12 @@ public class HealthEventMessageDelegator implements Runnable {
ccClient.terminate(memberId);
// start a new member in the same Partition
- ClusterContext clsCtx = AutoscalerContext.getInstance().getClusterContext(clusterId);
- String partitionId = clsCtx.getPartitonOfMember(memberId);
- Partition partition = clsCtx.getDeploymentPolicy().getPartitionById(partitionId);
+ ClusterMonitor monitor = AutoscalerRuleEvaluator.getInstance().getMonitor(this.clusterId);
+ ClusterContext clusCtx = monitor.getClusterCtxt();
+
+ //ClusterContext clsCtx = AutoscalerContext.getInstance().getClusterContext(clusterId);
+ String partitionId = clusCtx.getPartitonOfMember(memberId);
+ Partition partition = clusCtx.getDeploymentPolicy().getPartitionById(partitionId);
ccClient.spawnAnInstance(partition, clusterId);
} catch (TerminationException e) {
[3/3] git commit: removing service stub
org.apache.stratos.cartridge.mgt.service.stub
Posted by ud...@apache.org.
removing service stub org.apache.stratos.cartridge.mgt.service.stub
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/9cbad232
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/9cbad232
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/9cbad232
Branch: refs/heads/master
Commit: 9cbad23298c93f4adefa051b209ade7d594e159b
Parents: 16e32f4
Author: Udara Liyanage <ud...@wso2.com>
Authored: Thu Dec 5 11:45:01 2013 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Thu Dec 5 11:45:01 2013 -0500
----------------------------------------------------------------------
service-stubs/pom.xml | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9cbad232/service-stubs/pom.xml
----------------------------------------------------------------------
diff --git a/service-stubs/pom.xml b/service-stubs/pom.xml
index 73dabcc..908b70a 100644
--- a/service-stubs/pom.xml
+++ b/service-stubs/pom.xml
@@ -57,7 +57,6 @@
<module>org.apache.stratos.usage.meteringqueryds.stub</module>
<module>org.apache.stratos.manager.dashboard.stub</module>
<module>org.apache.stratos.usage.meteringsummarygenerationds.stub</module>
- <module>org.apache.stratos.cartridge.mgt.service.stub</module>
</modules>
<build>
[2/3] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/incubator-stratos
Posted by ud...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/16e32f40
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/16e32f40
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/16e32f40
Branch: refs/heads/master
Commit: 16e32f409e500ef0fbc52fc6ceda08b5f336d34c
Parents: b7d5e7e 419a460
Author: Udara Liyanage <ud...@wso2.com>
Authored: Thu Dec 5 10:39:08 2013 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Thu Dec 5 10:39:08 2013 -0500
----------------------------------------------------------------------
.../client/CloudControllerServiceClient.java | 27 +++
.../impl/CloudControllerServiceImpl.java | 140 ++++++++----
.../interfaces/CloudControllerService.java | 8 +
.../cloud/controller/pojo/Cartridge.java | 6 +
.../cloud/controller/pojo/CartridgeConfig.java | 216 +++++++++++++++++++
.../cloud/controller/pojo/IaasConfig.java | 153 +++++++++++++
.../cloud/controller/pojo/IaasProvider.java | 48 ++---
.../cloud/controller/pojo/PortMapping.java | 5 +
.../stratos/cloud/controller/pojo/Property.java | 4 +
.../controller/util/CloudControllerUtil.java | 101 +++++++++
.../org.apache.stratos.rest.endpoint/pom.xml | 8 +-
.../stratos/rest/endpoint/ServiceHolder.java | 7 +
.../definition/CartridgeDefinitionBean.java | 108 ++++++++++
.../cartridge/definition/DeploymentBean.java | 46 ++++
.../cartridge/definition/IaasProviderBean.java | 62 ++++++
.../cartridge/definition/LoadBalancerBean.java | 44 ++++
.../cartridge/definition/PortMappingBean.java | 36 ++++
.../bean/cartridge/definition/PropertyBean.java | 30 +++
.../endpoint/bean/util/type/list/ListType.java | 39 ++++
.../endpoint/exception/RestAPIException.java | 50 +++++
.../rest/endpoint/services/ServiceUtils.java | 169 ++++++++++++++-
.../rest/endpoint/services/StratosAdmin.java | 24 ++-
.../main/resources/CloudControllerService.wsdl | 144 ++++++++++++-
service-stubs/pom.xml | 1 +
24 files changed, 1393 insertions(+), 83 deletions(-)
----------------------------------------------------------------------