style(log): 移除日志输出语句

- 移除了 BceFaceBodyAdapter 中无法访问URL图片的警告日志
- 移除了 VideoPieceGetter 中计数器更新和进度检查的调试日志
- 清理了设备关联计数器相关的日志输出
- 移除了 placeholder 完成状态的日志记录
- 删除了进度检查相关的统计日志输出
This commit is contained in:
2026-01-05 14:59:33 +08:00
parent 295815f1fa
commit 99f75b6805
2 changed files with 10 additions and 18 deletions

View File

@@ -162,7 +162,7 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter {
return resp; return resp;
} else if (errorCode == 222204) { } else if (errorCode == 222204) {
// error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试 // error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试
log.warn("无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); // log.warn("无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl);
String base64Image = downloadImageAsBase64(faceUrl); String base64Image = downloadImageAsBase64(faceUrl);
if (base64Image != null) { if (base64Image != null) {
// 重试时也不需要限流,由外层调度器控制 // 重试时也不需要限流,由外层调度器控制
@@ -338,7 +338,7 @@ public class BceFaceBodyAdapter implements IFaceBodyAdapter {
return resp; return resp;
} else if (errorCode == 222204) { } else if (errorCode == 222204) {
// error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试 // error_code: 222204 表示无法正常访问URL图片,尝试下载并转换为base64后重试
log.warn("搜索人脸时无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl); // log.warn("搜索人脸时无法正常访问URL图片,错误码: 222204,尝试下载图片转base64后重试,URL: {}", faceUrl);
String base64Image = downloadImageAsBase64(faceUrl); String base64Image = downloadImageAsBase64(faceUrl);
if (base64Image != null) { if (base64Image != null) {
try { try {

View File

@@ -212,12 +212,12 @@ public class VideoPieceGetter {
AtomicInteger pairCount = currentUnFinPlaceholder.get(pairDeviceId.toString()); AtomicInteger pairCount = currentUnFinPlaceholder.get(pairDeviceId.toString());
if (pairCount != null) { if (pairCount != null) {
int remaining = pairCount.decrementAndGet(); int remaining = pairCount.decrementAndGet();
log.info("[计数器更新] 关联设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", // log.info("[计数器更新] 关联设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}",
pairDeviceId, remaining, currentUnFinPlaceholder.size()); // pairDeviceId, remaining, currentUnFinPlaceholder.size());
if (remaining <= 0) { if (remaining <= 0) {
currentUnFinPlaceholder.remove(pairDeviceId.toString()); currentUnFinPlaceholder.remove(pairDeviceId.toString());
log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", // log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}",
pairDeviceId, currentUnFinPlaceholder.size()); // pairDeviceId, currentUnFinPlaceholder.size());
} }
} }
} }
@@ -229,25 +229,17 @@ public class VideoPieceGetter {
AtomicInteger count = currentUnFinPlaceholder.get(faceSample.getDeviceId().toString()); AtomicInteger count = currentUnFinPlaceholder.get(faceSample.getDeviceId().toString());
if (count != null) { if (count != null) {
int remaining = count.decrementAndGet(); int remaining = count.decrementAndGet();
log.info("[计数器更新] 设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}", // log.info("[计数器更新] 设备 {} 计数器递减,剩余={}, currentUnFinPlaceholder总数={}",
faceSample.getDeviceId(), remaining, currentUnFinPlaceholder.size()); // faceSample.getDeviceId(), remaining, currentUnFinPlaceholder.size());
if (remaining <= 0) { if (remaining <= 0) {
currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString()); currentUnFinPlaceholder.remove(faceSample.getDeviceId().toString());
log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}", // log.debug("[Placeholder完成] 设备 {} 的placeholder已满足并移除,剩余设备数={}",
faceSample.getDeviceId(), currentUnFinPlaceholder.size()); // faceSample.getDeviceId(), currentUnFinPlaceholder.size());
} }
} }
// 如果有templateId,检查是否所有placeholder都已满足 // 如果有templateId,检查是否所有placeholder都已满足
if (templatePlaceholder != null) { if (templatePlaceholder != null) {
int totalPlaceholderCount = templatePlaceholder.size();
int remainingCount = currentUnFinPlaceholder.values().stream()
.mapToInt(AtomicInteger::get)
.sum();
log.info("[进度检查] 当前进度:已完成 {}/{},剩余 {} 个placeholder未满足,剩余设备数={}",
totalPlaceholderCount - remainingCount, totalPlaceholderCount, remainingCount,
currentUnFinPlaceholder.size());
if (currentUnFinPlaceholder.isEmpty()) { if (currentUnFinPlaceholder.isEmpty()) {
// 使用 compareAndSet 保证原子性,避免多线程重复调用 callback // 使用 compareAndSet 保证原子性,避免多线程重复调用 callback
if (invoke.compareAndSet(false, true)) { if (invoke.compareAndSet(false, true)) {