Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flink_warehouse_rt
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
data
flink_warehouse_rt
Commits
16878755
Commit
16878755
authored
Apr 23, 2020
by
刘喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update DimRichAsyncFunction bug
parent
67701600
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
33 deletions
+44
-33
DimRichAsyncFunction.java
...src/main/java/com/gmei/function/DimRichAsyncFunction.java
+44
-33
No files found.
ml_c_et_pe_preciseexposure_dimen_d_rt/src/main/java/com/gmei/function/DimRichAsyncFunction.java
View file @
16878755
...
...
@@ -79,59 +79,70 @@ public class DimRichAsyncFunction extends RichAsyncFunction<MlPreciseExposureBea
//解决方案:dimCityCache缓存中的key既有城市ID又有城市TAGID,获取到城市对象后将正确的城市ID填充到Current_city_id中
if
(
current_city_id
!=
null
)
{
DimCity
dimCity
=
dimCityCache
.
getValue
(
current_city_id
,
new
DimTableCallable
(
current_city_id
,
DimTableList
.
DIM_CITY
.
getTableName
(),
dimJdbcUrl
));
if
(
dimCity
.
getName
()
==
null
)
{
dimCityCache
.
invalidate
(
current_city_id
);
}
else
{
mlPreciseExposureBean
.
setCurrent_city_id
(
dimCity
.
getCode
());
mlPreciseExposureBean
.
setCurrent_city_name
(
dimCity
.
getName
());
mlPreciseExposureBean
.
setCurrent_province_id
(
dimCity
.
getParent_province_code
());
mlPreciseExposureBean
.
setCurrent_province_name
(
dimCity
.
getParent_province_name
());
mlPreciseExposureBean
.
setCurrent_country_id
(
dimCity
.
getParent_country_code
());
mlPreciseExposureBean
.
setCurrent_country_name
(
dimCity
.
getParent_country_name
());
mlPreciseExposureBean
.
setCurrent_region_id
(
dimCity
.
getParent_region_code
());
mlPreciseExposureBean
.
setCurrent_region_name
(
dimCity
.
getParent_region_name
());
if
(
dimCity
!=
null
)
{
if
(
dimCity
.
getName
()
==
null
)
{
dimCityCache
.
invalidate
(
current_city_id
);
}
else
{
mlPreciseExposureBean
.
setCurrent_city_id
(
dimCity
.
getCode
());
mlPreciseExposureBean
.
setCurrent_city_name
(
dimCity
.
getName
());
mlPreciseExposureBean
.
setCurrent_province_id
(
dimCity
.
getParent_province_code
());
mlPreciseExposureBean
.
setCurrent_province_name
(
dimCity
.
getParent_province_name
());
mlPreciseExposureBean
.
setCurrent_country_id
(
dimCity
.
getParent_country_code
());
mlPreciseExposureBean
.
setCurrent_country_name
(
dimCity
.
getParent_country_name
());
mlPreciseExposureBean
.
setCurrent_region_id
(
dimCity
.
getParent_region_code
());
mlPreciseExposureBean
.
setCurrent_region_name
(
dimCity
.
getParent_region_name
());
}
}
}
if
(
page_code
!=
null
)
{
DimPageType
dimPageType
=
dimPageTypeCache
.
getValue
(
page_code
,
new
DimTableCallable
(
page_code
,
DimTableList
.
DIM_PAGE_TYPE
.
getTableName
(),
dimJdbcUrl
));
if
(
dimPageType
.
getName
()
==
null
)
{
dimPageTypeCache
.
invalidate
(
page_code
);
}
else
{
mlPreciseExposureBean
.
setPage_name
(
dimPageType
.
getName
());
if
(
dimPageType
!=
null
)
{
if
(
dimPageType
.
getName
()
==
null
)
{
dimPageTypeCache
.
invalidate
(
page_code
);
}
else
{
mlPreciseExposureBean
.
setPage_name
(
dimPageType
.
getName
());
}
}
}
if
(
referrer_code
!=
null
)
{
DimPageType
dimReferrerType
=
dimPageTypeCache
.
getValue
(
referrer_code
,
new
DimTableCallable
(
referrer_code
,
DimTableList
.
DIM_PAGE_TYPE
.
getTableName
(),
dimJdbcUrl
));
if
(
dimReferrerType
.
getName
()
==
null
)
{
dimPageTypeCache
.
invalidate
(
page_code
);
}
else
{
mlPreciseExposureBean
.
setReferrer_name
(
dimReferrerType
.
getName
());
if
(
dimReferrerType
!=
null
)
{
if
(
dimReferrerType
.
getName
()
==
null
)
{
dimPageTypeCache
.
invalidate
(
page_code
);
}
else
{
mlPreciseExposureBean
.
setReferrer_name
(
dimReferrerType
.
getName
());
}
}
}
if
(
card_content_type
!=
null
)
{
DimCardContentType
dimCardContentType
=
dimCardContentTypeCache
.
getValue
(
card_content_type
,
new
DimTableCallable
(
card_content_type
,
DimTableList
.
DIM_CARD_CONTENT_TYPE
.
getTableName
(),
dimJdbcUrl
));
if
(
dimCardContentType
.
getName
()
==
null
)
{
dimCardContentTypeCache
.
invalidate
(
card_content_type
);
}
else
{
mlPreciseExposureBean
.
setCard_content_type
(
dimCardContentType
.
getNew_code
());
mlPreciseExposureBean
.
setCard_content_type_name
(
dimCardContentType
.
getName
());
if
(
dimCardContentType
!=
null
)
{
if
(
dimCardContentType
.
getName
()
==
null
)
{
dimCardContentTypeCache
.
invalidate
(
card_content_type
);
}
else
{
mlPreciseExposureBean
.
setCard_content_type
(
dimCardContentType
.
getNew_code
());
mlPreciseExposureBean
.
setCard_content_type_name
(
dimCardContentType
.
getName
());
}
}
}
if
(
card_type
!=
null
)
{
DimTable
dimCardType
=
dimCardTypeCache
.
getValue
(
card_type
,
new
DimTableCallable
(
card_type
,
DimTableList
.
DIM_CARD_TYPE
.
getTableName
(),
dimJdbcUrl
));
if
(
dimCardType
.
getName
()
==
null
){
dimCardTypeCache
.
invalidate
(
card_type
);
}
else
{
mlPreciseExposureBean
.
setCard_type_name
(
dimCardType
.
getName
());
if
(
dimCardType
!=
null
)
{
if
(
dimCardType
.
getName
()
==
null
)
{
dimCardTypeCache
.
invalidate
(
card_type
);
}
else
{
mlPreciseExposureBean
.
setCard_type_name
(
dimCardType
.
getName
());
}
}
}
if
(
transaction_type
!=
null
)
{
DimTable
dimTransactionType
=
dimTransactionTypeCache
.
getValue
(
transaction_type
,
new
DimTableCallable
(
transaction_type
,
DimTableList
.
DIM_TRANSACTION_TYPE
.
getTableName
(),
dimJdbcUrl
));
if
(
dimTransactionType
.
getName
()
==
null
)
{
dimTransactionTypeCache
.
invalidate
(
transaction_type
);
}
else
{
mlPreciseExposureBean
.
setTransaction_type_name
(
dimTransactionType
.
getName
());
if
(
dimTransactionType
!=
null
)
{
if
(
dimTransactionType
.
getName
()
==
null
)
{
dimTransactionTypeCache
.
invalidate
(
transaction_type
);
}
else
{
mlPreciseExposureBean
.
setTransaction_type_name
(
dimTransactionType
.
getName
());
}
}
}
// System.out.println(mlPreciseExposureBean);
...
...
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