You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/06/11 19:31:06 UTC
[1/2] stratos git commit: Add the member stat context for pending
members, so that they will be accounted in scaling down member selection
Repository: stratos
Updated Branches:
refs/heads/master 55e49d0f8 -> e7e376e4a
Add the member stat context for pending members, so that they will be accounted in scaling down member selection
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/940992e0
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/940992e0
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/940992e0
Branch: refs/heads/master
Commit: 940992e00cf5b46f4b6eb8061af19909702f174b
Parents: 55e49d0
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Jun 11 17:00:39 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Jun 11 17:00:39 2015 +0530
----------------------------------------------------------------------
.../java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/940992e0/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
index e4cf83b..0ad79fb 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
@@ -204,6 +204,7 @@ public class RuleTasksDelegator {
ClusterLevelPartitionContext partitionContext = clusterInstanceContext.
getPartitionCtxt(clusterMonitorPartitionContext.getPartitionId());
partitionContext.addPendingMember(memberContext);
+ partitionContext.addMemberStatsContext(new MemberStatsContext(memberContext.getMemberId()));
if (log.isDebugEnabled()) {
log.debug(String.format("Pending member added, [member] %s [partition] %s", memberContext.getMemberId(),
memberContext.getPartition().getId()));
[2/2] stratos git commit: Fix parent class access for member stast
context
Posted by la...@apache.org.
Fix parent class access for member stast context
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/e7e376e4
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/e7e376e4
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/e7e376e4
Branch: refs/heads/master
Commit: e7e376e4a97113277e67386ebbfba35db964ebef
Parents: 940992e
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Thu Jun 11 17:01:11 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Thu Jun 11 17:01:11 2015 +0530
----------------------------------------------------------------------
.../context/partition/ClusterLevelPartitionContext.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/e7e376e4/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
index 41a5627..4037941 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/partition/ClusterLevelPartitionContext.java
@@ -727,8 +727,8 @@ public class ClusterLevelPartitionContext extends PartitionContext implements Se
CloudControllerServiceClient.getInstance().removeExpiredObsoledMemberFromCloudController(
obsoleteMember);
iterator.remove();
- if (memberStatsContexts.containsKey(obsoleteMemberId)) {
- memberStatsContexts.remove(obsoleteMemberId);
+ if (ctxt.getMemberStatsContexts().containsKey(obsoleteMemberId)) {
+ ctxt.getMemberStatsContexts().remove(obsoleteMemberId);
}
log.info(String.format("Obsolete member is removed from autoscaler and cloud controller " +
"[obsolete member] %s [cluster] %s " +