- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Flink-CEP中检测模式的代码如下所示
// Generate temperature warnings for each matched warning pattern
DataStream<TemperatureEvent> warnings = tempPatternStream.select(
(Map<String, MonitoringEvent> pattern) -> {
TemperatureEvent first = (TemperatureEvent) pattern.get("first");
return new TemperatureEvent(first.getRackID(), first.getTemperature()) ;
}
);
如果在 Mac 中使用 command + F9 构建,会显示以下错误
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The generic type parameters of 'Map' are missing.
It seems that your compiler has not stored them into the .class file.
Currently, only the Eclipse JDT compiler preserves the type information necessary to use the lambdas feature type-safely.
See the documentation for more information about how to compile jobs containing lambda expressions.
at org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameter(TypeExtractor.java:1316)
at org.apache.flink.api.java.typeutils.TypeExtractor.validateLambdaGenericParameters(TypeExtractor.java:1302)
at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:346)
at org.apache.flink.cep.PatternStream.select(PatternStream.java:64)
at org.stsffap.cep.monitoring.CEPMonitoring.main(CEPMonitoring.java:85
但是构建使用 mvn clean install
然后通过 Control + R 运行显示输出,
我想知道为什么这种情况一直发生?
有没有办法做到这一点?
PS:但是我使用的是 eclipse JDT 插件,即便如此,它仍会在日志中显示错误。 POM.XML 的内容是
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerId>jdt</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.21.0</version>
</dependency>
</dependencies>
</plugin>
非常欢迎提出建议。提前致谢
最佳答案
我知道 Java 8 Lambda 非常方便。然而,它们几乎不通过反射提供类型信息,这就是为什么 Flink 在生成底层序列化程序时存在问题。为了在 IDE 中也能运行您的 Flink 程序,只要涉及泛型类型,我建议使用 Java 匿名类而不是 lambda。
关于maven - Flink-CEP 中缺少 'Map' 的泛型类型参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45663700/
我们在 CEP 上看到内存不足错误。线程转储显示大约有 32000 个线程在监视器上休眠。此外,即使 CEP JVM 选项指定在内存不足时生成 HeapDump,我们也没有看到生成任何堆转储。请指教。
有没有办法检测和报告流中的重复项? 例子:包含用户名和 IP 地址的元组的用户登录数据流。目标是检测同一用户在最近 10 秒内从不同 IP 登录。 我看过 siddhi (wso2) 和 esper
我们目前正在测试 siddhi wso2 cep。 我们需要能够在不丢失窗口(例如时间窗口)中积累的数据的情况下重新启动 wso2 服务器进程。 有没有办法使时间窗口持久化,以便服务器可以在不丢失其状
我正在寻找 CEP 引擎,但我不知道是否有任何引擎满足我的要求。我的系统必须处理多个事件数据流并生成复杂的事件,这正是几乎任何 CEP 引擎都完美适合的(ESPER、Drools)。 我将所有原始事件
我想了解有关如何构建基于 CEP 的应用程序的更多信息。所以我环顾四周,发现了几种产品(概述可以在这里找到: http://rulecore.com/CEPblog/?page_id=47 )。 但是
我想改进我的产品,我想为其编写一个复杂的分析器界面。我使用elasticsearch来存储日志,每天存储超过5000万条日志。因此,重要的是可以在上述接口(interface)上创建不同的查询,这将显
我有一些关于 Oracle CEP 的问题。如果有人能解答一下就好了。 序列和关系之间有什么区别? 每个查询的执行频率是多少? 什么情况下我们必须将关系转换为序列? 连接语句如何工作?它仅适用于关系吗
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界. 这篇CFSDN的博客文章Drools Fusion(CEP)定义及使用方法讲解由作者收集整理,如
我正在关注 sample当我尝试调用 ./wso2cep-samples.sh -sn 0504 时出现如下异常终端中的命令。我该怎么做才能启动并运行 mu 应用程序? ERROR {org.wso2
Ciao,我已经测试了几种方法,但我仍然无法在Drools Fusion中测试和验证事件过期机制,所以我正在寻找一些指导,好吗? 我已经阅读了手册,我对这个功能很感兴趣: In other words
Flink CEP 如何管理间歇状态?它在哪里存储它们?它只是在内存中还是有支持状态的快速持久存储? 文档在任何地方都没有提到这一点。 最佳答案 像 Flink 中的所有有状态操作(例如,窗口、聚合、
Actor 模型框架(例如 Orleans )和复杂事件处理 (CEP)(例如 Apache Storm )之间有什么区别? 其中每种方法都适用(或者一种方法比另一种方法更适用)的使用示例肯定会有所帮
我是 Siddhi 新手,有几个问题: SiddhiManager 线程安全吗?每个 JVM 共享一个实例是一种好的做法吗? 如何在运行时定义流并添加查询?似乎只有 siddhiManager.cre
当我使用 Flink CEP 代码来处理时间时(默认配置),我能够获得所需的模式匹配,但在将环境配置为事件时间时,我无法获得任何模式匹配。 def main(args: Array[String])
下午好。 我作为一名架构师将 SW Competence Centers 写入公司 Indra (www.indra.com)。 在这个领域通常使用 CEP,开源和商业,在开源领域直到现在我们一直使用
我正在使用 wso2cep 4.1.0 并创建了具有以下包名的自定义函数扩展类: package org.wso2.siddhi.extension.custom; ..... public clas
我想检测共享相同属性的事件。假设我有一个简单的案例类: case class Record(name: String, value: Int) 假设有以下流: Record("A", 1) Recor
我有以下用例。 有一台机器正在向 Kafka 发送事件流,CEP 引擎 接收这些事件流,当流数据满足条件时会生成警告。 FlinkKafkaConsumer011 kafkaSource = new
我正在开发一个接受 100k+ 唯一输入的应用程序——为简单起见,我们假设每个输入都是一个浮点值(a、b、c 等)——尽管它们也可以是字符串等。该应用程序有许多与这些输入相关的规则/事件/触发器。 示
除Nesper 外,是否有任何 CEP 引擎/平台可以与 .Net 友好地工作(即,它具有 .Net API)?和 Microsoft StreamInsight ? 最佳答案 Just have a
我是一名优秀的程序员,十分优秀!