Updated Branches: refs/heads/master 36d0c28d0 -> e9b884be3
Replaced partition_id with network_partition_id in autoscaler message delegator Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/e9b884be Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/e9b884be Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/e9b884be Branch: refs/heads/master Commit: e9b884be3ce4eda68324001e632b0c8c2feefc7a Parents: 36d0c28 Author: Imesh Gunaratne <[email protected]> Authored: Fri Dec 13 12:28:37 2013 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Fri Dec 13 12:28:37 2013 +0530 ---------------------------------------------------------------------- .../receiver/health/HealthEventMessageDelegator.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/e9b884be/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 9c19e50..e5ac2b9 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 @@ -76,13 +76,12 @@ public class HealthEventMessageDelegator implements Runnable { if (Constants.AVERAGE_REQUESTS_IN_FLIGHT.equals(event.getEventName())) { String clusterId = event.getProperties().get("cluster_id"); - String partitionId = event.getProperties().get("partition_id"); + String networkPartitionId = event.getProperties().get("network_partition_id"); String value = event.getProperties().get("value"); - String networkPartitionId = PartitionManager.getInstance().getNetworkPartitionOfPartition(partitionId).getId(); Float floatValue = Float.parseFloat(value); if (log.isDebugEnabled()) { - log.debug(String.format("%s event: [cluster] %s [partition] %s [value] %s", event.getEventName(), clusterId, partitionId, value)); + log.debug(String.format("%s event: [cluster] %s [network-partition] %s [value] %s", event.getEventName(), clusterId, networkPartitionId, value)); } AutoscalerContext.getInstance().getMonitor(clusterId).getNetworkPartitionCtxt(networkPartitionId) @@ -90,13 +89,12 @@ public class HealthEventMessageDelegator implements Runnable { } else if (Constants.GRADIENT_OF_REQUESTS_IN_FLIGHT.equals(event.getEventName())) { String clusterId = event.getProperties().get("cluster_id"); - String partitionId = event.getProperties().get("partition_id"); + String networkPartitionId = event.getProperties().get("network_partition_id"); String value = event.getProperties().get("value"); - String networkPartitionId = PartitionManager.getInstance().getNetworkPartitionOfPartition(partitionId).getId(); Float floatValue = Float.parseFloat(value); if (log.isDebugEnabled()) { - log.debug(String.format("%s event: [cluster] %s [partition] %s [value] %s", event.getEventName(), clusterId, partitionId, value)); + log.debug(String.format("%s event: [cluster] %s [network-partition] %s [value] %s", event.getEventName(), clusterId, networkPartitionId, value)); } AutoscalerContext.getInstance().getMonitor(clusterId).getNetworkPartitionCtxt(networkPartitionId) @@ -104,13 +102,12 @@ public class HealthEventMessageDelegator implements Runnable { } else if (Constants.SECOND_DERIVATIVE_OF_REQUESTS_IN_FLIGHT.equals(event.getEventName())) { String clusterId = event.getProperties().get("cluster_id"); - String partitionId = event.getProperties().get("partition_id"); + String networkPartitionId = event.getProperties().get("network_partition_id"); String value = event.getProperties().get("value"); - String networkPartitionId = PartitionManager.getInstance().getNetworkPartitionOfPartition(partitionId).getId(); Float floatValue = Float.parseFloat(value); if (log.isDebugEnabled()) { - log.debug(String.format("%s event: [cluster] %s [partition] %s [value] %s", event.getEventName(), clusterId, partitionId, value)); + log.debug(String.format("%s event: [cluster] %s [network-partition] %s [value] %s", event.getEventName(), clusterId, networkPartitionId, value)); } AutoscalerContext.getInstance().getMonitor(clusterId).getNetworkPartitionCtxt(networkPartitionId)
