2016-09-11 15 views
0

私はWSO2 DASを初めて使用しています。この文書によると、DASはデータをすばやく分析できると言います。私は例を挙げようとしています。私のシナリオは以下の通りです。WSO2 DAS - Siddhiを使用してどのくらいの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

サーバーには大量のメモリがあるかもしれませんが、DASインスタンスのデフォルトメモリ割り当てを使用するため、JVMレベルでさらに多くのメモリを割り当てる必要があります。 Windowsの場合は/bin/wso2server.batファイル、Linuxの場合は/bin/wso2server.shファイルのJVMパラメータをテキストエディタで開きます。

そして、次のパラメータ

-Xms2048m -Xmx2048m -XX:MaxPermSize=1024m 
を高めます