[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cannot find TwoInputStreamOperatorTestHarness after upgrade to Flink 1.6.0

Thank you for your help, vino.

I've resolved it, the issue was on my side, I forgot to include flink-streaming-java_2.11 with a type test-jar like the following: 



Once I included it, the issue got resolved.

Thank you,

On Sat, Aug 11, 2018 at 11:08 PM vino yang <yanghua1127@xxxxxxxxx> wrote:
Hi Dmitry,

I confirmed that this class is included in the source code of Flink-1.6 [1].

I just downloaded the source code of Flink-1.6 [2], and then run mvn package -DskipTests directly in the flink-streaming-java directory. 
The package is successful and decompiled to see that this class exists. 
Please confirm again.

Thanks, vino.

Dmitry Minaev <minaevd@xxxxxxxxx> 于2018年8月12日周日 下午1:16写道:
Hi everyone,

I'm working to upgrade my environment to Flink v.1.6.0 and I'm facing an issue. We're using TwoInputStreamOperatorTestHarness in our tests and after upgrade to 1.6.0 my project compilation fails with "cannot find symbol TwoInputStreamOperatorTestHarness".

I've reproduced the problem on a clean environment with a template project created from maven archetype. If you include additional dependency of TwoInputStreamOperatorTestHarness it's not able to find it. Here is the sample program:
package com.five9.streaming;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.util.TwoInputStreamOperatorTestHarness;

public class StreamingJob {
        public static void main(String[] args) throws Exception {
                final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

Maven `mvn clean package` fails with:

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/home/dminaev/projects/belka/src/main/java/com/five9/streaming/StreamingJob.java:[22,39] cannot find symbol
  symbol:   class TwoInputStreamOperatorTestHarness
  location: package org.apache.flink.streaming.util

I looked up in the ".m2" local cache and found out that v.1.4.0 contains "flink-streaming-java_2.11-1.4.0-tests.jar" which has TwoInputStreamOperatorTestHarness.class, however, there is no "flink-streaming-java_2.11-1.6.0-tests.jar" included in v.1.6.0

Am I missing something and this class is deprecated or moved somewhere? I cannot find any reference to that.
Please let me know if you have any ideas on how to fix the issue?

Kind regards,