Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
ctr-estimate
Project
Project
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
赵建伟
ctr-estimate
Commits
014a926b
Commit
014a926b
authored
Apr 04, 2020
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
0b5f4091
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
13 deletions
+16
-13
start_tag.sh
bin/start_tag.sh
+1
-1
CtrEstimateMainTag.java
src/main/java/com/gmei/data/ctr/CtrEstimateMainTag.java
+1
-1
CtrEstimateTagOperator.java
...va/com/gmei/data/ctr/operator/CtrEstimateTagOperator.java
+0
-1
TidbMysqlAsyncSource.java
...n/java/com/gmei/data/ctr/source/TidbMysqlAsyncSource.java
+7
-5
ZhengxingMysqlAsyncSource.java
...a/com/gmei/data/ctr/source/ZhengxingMysqlAsyncSource.java
+7
-5
No files found.
bin/start_tag.sh
View file @
014a926b
...
...
@@ -27,7 +27,7 @@ $JAR_DIR/ctr-estimate-1.0-SNAPSHOT.jar \
--retryInteral
3000
\
--checkpointPath
'hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate-tag/checkpoint'
\
--parallelism
6
\
--startTime
'2020-04-04 17:
00
:00'
\
--startTime
'2020-04-04 17:
42
:00'
\
>>
/data/log/ctr-estimate/ctr-estimate-tag.out 2>&1 &
tail
-f
/data/log/ctr-estimate/ctr-estimate-tag.out
...
...
src/main/java/com/gmei/data/ctr/CtrEstimateMainTag.java
View file @
014a926b
...
...
@@ -32,7 +32,7 @@ public class CtrEstimateMainTag {
Integer
maxRetry
=
parameterTool
.
getInt
(
"maxRetry"
,
3
);
Long
retryInteral
=
parameterTool
.
getLong
(
"retryInteral"
,
3000
);
String
checkpointPath
=
parameterTool
.
get
(
"checkpointPath"
,
"hdfs://bj-gmei-hdfs/user/data/flink/ctr-estimate/checkpoint"
);
Boolean
isStartFromEarliest
=
parameterTool
.
getBoolean
(
"isStartFromEarliest"
,
fals
e
);
Boolean
isStartFromEarliest
=
parameterTool
.
getBoolean
(
"isStartFromEarliest"
,
tru
e
);
Boolean
isStartFromLatest
=
parameterTool
.
getBoolean
(
"isStartFromLatest"
,
false
);
String
startTime
=
parameterTool
.
get
(
"startTime"
);
Integer
parallelism
=
parameterTool
.
getInt
(
"parallelism"
,
2
);
...
...
src/main/java/com/gmei/data/ctr/operator/CtrEstimateTagOperator.java
View file @
014a926b
...
...
@@ -168,7 +168,6 @@ public class CtrEstimateTagOperator implements BaseOperator{
.
uid
(
"zhengxingAsyncDataStream"
)
.
setParallelism
(
parallelism
);
DataStream
<
DeviceCurrentEstimateTagTmp
>
asyncDataStream
=
tidbAsyncDataStream
.
union
(
zhengxingAsyncDataStream
);
//asyncDataStream.print();
asyncDataStream
.
addSink
(
new
CtrEstimateTagMysqlSink
(
outJdbcUrl
,
maxRetry
,
retryInteral
))
...
...
src/main/java/com/gmei/data/ctr/source/TidbMysqlAsyncSource.java
View file @
014a926b
...
...
@@ -89,11 +89,13 @@ public class TidbMysqlAsyncSource extends RichAsyncFunction<CtrEstimateTagEtl, D
}
if
(
StringUtils
.
isNotBlank
(
sql
)){
dcett
=
findTagInfo
(
sql
);
Date
date
=
new
Date
();
dcett
.
setType
(
type
);
dcett
.
setDeviceId
(
ctrEstimateTagEtl
.
getDeviceId
());
dcett
.
setPartitionDate
(
DateUtils
.
getDateStr
(
date
));
dcett
.
setLastUpdateTime
(
DateUtils
.
getTimeStr
(
date
));
if
(
null
!=
dcett
){
Date
date
=
new
Date
();
dcett
.
setType
(
type
);
dcett
.
setDeviceId
(
ctrEstimateTagEtl
.
getDeviceId
());
dcett
.
setPartitionDate
(
DateUtils
.
getDateStr
(
date
));
dcett
.
setLastUpdateTime
(
DateUtils
.
getTimeStr
(
date
));
}
}
}
return
dcett
;
...
...
src/main/java/com/gmei/data/ctr/source/ZhengxingMysqlAsyncSource.java
View file @
014a926b
...
...
@@ -122,11 +122,13 @@ public class ZhengxingMysqlAsyncSource extends RichAsyncFunction<CtrEstimateTagE
}
if
(
StringUtils
.
isNotBlank
(
sql
)){
dcett
=
findTagInfo
(
sql
,
keyWord
);
Date
date
=
new
Date
();
dcett
.
setType
(
type
);
dcett
.
setDeviceId
(
ctrEstimateTagEtl
.
getDeviceId
());
dcett
.
setPartitionDate
(
DateUtils
.
getDateStr
(
date
));
dcett
.
setLastUpdateTime
(
DateUtils
.
getTimeStr
(
date
));
if
(
null
!=
dcett
){
Date
date
=
new
Date
();
dcett
.
setType
(
type
);
dcett
.
setDeviceId
(
ctrEstimateTagEtl
.
getDeviceId
());
dcett
.
setPartitionDate
(
DateUtils
.
getDateStr
(
date
));
dcett
.
setLastUpdateTime
(
DateUtils
.
getTimeStr
(
date
));
}
}
return
dcett
;
}
...
...
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