apache-flink - Apache Zeppelin Flink Interpretor 无法连接 Flink 1.5.2
问题描述
我试图从 zeppelin 连接 Flink 1.5.2。
Flink 集群在本地主机上启动。flink-conf.yaml 是默认的。
/opt/flink1.5.2/current/bin/start-cluster.sh
在此处输入图像描述
zeppelin git pull 和 buid。
git clone https://github.com/apache/zeppelin.git
cd zeppelin
mvn clean package -DskipTests -Dflink.version=1.5.2 -Pscala-2.11
bin/zeppelin-daemon start
解释器设置这里 输入图像描述
提交示例 flink notebook
%flink // let Zeppelin know what interpreter to use.
val text = benv.fromElements("In the time of chimpanzees, I was a monkey", // some lines of text to analyze
"Butane in my veins and I'm out to cut the junkie",
"With the plastic eyeballs, spray paint the vegetables",
"Dog food stalls with the beefcake pantyhose",
"Kill the headlights and put it in neutral",
"Stock car flamin' with a loser in the cruise control",
"Baby's in Reno with the Vitamin D",
"Got a couple of couches, sleep on the love seat",
"Someone came in sayin' I'm insane to complain",
"About a shotgun wedding and a stain on my shirt",
"Don't believe everything that you breathe",
"You get a parking violation and a maggot on your sleeve",
"So shave your face with some mace in the dark",
"Savin' all your food stamps and burnin' down the trailer park",
"Yo, cut it")
/* The meat and potatoes:
this tells Flink to iterate through the elements, in this case strings,
transform the string to lower case and split the string at white space into individual words
then finally aggregate the occurrence of each word.
This creates the count variable which is a list of tuples of the form (word, occurances)
counts.collect().foreach(println(_)) // execute the script and print each element in the counts list
*/
val counts = text.flatMap{ _.toLowerCase.split("\\W+") }.map { (_,1) }.groupBy(0).sum(1)
counts.collect().foreach(println(_)) // execute the script and print each element in the counts list
错误
ERROR [2018-09-11 19:21:18,004] ({pool-2-thread-2} Job.java[run]:174) - Job failed
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:125)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:485)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1081)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:502)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:487)
at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:904)
at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel.bind(AbstractChannel.java:198)
at org.apache.flink.shaded.netty4.io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:348)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:748)
INFO [2018-09-11 19:21:18,034] ({pool-2-thread-2} SchedulerFactory.java[jobFinished]:115) - Job paragraph_1536657575367_1976000602 finished by scheduler interpreter_1496279000
为什么地址已经在使用?
我不想在 zeppelin 中使用 Flink 运行这项工作。
我想使用已经存在的 Flink 运行作业。
解决方案
推荐阅读
- influxdb - 带有自定义窗口聚合函数的 Influxdb Flux 查询
- django - 是否可以在 WSL Ubuntu 系统中为我的 Django 应用程序使用 gunicorn?
- jquery - Google Drive & gapi:最近的更改,没有错误,没有返回文件
- mysql - 春季应用程序运行失败
- r - “function %>% not found” - dplyr-package 已加载
- django - vuejs + django 密码重置电子邮件并重定向到 vue 前端
- ssrs-2012 - SSRS 报告 - 在新选项卡中打开超链接
- java - 无法使用 httpconnectionurl 和 outstreamwriter 拨打电话
- xml - 是否可以使用 xpath1.0 检索匹配特定条件的属性名称?
- excel - 运行时错误“1004”:对象“_Worksheet”的方法“名称”失败