简体   繁体   English

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

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

I am new to WSO2 DAS. 我是WSO2 DAS的新手。 According to the Document, it says that DAS can analyze data fast. 根据该文件,它说DAS可以快速分析数据。 I am trying to make example. 我正在努力树立榜样。 My scenario is like below. 我的情况如下。


@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;

I make an explain plan like above. 我像上面一样制定了一个解释计划。 The problem is that tmpTable might not load much data. 问题在于tmpTable可能不会加载太多数据。 I think it should load lots of data. 我认为它应该加载大量数据。 My server has enough memory. 我的服务器有足够的内存。

Please help me. 请帮我。

Your server may have alot of memory but you should allocate more memory in JVM level for DAS instance as it use default memory allocations. 您的服务器可能有很多内存,但是您应该在JVM级别为DAS实例分配更多的内存,因为它使用默认的内存分配。 You can configure the JVM parameters in the /bin/wso2server.bat file on Windows or the /bin/wso2server.sh file Linux by opening in a text editor. 您可以通过在文本编辑器中打开,在Windows上的/bin/wso2server.bat文件或Linux /bin/wso2server.sh文件中配置JVM参数。

Then increase following parameters 然后增加以下参数

-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m

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

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