Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mobvista-dmp
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
王金锋
mobvista-dmp
Commits
c89c29dc
Commit
c89c29dc
authored
Jul 26, 2021
by
WangJinfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rtdmp
parent
19af5d6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
RTDmpMain.scala
src/main/scala/mobvista/dmp/datasource/rtdmp/RTDmpMain.scala
+4
-2
No files found.
src/main/scala/mobvista/dmp/datasource/rtdmp/RTDmpMain.scala
View file @
c89c29dc
...
...
@@ -90,9 +90,9 @@ class RTDmpMain extends CommonSparkJob with Serializable {
val
opt1
=
t
.
_2
.
_1
val
opt2
=
t
.
_2
.
_2
if
(
opt1
.
nonEmpty
&&
opt2
.
nonEmpty
)
{
val
new_audience
=
JSON
.
parse
Object
(
opt1
.
get
.
_1
).
asInstanceOf
[
java.util.Map
[
String
,
String
]]
val
new_audience
=
MobvistaConstant
.
String2JSON
Object
(
opt1
.
get
.
_1
).
asInstanceOf
[
java.util.Map
[
String
,
String
]]
val
old_audience
=
opt2
.
get
.
_1
val
retain_old_audience
=
JSON
.
parse
Object
(
old_audience
).
asInstanceOf
[
java.util.Map
[
String
,
String
]].
asScala
val
retain_old_audience
=
MobvistaConstant
.
String2JSON
Object
(
old_audience
).
asInstanceOf
[
java.util.Map
[
String
,
String
]].
asScala
.
retain
((
k
,
v
)
=>
!
new_audience
.
keySet
().
contains
(
k
)
&&
v
.
compareTo
(
expire_time
)
>
0
)
new_audience
.
putAll
(
retain_old_audience
.
asJava
)
AudienceMerge
(
devid
,
new
ObjectMapper
().
writeValueAsString
(
new_audience
),
datetime
,
opt1
.
get
.
_2
)
...
...
@@ -104,6 +104,8 @@ class RTDmpMain extends CommonSparkJob with Serializable {
.
retain
((
_
,
v
)
=>
v
.
compareTo
(
expire_time
)
>
0
)
AudienceMerge
(
devid
,
new
ObjectMapper
().
writeValueAsString
(
retain_old_audience
.
asJava
),
opt2
.
get
.
_2
,
opt2
.
get
.
_3
)
}
}).
filter
(
o
=>
{
!
MobvistaConstant
.
String2JSONObject
(
o
.
audience_map
).
isEmpty
})
df
.
toDF
...
...
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