Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
H
huazheng-project-flink
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
huazheng
huazheng-project-flink
Commits
f40fcb48
提交
f40fcb48
authored
11月 23, 2020
作者:
guofeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
94507111
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
0 行增加
和
46 行删除
+0
-46
DeleteUpdateJobServiceImpl.java
...ct/greenplum/service/impl/DeleteUpdateJobServiceImpl.java
+0
-46
没有找到文件。
src/main/java/com/huazheng/project/greenplum/service/impl/DeleteUpdateJobServiceImpl.java
浏览文件 @
f40fcb48
...
@@ -40,7 +40,6 @@ import com.huazheng.project.hana.model.Vbap;
...
@@ -40,7 +40,6 @@ import com.huazheng.project.hana.model.Vbap;
import
com.huazheng.project.hana.model.VbapAdv
;
import
com.huazheng.project.hana.model.VbapAdv
;
import
com.huazheng.project.hana.model.Vbep
;
import
com.huazheng.project.hana.model.Vbep
;
import
com.huazheng.project.hana.model.Vbpa
;
import
com.huazheng.project.hana.model.Vbpa
;
import
com.huazheng.project.hana.model.Vbrp
;
import
com.huazheng.project.hana.model.Vbuk
;
import
com.huazheng.project.hana.model.Vbuk
;
import
com.huazheng.project.hana.model.Zmdpc
;
import
com.huazheng.project.hana.model.Zmdpc
;
import
com.huazheng.project.hana.model.Zpoedit
;
import
com.huazheng.project.hana.model.Zpoedit
;
...
@@ -917,7 +916,6 @@ public class DeleteUpdateJobServiceImpl {
...
@@ -917,7 +916,6 @@ public class DeleteUpdateJobServiceImpl {
selectT023tCheck
();
// 31
selectT023tCheck
();
// 31
selectVbepCheck
();
// 33
selectVbepCheck
();
// 33
selectVbpaCheck
();
// 34
selectVbpaCheck
();
// 34
selectVbrpCheck
();
// 36
selectVbukCheck
();
// 37
selectVbukCheck
();
// 37
selectZmdpcCheck
();
// 38
selectZmdpcCheck
();
// 38
selectTvkbtCheck
();
//
selectTvkbtCheck
();
//
...
@@ -1631,50 +1629,6 @@ public class DeleteUpdateJobServiceImpl {
...
@@ -1631,50 +1629,6 @@ public class DeleteUpdateJobServiceImpl {
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:Vbpa:rowNum"
,
getErrorInfoFromException
(
e
));
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:Vbpa:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
}
}
private
void
selectVbrpCheck
()
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
opsForValue
.
setIfAbsent
(
"huazheng:check:Vbrp:rowNum"
,
"0"
);
String
rowNum
=
opsForValue
.
get
(
"huazheng:check:Vbrp:rowNum"
);
Vbrp
build
=
Vbrp
.
builder
().
rowNum
(
rowNum
).
build
();
List
<
Vbrp
>
list
=
gpMapper
.
selectVbrpCheck
(
build
);
// 从数仓中查询一组数据
if
(
list
.
size
()
==
0
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:check:Vbrp:rowNum"
,
"0"
);
// 计数器复位
ThreadUtil
.
sleep
(
1000
);
// 没有数据了,休眠一下
}
list
.
forEach
(
target
->
{
// 遍历要检查的数据
Vbrp
source
=
sapMapper
.
selectVbrpById
(
target
);
// 根据主键查询源库中的数据
String
operator
=
"none"
;
if
(
source
==
null
)
{
// 如果源库中没有数据
gpMapper
.
deleteVbrp
(
target
);
// 删除数仓中的数据
operator
=
"delete"
;
}
else
{
// 源库中有数据
String
shash
=
SecureUtil
.
md5
(
JSONUtil
.
toJsonStr
(
source
));
// 源库中数据的hash结果
String
thash
=
target
.
getHashResult
();
// 数仓中数据的hash结果
if
(!
shash
.
equals
(
thash
))
{
// 如果hash结果不一致
source
.
setHashResult
(
shash
);
// ===============================
// ===============================
while
(
true
)
{
try
{
gpMapper
.
updateVbrp
(
source
);
// 更新数据到数仓中
break
;
}
catch
(
RuntimeException
e
)
{
log
.
error
(
e
.
getMessage
());
ThreadUtil
.
safeSleep
(
500
);
}
}
ThreadUtil
.
safeSleep
(
500
);
}
}
redis1Template
.
opsForValue
().
set
(
"huazheng:check:Vbrp:rowNum"
,
target
.
getRowNum
());
if
(!
operator
.
equals
(
"none"
))
{
log
.
info
(
String
.
format
(
"selectVbrpCheck --> rowNum:%s, operator:%s"
,
target
.
getRowNum
(),
operator
));
}
});
}
catch
(
Exception
e
)
{
redis1Template
.
opsForValue
().
set
(
"huazheng:checkError:Vbrp:rowNum"
,
getErrorInfoFromException
(
e
));
}
}
private
void
selectVbukCheck
()
{
private
void
selectVbukCheck
()
{
try
{
try
{
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
ValueOperations
<
String
,
String
>
opsForValue
=
redis1Template
.
opsForValue
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论