我是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可能无法加载太多数据。我认为它应该加载大量数据。 我的服务器有足够的内存。
请帮帮我。
答案 0 :(得分:0)
您的服务器可能有很多内存,但您应该在JVM级别为DAS实例分配更多内存,因为它使用默认内存分配。您可以在Windows上的/bin/wso2server.bat文件或/bin/wso2server.sh文件Linux中通过在文本编辑器中打开来配置JVM参数。
然后增加以下参数
-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m