0
我有查詢和執行計劃,我想利用該快照這樣我就可以在接收端恢復並重新開始執行它。瞭解神功快照概念
- 什麼格式應該發送到接收器?
- 如何在接收端恢復?
以下是一些代碼,我從西提倉庫取。
SiddhiManager siddhiManager = new SiddhiManager();
String query =
"define stream inStream(meta_roomNumber int,meta_temperature double);" +
"from inStream#window(10)[meta_temperature > 50]\n" +
"select *" +
"insert into outStream;";
ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(query);
executionPlanRuntime.start();
SiddhiContext siddhicontext = new SiddhiContext();
context.setSiddhiContext(siddhicontext);
context.setSnapshotService(new SnapshotService(context));
executionPlanRuntime.snapshot();
上面提到的方式在本地機器上正常工作。我有過,我現在用的插座做網絡發送快照並使其在分佈式環境中工作。 –