Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
ZHHT-IRN-BD-ANALYSIS
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李凯旋
ZHHT-IRN-BD-ANALYSIS
Commits
1dc7a657
Commit
1dc7a657
authored
Dec 05, 2022
by
余根龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加fast
parent
e15b0bad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
GreenRadioJob.java
...reaming/src/main/java/com/zhht/irn/job/GreenRadioJob.java
+6
-2
No files found.
realtime/hologram-streaming/src/main/java/com/zhht/irn/job/GreenRadioJob.java
View file @
1dc7a657
...
...
@@ -6,9 +6,11 @@ import com.zhht.irn.entity.Stage;
import
com.zhht.irn.sink.GreenRadioSink
;
import
com.zhht.irn.utils.FlinkUtils
;
import
org.apache.flink.api.common.functions.MapFunction
;
import
org.apache.flink.api.java.utils.ParameterTool
;
import
org.apache.flink.streaming.api.datastream.DataStream
;
import
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment
;
import
java.net.URL
;
import
java.util.List
;
/**
...
...
@@ -21,8 +23,10 @@ import java.util.List;
public
class
GreenRadioJob
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
StreamExecutionEnvironment
env
=
StreamExecutionEnvironment
.
getExecutionEnvironment
();
FlinkUtils
.
createKafkaStream
(
args
,
env
)
ParameterTool
kafkaTool
=
ParameterTool
.
fromArgs
(
args
);
String
topic
=
kafkaTool
.
get
(
"kafka.input.topics"
);
System
.
out
.
println
(
"***topic:"
+
topic
);
FlinkUtils
.
createKafkaStream
(
args
,
env
,
topic
,
"GreenRadioJob"
)
.
map
(
record
->
{
// 字符串解析为实体类
Cycle
cycle
=
JSON
.
parseObject
(
record
,
Cycle
.
class
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment