【发布时间】:2015-07-16 19:24:48
【问题描述】:
我正面临一种情况。假设我有 3 个事件 A、B 和 C,我将它们传递给 Riemann。
事件 A 有以下字段
:考试编号 3890
:考试成绩通过
:排名 8
事件 B 具有以下字段
:考试编号 3890
:考试成绩通过
:排名 5
事件 C 具有以下字段
:考试编号 3890
:ExamResult 失败
:排名 0
我需要比较基于 ExamNo 的事件,当 ExamResult 发生变化时,我需要向事件 {:Eligible, :Grade} 添加一个新字段。我编写了代码来比较事件,但新字段没有添加到事件中。
(let [examindex (default :ttl 300 (update-index (index)))]
(streams
prn
examindex))
(streams
(where (service "Result")
(smap
(fn [events]
(by[:ExamNo]
(changed :ExamResult))
(event
{ :Eligible :Eligible-Status
:Grade :GradeValue
}
)))))
因为我是 Riemann 的新手。我无法弄清楚这个问题。
【问题讨论】: