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
a58447ad
Commit
a58447ad
authored
Feb 21, 2022
by
fan.jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
business adn_sdk adn_sdk_v2 add oaid device_id
parent
6452c795
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
AdnSdkTools.java
...ain/java/mobvista/dmp/datasource/adn_sdk/AdnSdkTools.java
+3
-0
AdnSdkDaily.scala
...n/scala/mobvista/dmp/datasource/adn_sdk/AdnSdkDaily.scala
+7
-0
No files found.
src/main/java/mobvista/dmp/datasource/adn_sdk/AdnSdkTools.java
View file @
a58447ad
...
...
@@ -216,6 +216,7 @@ public class AdnSdkTools extends UDF implements Serializable {
String
data
=
""
;
String
imei
=
""
;
String
android_id
=
""
;
String
oaid
=
""
;
try
{
JSONObject
json
;
try
{
...
...
@@ -277,6 +278,7 @@ public class AdnSdkTools extends UDF implements Serializable {
}
imei
=
(
String
)
dviInfo
.
get
(
"imei"
);
android_id
=
(
String
)
dviInfo
.
get
(
"android_id"
);
oaid
=
(
String
)
dviInfo
.
get
(
"oaid"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -333,6 +335,7 @@ public class AdnSdkTools extends UDF implements Serializable {
result
.
put
(
"sdk_version"
,
sdk_version
);
result
.
put
(
"imei"
,
imei
);
result
.
put
(
"android_id"
,
android_id
);
result
.
put
(
"oaid"
,
oaid
);
result
.
put
(
"hb"
,
hb
);
}
return
result
;
...
...
src/main/scala/mobvista/dmp/datasource/adn_sdk/AdnSdkDaily.scala
View file @
a58447ad
...
...
@@ -26,6 +26,8 @@ object AdnSdkDaily extends Serializable {
val
allZero
=
"00000000-0000-0000-0000-000000000000"
val
imeiPtn
=
"^([0-9]{15})$"
val
andriodIdPtn
=
"^[a-zA-Z0-9]{16}$"
val
oaidPtn
=
"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"
val
oaidAnotherPtn
=
"^([a-fA-F0-9]{1,64})$"
def
main
(
args
:
Array
[
String
])
{
...
...
@@ -74,6 +76,7 @@ object AdnSdkDaily extends Serializable {
val
sdk_version
=
etl_json
.
get
(
"sdk_version"
)
val
imei
=
etl_json
.
getString
(
"imei"
)
val
android_id
=
etl_json
.
getString
(
"android_id"
)
val
oaid
=
etl_json
.
getString
(
"oaid"
)
val
rid_n
=
etl_json
.
getString
(
"rid_n"
)
val
hb
=
etl_json
.
getString
(
"hb"
)
...
...
@@ -85,6 +88,10 @@ object AdnSdkDaily extends Serializable {
linesArr
+=
Row
(
android_id
,
"androidid"
,
"android"
,
data
,
model
,
country
,
sdk_version
,
brand
,
rid_n
,
hb
)
}
if
(
StringUtils
.
isNotBlank
(
oaid
)
&&
(
oaid
.
matches
(
oaidPtn
)
||
oaid
.
matches
(
oaidAnotherPtn
))
)
{
linesArr
+=
Row
(
imei
,
"oaid"
,
"android"
,
data
,
model
,
country
,
sdk_version
,
brand
,
rid_n
,
hb
)
}
if
(
StringUtils
.
isNotBlank
(
device_id
)
&&
device_id
.
matches
(
didPtn
)
&&
!
allZero
.
equals
(
device_id
))
{
linesArr
+=
Row
(
device_id
,
device_type
,
platform
,
data
,
model
,
country
,
sdk_version
,
brand
,
rid_n
,
hb
)
}
...
...
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