2016-09-27 6 views
1

以下の実行プランを使用して、ヘイゼルキャストバックイベントテーブルを作成しています。 問題は、この既存のヘイルキャストバックイベントテーブルを別の実行計画から再利用するにはどうすればいいですか?ヘーゼルキャストのイベントテーブル

もう1つはsimilar questionです。

@Import('users:1.0.0') 
define stream users (meta_name string, correlation_id int); 

@from(eventtable = 'hazelcast', cluster.name = 'cluster_a', cluster.password = '[email protected]_a') 
define table UserTable (name string, id int) ; 

from users 
select meta_name as name, correlation_id as id 
insert OVERWRITE UserTable 
    on UserTable.id == id; 
+0

あなたはCEP 4.2.0を使用していますか? – Grainier

+0

はい、私は4.2.0を使用しています。 – Obaid

答えて

2

同じcollection.nameを両方の実行計画で使用できます。 cluster.namecluster.passwordを使用する必要はありません。以下の例を参照してください。

実行計画1

@Plan:name('TestIn') 

@Import('dataIn:1.0.0') 
define stream dataIn (id int, name string); 

@from(eventtable = 'hazelcast', collection.name='hzTable') 
define table hzTable (id int, name string); 

from dataIn 
insert into hzTable; 

実行計画2

@Plan:name('TestOut') 

@Export('dataOut:1.0.0') 
define stream dataOut (id int, name string); 

@from(eventtable = 'hazelcast', collection.name='hzTable') 
define table hzTable (id int, name string); 

define trigger periodicTrigger at every 2 sec; 

from periodicTrigger join hzTable 
select hzTable.id as id, hzTable.name as name 
insert into dataOut; 
+0

こんにちはグラニエ、それはここで提案方法を正確に働いています。 – Obaid

+0

WSO2 CEP 4.2.0の作業 – JoaoFilipeClementeMartins

関連する問題