更新jackson工具类库到去除html4版本,修改部分配置项命名。
This commit is contained in:
@@ -58,17 +58,15 @@ public class TransFormFast {
|
||||
functionSet(function, jsonMap, appendToKeyName, appendToKeyValue, logValue, param);
|
||||
}
|
||||
|
||||
return JSONObject.toJSONString(jsonMap,
|
||||
SerializerFeature.DisableCircularReferenceDetect
|
||||
, SerializerFeature.WriteNullStringAsEmpty
|
||||
, SerializerFeature.WriteNullNumberAsZero);
|
||||
return FastJsonTypeUtils.typeTransform(jsonMap);
|
||||
|
||||
} else {
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
logger.error("解析补全日志信息过程异常,异常信息:" + e + "\n" + message);
|
||||
return null;
|
||||
logger.error("Logs TransForm Exception! Error message is:" + e);
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +75,7 @@ public class TransFormFast {
|
||||
* 根据schema描述对应字段进行操作的 函数集合
|
||||
*
|
||||
* @param function 匹配操作函数的字段
|
||||
* @param jsonMap 原始日志解析map
|
||||
* @param jsonMap 原始日志解析map
|
||||
* @param appendToKeyName 需要补全的字段的key
|
||||
* @param appendToKeyValue 需要补全的字段的值
|
||||
* @param logValue 用到的参数的值
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zdjizhi.utils.functions;
|
||||
|
||||
import com.zdjizhi.utils.fast.TransFormFast;
|
||||
import com.zdjizhi.utils.general.TransFormTypeMap;
|
||||
import org.apache.flink.api.common.functions.MapFunction;
|
||||
|
||||
@@ -17,5 +18,6 @@ public class TypeMapCompletedFunction implements MapFunction<String, String> {
|
||||
public String map(String logs) {
|
||||
|
||||
return TransFormTypeMap.dealCommonMessage(logs);
|
||||
// return TransFormFast.dealCommonMessage(logs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,13 +57,8 @@ public class TransFormTypeMap {
|
||||
String param = strings[3];
|
||||
functionSet(function, jsonMap, appendToKeyName, appendToKeyValue, logValue, param);
|
||||
}
|
||||
// return JsonMapper.toJsonString(jsonMap);
|
||||
return JsonMapper.toJsonString(jsonMap);
|
||||
|
||||
//fastjson test
|
||||
return JSONObject.toJSONString(jsonMap,
|
||||
SerializerFeature.DisableCircularReferenceDetect
|
||||
,SerializerFeature.WriteNullStringAsEmpty
|
||||
,SerializerFeature.WriteNullNumberAsZero);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user