报错:
Could not determine TypeInformation for the OutputTag type. The most common reason 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<A, B>’.
原因:
找不到OutputTag 的类型,原因是由于泛型擦除导致的
我们可以通过匿名内部类的方式解决这个问题.
解决方法:
只需要在原先的代码后面加大括号即可:
如下: