Giter Club home page Giter Club logo

Comments (6)

alpinegizmo avatar alpinegizmo commented on August 19, 2024

The quickstart was recently changed, which had an effect here. I got this working by selecting the add-dependencies-for-IDEA maven profile.

from flink-training-web.

SyCode7 avatar SyCode7 commented on August 19, 2024

@alpinegizmo thanks for the heads up. The challenge is that I am using eclipse, I am not sure if there is such a feature on eclipse ....are you aware of any ?

from flink-training-web.

alpinegizmo avatar alpinegizmo commented on August 19, 2024

Yes, I did this with Eclipse. I added this section to <build> <plugins> in my pom file:

	<plugin>
	   <groupId>org.codehaus.mojo</groupId>
	   <artifactId>exec-maven-plugin</artifactId>
	   <version>1.6.0</version>
	   <executions>
	     <execution>
	       <goals>
	        <goal>java</goal>
	       </goals>
	    </execution>
	   </executions>
	   <configuration>
	      <mainClass>org.apache.flink.flink_quickstart_java.BatchJob</mainClass>
	   </configuration>
	</plugin>

and then created a Maven Build run configuration with

Goals: org.codehaus.mojo:exec-maven-plugin:java
Profiles: add-dependencies-for-IDEA

from flink-training-web.

SyCode7 avatar SyCode7 commented on August 19, 2024

@alpinegizmo i have tried on eclipse, I have the following error :

[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ flink-java-project --- [WARNING] java.lang.RuntimeException: No data sinks have been created yet. A program needs at least one sink that consumes data. Examples are writing the data set or printing it. at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:943) at org.apache.flink.api.java.ExecutionEnvironment.createProgramPlan(ExecutionEnvironment.java:921) at org.apache.flink.api.java.LocalEnvironment.execute(LocalEnvironment.java:85) at org.apache.flink.quickstart.BatchJob.main(BatchJob.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282) at java.lang.Thread.run(Thread.java:745) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE

from flink-training-web.

alpinegizmo avatar alpinegizmo commented on August 19, 2024

Yes, the skeleton batch job isn't complete. You could modify it to be like this, and it will work:

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

	env.fromElements(1, 2, 3).print();
    }
}

If instead you want to try streaming, do this:

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

	env.fromElements(1, 2, 3).print();
	env.execute();
    }
}

from flink-training-web.

SyCode7 avatar SyCode7 commented on August 19, 2024

@alpinegizmo many thanks. your solution works ! I realized that I have to ignore the errors shown in eclipse .....very strange.

from flink-training-web.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.