From 6c2ff1c7c8e0aba3af92110b76687b78f8278e86 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 03 一月 2025 09:57:37 +0800 Subject: [PATCH] 动态数据长度 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/ihdb/HttpCollectorForIhd.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/ihdb/HttpCollectorForIhd.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/ihdb/HttpCollectorForIhd.java index 32d1c5c..df09772 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/ihdb/HttpCollectorForIhd.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/ihdb/HttpCollectorForIhd.java @@ -12,6 +12,7 @@ import com.iailab.module.data.common.utils.HttpRequest; import com.iailab.module.data.common.utils.TagUtils; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.BoundHashOperations; import org.springframework.data.redis.core.RedisTemplate; @@ -52,7 +53,7 @@ private static final String STA_TRUE = "true"; - private static final int GROUP_MAX_COUNT = 100; + private static final int GROUP_MAX_COUNT = 300; private static final int MAX_WAIT = 30; @@ -202,12 +203,10 @@ CountDownLatch countDownLatch = new CountDownLatch(measurePointsCountGroup.size()); for (Map.Entry<Integer, List<Object[]>> measurePointsItem : measurePointsCountGroup.entrySet()) { HttpApiEntity httpApi = this.getHttpApi(measurePointsItem.getValue().get(0)[0].toString()); - // 并发 Thread.sleep(1000); threadPool.submit(new Task(httpApi.getUrl(), httpApi.getCode(), result, measurePointsItem.getValue(), collectTime, countDownLatch)); - // 顺序 //this.getByHtp(result, measurePointsItem.getValue(), collectTime); } @@ -267,7 +266,7 @@ StringBuilder tagSb = new StringBuilder(); tagSb.append("["); for (int i = 0; i < params.size(); i++) { - Map<String, Object> queryParams = new HashMap<>(); + Map<String, Object> queryParams = new HashMap<>(3); queryParams.put(N, params.get(i)[1]); queryParams.put(D, params.get(i)[2]); queryParams.put(P, params.get(i)[3]); -- Gitblit v1.9.3