【问题标题】:WSO2 DAS-How much DAS can keep data in memory using Siddhi?WSO2 DAS-使用 Siddhi 可以将多少数据保存在内存中?
【发布时间】:2016-09-15 13:32:44
【问题描述】:

我是 WSO2 DAS 的新手。根据文件,它说DAS可以快速分析数据。我想举个例子。我的场景如下。


@Import('in_test_stream:1.0.0')
define stream inStream (a string, b string);    *---> receive data*

@Export('out_other_stream:1.0.0')
define stream outOtherStream (a int);

@Export('out_test_stream:1.0.0')
define stream outStream (a string, b string, c string);

define table tmpTable (a long, b long, reg_date string);--> define meomry table for faster analytics

@info(name='query1')   *---> loading incoming data into memory table.*
from inStream
select convert(a, 'long') as a, convert(b, 'long') as b, time:currentTimestamp() as reg_date
insert into tmpTable;

@info(name='query2')  *--> maintain some number of data....the others will be delete....*
from inStream
delete tmpTable
    on time:timestampInMilliseconds(tmpTable.reg_date, 'yyyy-MM-dd HH:mm:ss') < time:timestampInMilliseconds(time:dateSub(time:currentTimestamp(), 1, 'day', 'yyyy-MM-dd HH:mm:ss'), 'yyyy-MM-dd HH:mm:ss');

@info(name='query3')--> This is kind of analyzing data and push it to output...
from inStream as k1 join tmpTable as k2
select convert(stddev(k2.a), 'string') as a, convert(count(k2.b), 'string') as b, k2.reg_date as c
insert into outStream;

我制定了一个类似上面的解释计划。问题是 tmpTable 可能不会加载太多数据。我认为它应该加载大量数据。 我的服务器有足够的内存。

请帮帮我。

【问题讨论】:

    标签: wso2 siddhi wso2-das memory-table


    【解决方案1】:

    您的服务器可能有很多内存,但您应该在 JVM 级别为 DAS 实例分配更多内存,因为它使用默认内存分配。您可以在 Windows 的 /bin/wso2server.bat 文件或 Linux 的 /bin/wso2server.sh 文件中配置 JVM 参数,方法是在文本编辑器中打开。

    然后增加以下参数

    -Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
    

    【讨论】:

      猜你喜欢
      • 2015-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-03-08
      • 1970-01-01
      • 2021-05-10
      • 1970-01-01
      相关资源
      最近更新 更多