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/07 11:19:59 UTC

[30/50] [abbrv] 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/06332ee8
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/06332ee8
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/06332ee8

Branch: refs/heads/release-4.1.5
Commit: 06332ee8524dcd664901fe5f094996a2a7bc91d7
Parents: d333ff4
Author: Thanuja <th...@wso2.com>
Authored: Mon Nov 30 01:42:30 2015 +0530
Committer: gayangunarathne <ga...@wso2.com>
Committed: Mon Dec 7 10:16:27 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/stratos/blob/06332ee8/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;