Kaynağa Gözat

'调试线上报错问题'

james 5 ay önce
ebeveyn
işleme
fe44d4711e

+ 4 - 0
data-tsdb-proxy/data-tsdb-proxy-biz/src/main/java/com/usky/demo/service/rocketmq/SimpleContext.java

@@ -27,22 +27,26 @@ public class SimpleContext {
         Map<String, String> tags = new HashMap<>();
         Map<String, Object> fields = new HashMap<>();
         Map map_data = JsonUtils.fromJson(message,Map.class);
+        System.out.println("test11111");
         String deviceUUId = map_data.get("deviceUUId").toString();
         String productCode = map_data.get("productCode").toString().toLowerCase();
         Long timestamp = Long.valueOf(map_data.get("timestamp").toString());
         String tableName = deviceUUId;
+        System.out.println("test22222");
 
         Object tg = JSONObject.toJSONString(map_data.get("tags"));
         JSONObject tag = JSON.parseObject(tg.toString());
         for (String entry : tag.keySet()){
             tags.put(entry.toLowerCase(),tag.get(entry).toString());
         }
+        System.out.println("test33333"+tg.toString());
 
         Object met = JSONObject.toJSONString(map_data.get("metrics"));
         JSONObject metrics = JSON.parseObject(met.toString());
         for(String entry : metrics.keySet()){
             fields.put(entry.toLowerCase(),metrics.get(entry));
         }
+        System.out.println("test44444"+met.toString());
 
         influxDBUtils.insertOne1(tableName,tags,fields,timestamp);
     }