Reputation: 11
I am new to WSO2 DAS. According to the Document, it says that DAS can analyze data fast. 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. I think it should load lots of data. My server has enough memory.
Please help me.
Upvotes: 0
Views: 124
Reputation: 2510
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. 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.
Then increase following parameters
-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m
Upvotes: 0