| | |
| | | |
| | | private static final int GROUP_MAX_COUNT = 300; |
| | | |
| | | private static final int MAX_WAIT = 30; |
| | | private static final int MAX_WAIT = 40; |
| | | |
| | | private static final String pattern = "yyyyMMddHHmm00"; |
| | | |
| | |
| | | * dataTime |
| | | */ |
| | | private static final String T = "t"; |
| | | |
| | | /** |
| | | * 数据质量G:good,B:bad |
| | | */ |
| | | private static final String Q = "q"; |
| | | |
| | | private HttpApiEntity getHttpApi(String id) { |
| | | if (apiMap.containsKey(id)) { |
| | |
| | | for (Map.Entry<Integer, List<Object[]>> measurePointsItem : measurePointsCountGroup.entrySet()) { |
| | | HttpApiEntity httpApi = this.getHttpApi(measurePointsItem.getValue().get(0)[0].toString()); |
| | | // 并发 |
| | | Thread.sleep(1000); |
| | | Thread.sleep(500); |
| | | threadPool.submit(new Task(httpApi.getUrl(), httpApi.getCode(), result, measurePointsItem.getValue(), |
| | | collectTime, countDownLatch)); |
| | | // 顺序 |
| | |
| | | if (!CollectionUtils.isEmpty(tagValueList)) { |
| | | for (int i = 0; i < tagValueList.size(); i++) { |
| | | JSONObject item = tagValueList.getJSONObject(i); |
| | | result.put(TagUtils.genTagId(DataSourceType.HTTP.getCode(), sourceName, item.get(N).toString()), item.get(V)); |
| | | if (item.get(Q).toString().equals("G")) { |
| | | result.put(TagUtils.genTagId(DataSourceType.HTTP.getCode(), sourceName, item.get(N).toString()), item.get(V)); |
| | | } |
| | | } |
| | | } |
| | | } |