Last active
July 18, 2016 03:59
-
-
Save ganeshchand/54b909ee4af8865a0c4d320b57b97d08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Instructions for Mac OS - Scala 2.11 and flink 1.0.3 version | |
Step1: Download | |
Download Apache Flink from - http://www.apache.org/dyn/closer.lua/flink/flink-1.0.3/flink-1.0.3-bin-hadoop27-scala_2.11.tgz | |
Step 2: Install & setup | |
$ cp ~/Downloads -p ~/bin/flinks/ | |
$ cd ~/bin/flinks | |
$ tar -xvf flink-1.0.3-bin-hadoop27-scala_2.11.tar | |
vi ~/.bash_profile | |
export FLINK_HOME="/Users/username/bin/flinks/flink-1.0.3" | |
export PATH=$PATH:$FLINK_HOME/bin | |
source ~/.bash_profile | |
$ cd ~/bin/flinks/flink-1.0.3 | |
$ bin/start-local.sh | |
Starting jobmanager daemon on host Ganesh-Chands-iMac.local. | |
Step3: Start Flink | |
Once you have started the cluster, you will be able to see a new daemon JobManager running. | |
Command: jps | |
$jps | |
83216 NailgunRunner | |
83360 Launcher | |
83465 SparkSubmit | |
84073 Jps | |
81656 MainGenericRunner | |
83178 | |
83309 sbt-launch.jar | |
84060 JobManager | |
Open the browser and go to http://localhost:8081 to see Apache Flink web UI. | |
Step4: Sample Wordcount example | |
Open a new terminal and run nc command | |
$ nc -lk 9000 | |
$ bin/flink run examples/streaming/SocketTextStreamWordCount.jar --hostname localhost --port 9000 | |
Open another terminal | |
$ cd ~/bin/flinks/flink-1.0.3 | |
$tail -f log/flink-*-jobmanager-*.out | |
(this,1) | |
(is,1) | |
(a,1) | |
(first,1) | |
(streaming,1) | |
(app,1) | |
You can also go to UI to look at the output: http://localhost:8081/#/jobmanager/stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment