This post was published at 02 Nov 2017


Maven or Apache Maven is a tool to build Java projects.
Maven addresses two aspects of building software: first, it describes how software is built, and second, it describes its dependencies.

  • Install apache-maven:

  • Unzip the file and cp to /opt/ directory.

    sudo cp -r apache-maven-3.5.2/ /opt/
  • Next, modify .profile file:

    export PATH=/opt/apache-maven-3.5.2/bin:$PATH

Apache Flink is an Open Source Stream Processing Framework written in Java and Scala.

  • First, create a directory Apache/Flink.

  • Then, goes to Apache/Flink and download apache-flink:

  • Unzip and start the Flink service:


Running an example

NC means OpenBSD netcat, is a package to make connections.

  • First, set up a listener port:

    nc -l 9000
  • Then, run an example:

    ./flink-1.3.0/bin/flink run flink-1.3.0/examples/streaming/SocketWindowWordCount.jar --port 9000

Create a project

  • Run this script:

    curl >>
  • Then, modify these lines in

    -DgroupId=$PACKAGE					                  \
    -DartifactId=$PACKAGE								          \
    -Dpackage=$PACKAGE					                  \
  • And, run:

    bash exampleFlink

    You can get my bash pressing here

  • Once created, compile and generate .jar files running 1 of these commands on root example dir:

    mvn clean install -Pbuild-jar
    mvn clean package
  • Finally, run this line in the root path of Apache/Flink:

    ./flink-1.3.0/bin/flink run -c exampleFlink.WordCount exampleFlink/target/exampleFlink-0.1.jar

Creating a Complex Event Processing

CEP (Complex Event Processing) is

  • First, add this text on pom.xml