flink.demo | flink读取kafka并处理的demo程序 | Runtime Evironment library
kandi X-RAY | flink.demo Summary
kandi X-RAY | flink.demo Summary
3、解压 tar zxvf flink-1.0.0-bin-hadoop27-scala_2.11.tgz. 4、运行本地版本 lemonhall@halldemacbook-pro:~/downloads/flink-1.0.0$ bin/start-local.sh starting jobmanager daemon on host halldemacbook-pro.local. lemonhall@halldemacbook-pro:~/downloads/flink-1.0.0$. 6、nc打开一个输入 first of all, we use netcat to start local server via. $ nc -l 9000. 7、启动一个job bin/flink run examples/streaming/sockettextstreamwordcount.jar \ --hostname localhost \ --port 9000. 9、看日志输出 tail -f log/flink--jobmanager-.out. 1、生成一个空工程: 注意,官方教程上写得archetypeversion=1.0.0,有问题: 去官方的:一看,你会发现,只有1.0.0的,没有所谓的-darchetypeversion=1.1-snapshot 估计还得改mvn的setting才能让那个架构的通过,所以暂时还是用稳定版的1.0.0的吧;. mvn archetype:generate \ -darchetypegroupid=org.apache.flink \ -darchetypeartifactid=flink-quickstart-java \ -darchetypeversion=1.0.0. define value for property 'groupid': : com.lsl.lemonhall define value for property 'artifactid': : flink.demo define value for property 'version': 1.0-snapshot: : define value for property 'package': com.lsl.lemonhall: : confirm properties configuration: groupid: com.lsl.lemonhall artifactid: flink.demo version: 1.0-snapshot package: com.lsl.lemonhall y: : [info] ---------------------------------------------------------------------------- [info] using following parameters for creating project from archetype: flink-quickstart-java:1.0.0 [info] ---------------------------------------------------------------------------- [info] parameter: groupid, value: com.lsl.lemonhall [info] parameter: artifactid, value: flink.demo [info] parameter: version, value: 1.0-snapshot [info] parameter: package, value: com.lsl.lemonhall [info] parameter: packageinpathformat, value: com/lsl/lemonhall [info] parameter: package, value: com.lsl.lemonhall [info] parameter: version, value: 1.0-snapshot [info] parameter: groupid, value: com.lsl.lemonhall [info] parameter: artifactid, value: flink.demo [warning] cp don’t override file /users/lemonhall/downloads/flink.demo/src/main/resources [info] project created from archetype in dir: /users/lemonhall/downloads/flink.demo [info] ------------------------------------------------------------------------. 3、导入kafka的支持 官方文档: 仓库地址: 实际地址: 加入到pom org.apache.flink flink-connector-kafka-0.8_2.10 1.0.0 . 5、解压kafka tar zxvf kafka_2.10-0.8.2.1.tgz. 6.1 启动一个zk bin/zookeeper-server-start.sh config/zookeeper.properties. 6.2 启动server bin/kafka-server-start.sh config/server.properties. 6.3 创建一个topic
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Example of reading from socket text stream
- Runs the example
- Run the example program
- Launch the Flink application
flink.demo Key Features
flink.demo Examples and Code Snippets
Community Discussions
Trending Discussions on flink.demo
QUESTION
I am following the documentation to configure a TableSource with a rowtime attribute.
I register the timestamp
field as follows
ANSWER
Answered 2017-Dec-22 at 21:52The field in your table kafka
is called timestamp
and not rowtime
. So you should use call the attribute by its name timestamp
instead of rowtime
.
Note that TIMESTAMP
is a keyword in SQL, so you should either rename the timestamp
attribute or escape the attribute name with backticks (`):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flink.demo
You can use flink.demo like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the flink.demo component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page