You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/12/01 04:39:36 UTC

[3/7] stratos git commit: Fixing the issue of data publishers are created for nodes which has false value set to statsPublisherEnabled in thrift-client-config.xml

Fixing the issue of data publishers are created for nodes which has false value set to statsPublisherEnabled in thrift-client-config.xml


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/f726ea8c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/f726ea8c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/f726ea8c

Branch: refs/heads/stratos-4.1.x
Commit: f726ea8c22207e7f0ae4c99cc7a622e71f16687d
Parents: 81b72de
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 01:42:30 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Tue Dec 1 08:57:54 2015 +0530

----------------------------------------------------------------------
 .../statistics/publisher/ThriftStatisticsPublisher.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/f726ea8c/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
index 95c0478..f86293a 100644
--- a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
+++ b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/ThriftStatisticsPublisher.java
@@ -85,11 +85,13 @@ public class ThriftStatisticsPublisher implements StatisticsPublisher {
         ArrayList<ReceiverGroup> receiverGroups = new ArrayList<ReceiverGroup>();
 
         for (ThriftClientInfo thriftClientInfo : thriftClientInfoList) {
-            ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
-            DataPublisherHolder aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(), thriftClientInfo.getPassword());
-            dataPublisherHolders.add(aNode);
-            ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
-            receiverGroups.add(group);
+            if (thriftClientInfo.isStatsPublisherEnabled()) {
+                ArrayList<DataPublisherHolder> dataPublisherHolders = new ArrayList<DataPublisherHolder>();
+                DataPublisherHolder aNode = new DataPublisherHolder(null, buildUrl(thriftClientInfo), thriftClientInfo.getUsername(), thriftClientInfo.getPassword());
+                dataPublisherHolders.add(aNode);
+                ReceiverGroup group = new ReceiverGroup(dataPublisherHolders);
+                receiverGroups.add(group);
+            }
         }
         return receiverGroups;