栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

Flink 侧输出报错:Could not determine TypeInformation for the OutputTag type.

Flink 侧输出报错:Could not determine TypeInformation for the OutputTag type.

一、问题描述

flink侧输出报错 The program finished with the following exception

 The program finished with the following exception:

Could not determine TypeInformation for the OutputTag type. The most common reas                                                                                                                   on is forgetting to make the OutputTag an anonymous inner class. It is also not                                                                                                                    possible to use generic type variables with OutputTags, such as 'Tuple2'.
        org.apache.flink.util.OutputTag.(OutputTag.java:68)

二、问题原因

因为代码中new OutputTag(“test”)后面少写了大括号{}

private static OutputTag outputTag = new OutputTag("test");

对于scala是可以少些的,但是java不能少些,这个使用java编写的时候需要注意。

三、解决办法

最后加一个大括号 “{}”

private static OutputTag outputTag = new OutputTag("test"){};
四、参考文章

1.https://blog.csdn.net/YongDaiMe/article/details/108593102

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/467240.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号