0

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

请帮我。

4

1 回答 1

0

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

然后增加以下参数

-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
于 2016-09-13T08:01:19.633 回答