at .(StreamExecutionEnvironment.java:2000) at .(StreamExecutionEnvironment.java:1991) at .(StreamExecutionEnvironment.java:1976) at .(StreamExecutionEnvironment.java:1822) at (StreamingJob. To solve it, go to Run -> Edit Configuration -> Modify options -> Use classpath of module and in the new field, mark Include dependencies with "Provided" scope.Įxception in thread "main" : No operators defined in streaming topology. This is a particular problem of Flink running in the IDE: some dependencies are missing. An error like this should appear in the output:Įxception in thread "main" : org/apache/flink/streaming/api/environment/StreamExecutionEnvironment at (StreamingJob.java:39) Caused by: . at (URLClassLoader.java:382) at (ClassLoader.java:418) at $AppClassLoader.loadClass(Launcher.java:352) at (ClassLoader.java:351). Async profiler a very accurate profiler that can also collect native call and memory allocation data. You can go to StreamingJob.java and execute it as a normal Java application using the Shift+F10 shortcut on Linux/Windows. IntelliJ IDEA provides integration with the following profilers: Java Flight Recorder a standard profiling tool shipped as part of the JDK.
#Intellij profiler install#
Installation: download the plugin (.zip, 68.1KB), unzip it and add as a local update site, then install the VisualVM Launcher Feature. The plugin enables starting VisualVM along with the executed application and automatically opens the application tab. You can do it easily from the command-line. Use the Eclipse Launcher to integrate VisualVM with the Eclipse IDE. First of all, import in the IDE as a maven project. We are going only to cover my favourite Java IDE: IntelliJ IDEA. We are going to focus only on StreamingJob.java. ├── pom.xml └── src └── main ├── java │ └── galiglobal │ └── flink │ ├── BatchJob.java │ └── StreamingJob.java └── resources └── log4j2.properties The structure of the project is quite simple: DarchetypeArtifactId=flink-quickstart-java To bootstrap the project, just execute the following Maven command: Sh $FLINK_HOME/bin/stop-cluster.sh Bootstrap a Flink job We aren't going to need it initially so it's better to stop it: You can access the Flink Web Dashboard in your browser. Note: it's a good idea to create a variable $FLINK_HOME pointing to the Flink folder. This is straightforward, just go to the Flink download page and download it:
#Intellij profiler code#
The source code is available in this GitHub repository. If you are already an experienced Flink developer, there are some tricks you may find useful: access to JMX metrics, profiling, etc. If Flink is something new for you, it's an easy guide to follow. In this article, I summarize some of the notes I've been writing since I started with Flink.
#Intellij profiler how to#
Even if there is a good Getting Started or a great (and free) Hands-on Training, there are always questions about how to start, how to debug problems or how to launch the project in your IDE. As any of those framework, start to work with it can be a challenge. Flink setup for development (and some IntelliJ Idea cool tricks)Īpache Flink is an open-source, unified stream-processing and batch-processing framework.