gpt4 book ai didi

java - 分区后 Spring Batch 挂起

转载 作者:行者123 更新时间:2023-11-28 23:19:05 25 4
gpt4 key购买 nike

我正在为我的 Spring 批处理应用程序处理 200 万条记录和 20 的网格大小。对于 100-200k 条记录,它工作正常,但对于 200 万条记录,它在分区后失败。

分区信息:

{
partition - 20 = {
startKey = 1980865.0,
endKey = 2069192.0,
partitionSize = 72,
partitionId = 20,
partitionRecordCount = 88328
},
partition - 10 = {
st
artKey = 938305.0,
endKey = 1042560.0,
partitionSize = 72,
partitionId = 10,
partitionRecordCount = 104256
},
partition - 11 = {
startKey = 1042561.0,
endKey = 1146816.0,
partitionSize = 72,
partitionId = 11,
partitionRecordCount = 104256
},
partition - 12 = {
startKey = 1146817.0,
endKey = 1251072.0,
partitionSize = 72,
partitionId = 12,
partitionRecordCount = 104256
},
partition - 13 = {
startKey = 1251073.0,
endKey = 1355328.0,
partitionSize = 72,
partitionId = 13,
partitionRecordCount = 104256
},
par
tition - 14 = {
startKey = 1355329.0,
endKey = 1459584.0,
partitionSize = 72,
partitionId = 14,
partitionRecordCount = 104256
},
partition - 15 = {
startKey = 1459585.0,
end
Key = 1563840.0,
partitionSize = 72,
partitionId = 15,
partitionRecordCount = 104256
},
partition - 16 = {
startKey = 1563841.0,
endKey = 1668096.0,
partitionSize = 72,
p
artitionId = 16,
partitionRecordCount = 104256
},
partition - 17 = {
startKey = 1668097.0,
endKey = 1772352.0,
partitionSize = 72,
partitionId = 17,
partitionRecordCoun
t = 104256
},
partition - 18 = {
startKey = 1772353.0,
endKey = 1876608.0,
partitionSize = 72,
partitionId = 18,
partitionRecordCount = 104256
},
partition - 19 = {
startKey =
1876609.0,
endKey = 1980864.0,
partitionSize = 72,
partitionId = 19,
partitionRecordCount = 104256
},
partition - 1 = {
startKey = 1.0,
endKey = 104256.0,
partitionSize
= 72,
partitionId = 1,
partitionRecordCount = 104256
},
partition - 2 = {
startKey = 104257.0,
endKey = 208512.0,
partitionSize = 72,
partitionId = 2,
partitionRecordCou
nt = 104256
},
partition - 3 = {
startKey = 208513.0,
endKey = 312768.0,
partitionSize = 72,
partitionId = 3,
partitionRecordCount = 104256
},
partition - 4 = {
startKey = 3127
69.0,
endKey = 417024.0,
partitionSize = 72,
partitionId = 4,
partitionRecordCount = 104256
},
partition - 5 = {
startKey = 417025.0,
endKey = 521280.0,
partitionSize = 7
2,
partitionId = 5,
partitionRecordCount = 104256
},
partition - 6 = {
startKey = 521281.0,
endKey = 625536.0,
partitionSize = 72,
partitionId = 6,
partitionRecordCount
= 104256
},
partition - 7 = {
startKey = 625537.0,
endKey = 729792.0,
partitionSize = 72,
partitionId = 7,
partitionRecordCount = 104256
},
partition - 8 = {
startKey = 729793
.0,
endKey = 834048.0,
partitionSize = 72,
partitionId = 8,
partitionRecordCount = 104256
},
partition - 9 = {
startKey = 834049.0,
endKey = 938304.0,
partitionSize = 72,
partitionId = 9,
partitionRecordCount = 104256
}
}
Total no. of Partitions: 20

它打印的最后一个日志是创建的分区,然后控制权永远不会进入 writer。对于 200k 条记录,它很挣扎,所以我增加了连接池大小,这解决了问题,但它在 200 万行时失败了。

没有错误,只是它卡在那里。

最佳答案

这可能与数据库有关。您能否检查应用程序是否能够使用写入凭据访问数据库。我确实注意到这种分区已完成且实际处理挂起的问题。故障排除后,意识到它无法写入数据库。修复数据库后,它运行良好。

关于java - 分区后 Spring Batch 挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45897531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com