Zepplin是一個頗有意思的筆記本,支持衆多interpreter,包括Flink。在網上找了不少資料,發現直接使用二進制包,或者從源碼編譯,均沒法向Flink 1.7.1提交做業。0.81和0.9.0-SNAPHOST都試過。跟同事諮詢了一下,找到一個Zeppelin+Blink的鏡像,體驗特別好。html
$ docker run -d -p 8085:8085 -p 8091:8091 zjffdu/zeppelin-blink:latest <java:1.8> Unable to find image 'zjffdu/zeppelin-blink:latest' locally latest: Pulling from zjffdu/zeppelin-blink 7b722c1070cd: Already exists 5fbf74db61f1: Already exists ed41cb72e5c9: Already exists 7ea47a67709e: Already exists a3e223183687: Downloading [=========> ] 26.18MB/131.6MB a3e223183687: Downloading [===========> ] 30.42MB/131.6MB a3e223183687: Downloading [===========> ] 30.95MB/131.6MB a3e223183687: Pull complete c5d0ab79487e: Pull complete 6f8bf201347f: Pull complete 87b8ed2447d8: Pull complete d936882fbddf: Retrying in 1 second a10468c16960: Download complete d936882fbddf: Pull complete a10468c16960: Pull complete c4e684b5d1fd: Pull complete c4f07b559f6c: Pull complete 8d4b18067b2f: Pull complete a2a59686ecc4: Pull complete c1f2871b7ec0: Pull complete Digest: sha256:b33cf27bf48a1ca5f268bcb3f4ad82558270c721a2a11655a55779bff3e4c6fb Status: Downloaded newer image for zjffdu/zeppelin-blink:latest 036598ac615eb9df58ab0a7ed43c43c85f2c94ecc9835ca38f1cb92b71a7b9dc
進入Zeppelin控制檯:http://localhost:8085,選擇Flink Stream Tutorial
。先運行Configure Flink Interpreter
,初始化好Flink Interpreter。java
接着運行Register a Stream DataSource to simulate web log
,此時Blink集羣會啓動。Blink控制檯:http://localhost:8091/#/overview。web
有日誌以後就能夠運行後面的Stream SQL了。能夠看到動態更新的圖表。docker
Zeppelin目前並不支持SQL。若是支持SQL的話,加上Scala,是一個很是好的練手工具。數據庫
【Zeppelin目前並不支持SQL】表達並不許確。並非Zeppelin不支持SQL,Zeppeli鏈接hive和關係型數據庫的解釋器是能夠直接使用SQL的。是Flink對SQL支持只提供了cli端,沒有提供JDBC和ODBC的SDL支持,因此Zeppelin沒法直接是用標準SQL查詢Flink,關於Flink的JDBC和ODBC 支持社區有相關的談論,已經在規劃中了。apache
參考資料bash