stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chamila De Alwis <chami...@wso2.com>
Subject Re: [GSoC-2015] Showing health statistics in GUI
Date Tue, 07 Jul 2015 04:02:25 GMT
Hi Ashan,

As I've seen from the PCA testing recently, the timestamp is added to every
ThriftEvent before publishing. Are you working on PCA or the Mock IaaS? I
took a look at the Mock IaaS and the WSO2CEPStatisticsPublisher as well,
and found out that the latter indeed doesn't add the timestamp to the
ThriftEvents. This means that the JCA also publishes Thrift Events with
empty timestamp fields.

Following is the simple fix for that. I've attached the patch herewith.
Could you quickly verify with the patch applied build also?

chamilad@chamilad-ThinkPad-T530:~/dev/stratos[master *]$ git diff
diff --git
a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java
b/c
index 653288d..f1fe426 100644
---
a/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java
+++
b/components/org.apache.stratos.common/src/main/java/org/apache/stratos/common/statistics/publisher/wso2/cep/WSO2CEPStatisticsPublisher.java
@@ -29,6 +29,7 @@ import
org.wso2.carbon.databridge.agent.thrift.exception.AgentException;
 import org.wso2.carbon.databridge.commons.Event;
 import org.wso2.carbon.databridge.commons.StreamDefinition;

+import java.util.Date;
 import java.util.HashMap;

 /**
@@ -98,6 +99,7 @@ public class WSO2CEPStatisticsPublisher implements
StatisticsPublisher {

         Event event = new Event();
         event.setPayloadData(payload);
*+        event.setTimeStamp(new Date().getTime());*
         event.setArbitraryDataMap(new HashMap<String, String>());

         try {





Regards,
Chamila de Alwis
Committer and PMC Member - Apache Stratos
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Mon, Jul 6, 2015 at 2:09 PM, Ashan Dhananjaya <dhananjaya92@gmail.com>
wrote:

> Hi Paranavan,
>
> Thank you for the information.
>
> On Mon, Jul 6, 2015 at 10:35 PM, Pranavan Theivendiram <
> pranavan.11@cse.mrt.ac.lk> wrote:
>
>> Hi Ashan,
>>
>> You have to embed time stamp with the event that is related with CA. That
>> is a possible solution.
>>
>> Thanks
>>
>> *T. Pranavan*
>> *BSc Eng Undergraduate| Department of Computer Science & Engineering
>> ,University of Moratuwa*
>> *Mobile| *0775136836
>>
>> On 6 July 2015 at 22:24, Ashan Dhananjaya <dhananjaya92@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I'm experiencing that the python cartridge agent doesn't publish the
>>> timestamp with the health statistics. Working with the python cartridge
>>> agent health publisher to get the timestamp publish enable.
>>>
>>> Thank You!
>>> Best Regards,
>>> Ashan
>>>
>>
>>
>

Mime
View raw message