当前位置:网站首页>Flink practice tutorial: getting started 1- zero basic users realize simple Flink tasks
Flink practice tutorial: getting started 1- zero basic users realize simple Flink tasks
2022-06-24 02:22:00 【Wuyuntao】
Oceanus brief introduction
Flow calculation Oceanus It is a powerful tool for real-time analysis of big data product ecosystem , Is based on Apache Flink Built with one-stop development 、 Seamless connection 、 Sub second delay 、 Low cost 、 Enterprise class real-time big data analysis platform with the characteristics of security and stability .Oceanus Provides a convenient console environment , It is convenient for users to write SQL Analysis statement 、ETL Job or upload and run custom JAR package , Support operation and maintenance management .
This article will show you how to use datagen and blackhole Connector randomly generates and stores data , To achieve one of the simplest Flink Mission .
One 、 Lead to
establish Oceanus colony
Activity purchase link 1 Yuan purchase Oceanus colony .
Get into Oceanus Console , Click on the left side of the 【 Cluster management 】, Click on the top left 【 Create clusters 】, For details, please refer to Oceanus Official documents Create an exclusive cluster .
Two 、 establish Oceanus Homework
1. establish Source
- See https://ci.apache.org/projects/flink/flink-docs-release-1.13/zh/dev/table/connectors/datagen.html CREATE TABLE random_source ( user_id INT, item_id INT, behavior VARCHAR ) WITH ( 'connector' = 'datagen', 'rows-per-second' = '1', -- The number of data generated per second 'fields.user_id.kind' = 'sequence', -- Bounded sequence ( Automatically stop the output when finished ) 'fields.user_id.start' = '1', -- The starting value of the sequence 'fields.user_id.end' = '10000', -- The end value of the sequence 'fields.item_id.kind' = 'random', -- Unbounded random number 'fields.item_id.min' = '1', -- The minimum of a random number 'fields.item_id.max' = '1000', -- The maximum of random numbers 'fields.behavior.length' = '5' -- The length of the random string );
2. establish Sink
-- See https://ci.apache.org/projects/flink/flink-docs-release-1.13/zh/docs/connectors/table/blackhole/
CREATE TABLE blackhole_sink (
user_id INT,
item_id INT,
behavior VARCHAR
) WITH ('connector' = 'blackhole');3. Writing business SQL
INSERT INTO blackhole_sink
(
SELECT user_id,
item_id,
behavior
FROM random_source
);4. Release operation
Click on the toolbar 【 Syntax check 】 Conduct SQL Syntax check , Click... After checking 【 preservation 】>【 Release the draft 】 Run job .
3、 ... and 、 summary
Datagen ConnectorConnector is a tool for generating random data Connector, Generally used as a test .- Sink To
BlackholeThe data will be discarded , The user cannot query the data , This connector is generally used for performance testing .
Reference reading
[1] data gen connector Reference link :https://ci.apache.org/projects/flink/flink-docs-release-1.13/zh/docs/connectors/table/datagen/
[2] blackhole connecotr Reference link :https://ci.apache.org/projects/flink/flink-docs-release-1.13/zh/docs/connectors/table/blackhole/
边栏推荐
- What is vxlan? What are its advantages?
- Benchmarking Shopify? Similarities and differences between "two giants" of Chinese e-commerce SAAS and Weimeng
- If there are enumerations in the entity object, the conversion of enumerations can be carried out with @jsonvalue and @enumvalue annotations
- Kubesphere upgrade & enable plug-ins after installation
- Advanced BOM tool intelligent packaging function
- [expense center] demand & problem feedback week is coming! Feedback wins a good gift!
- How to protect your code - ollvm (1)
- Learning and life -- Talking about my learning methods
- What is ITF barcode
- Wechat open platform: OpenAPI, cloud development and basic management capability upgrade
猜你喜欢

If there are enumerations in the entity object, the conversion of enumerations can be carried out with @jsonvalue and @enumvalue annotations

application. Yaml configuring multiple running environments

2020 language and intelligent technology competition was launched, and Baidu provided the largest Chinese data set

layer 3 switch

BIM model example

Advanced BOM tool intelligent packaging function

How to fill in and register e-mail, and open mass mailing software for free

Introduction to development model + test model

Leetcode969: pancake sorting (medium, dynamic programming)
Cloudpods golang practice
随机推荐
The new purchased machines with large customized images are slow to enter the system
How to build a cloud game server what needs to be considered to build a cloud game server
5g Gigabit router dual band industrial grade
Development status of industrial Internet
How to protect your code - ollvm (1)
Super parameter tuning of neural network using keras tuner
How about Shenzhen website construction? Is it expensive?
Where is the domain name filed? What materials are required for domain name filing?
[new features] Tencent cloud lightweight ECS will soon support attaching data disks!!!
How to handle the abnormal state of easycvr national standard cascading superior display?
Operation and maintenance platform tcapulusdb transaction management
What is the domain name trademark? What are the registration conditions for domain names and trademarks?
How to formulate a domain name trademark registration scheme? What if the plan is rejected?
Gin framework: add API logging Middleware
The dealer management and control platform in the leather industry simplifies the purchase approval process and easily controls agents
Set multiple print for batch generated barcodes
What are the general contents of the enterprise website construction scheme
Introduction to development model + test model
Looking at the future development direction of industrial Internet from the transformation of circulation links of large building materials
How does Tencent cloud server build the official version of remote desktop computer to realize remote