繁体   English   中英

WSO2 DAS-使用Siddhi可以将多少DAS保留在内存中?

[英]WSO2 DAS-How much DAS can keep data in memory using Siddhi?

我是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可能不会加载太多数据。 我认为它应该加载大量数据。 我的服务器有足够的内存。

请帮我。

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

然后增加以下参数

-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM