1:增加补全程序数据类型Array
2:修改版本到21.06.02
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>dynamic_complement</artifactId>
|
||||
<groupId>com.zdjizhi</groupId>
|
||||
<version>v3.21.04.23</version>
|
||||
<version>v3.21.06.02</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -181,8 +181,8 @@ public class FlumeDynamicApp implements Interceptor {
|
||||
}
|
||||
break;
|
||||
case "app_match":
|
||||
if ((int) name != 0 && appendTo == null) {
|
||||
JsonParseUtil.setValue(object, appendToKeyName, appMatch(appIdHttpUrl, Integer.parseInt(name.toString())));
|
||||
if (name != null && appendTo == null) {
|
||||
JsonParseUtil.setValue(object, appendToKeyName, appMatch(appIdHttpUrl, name.toString()));
|
||||
}
|
||||
break;
|
||||
case "geo_ip_country":
|
||||
@@ -280,11 +280,12 @@ public class FlumeDynamicApp implements Interceptor {
|
||||
/**
|
||||
* appId与缓存中对应关系补全appName
|
||||
*
|
||||
* @param appId id
|
||||
* @param appIds id
|
||||
* @return appName
|
||||
*/
|
||||
private static String appMatch(String appIdHttpUrl, int appId) {
|
||||
String appName = AppUtils.getAppName(appIdHttpUrl, appId);
|
||||
private static String appMatch(String appIdHttpUrl, String appIds) {
|
||||
String appId = appIds.split(FlowWriteConfig.FORMAT_SPLITTER)[0];
|
||||
String appName = AppUtils.getAppName(appIdHttpUrl, Integer.parseInt(appId));
|
||||
if (StringUtil.isBlank(appName)) {
|
||||
logger.warn("AppMap get appName is null, ID is :{}", appId);
|
||||
}
|
||||
|
||||
@@ -13,35 +13,6 @@ public class FlowWriteConfig {
|
||||
public static final String IS_JSON_KEY_TAG = "$.";
|
||||
public static final String IF_CONDITION_SPLITTER = "=";
|
||||
|
||||
// public static final String SEGMENTATION = ",";
|
||||
|
||||
/**
|
||||
* System
|
||||
*/
|
||||
// public static final Integer DATA_CENTER_ID_NUM = FlowWriteConfigurations.getIntProperty(0, "data.center.id.num");
|
||||
// public static final String CHECK_IP_SCOPE = FlowWriteConfigurations.getStringProperty(0, "check.ip.scope");
|
||||
|
||||
/**
|
||||
* kafka
|
||||
*/
|
||||
// public static final String KAFKA_TOPIC = FlowWriteConfigurations.getStringProperty(0, "kafka.topic");
|
||||
|
||||
/**
|
||||
* zookeeper
|
||||
*/
|
||||
// public static final String ZOOKEEPER_SERVERS = FlowWriteConfigurations.getStringProperty(0, "zookeeper.servers");
|
||||
/***
|
||||
* Redis
|
||||
*/
|
||||
// public static final String REDIS_IP = "redis.ip";
|
||||
// public static final String REDIS_PORT = "redis.port";
|
||||
// public static final String REDIS_TIMEOUT = "redis.timeout";
|
||||
// public static final String REDIS_POOL_MAXACTIVE = "redis.pool.maxActive";
|
||||
// public static final String REDIS_POOL_MAXIDLE = "redis.pool.maxIdle";
|
||||
// public static final String REDIS_POOL_MAXWAIT = "redis.pool.maxWait";
|
||||
// public static final String REDIS_POOL_TESTONBORROW = "redis.pool.testOnBorrow";
|
||||
// public static final String REDIS_POOL_TESTONRETURN = "redis.pool.testOnReturn";
|
||||
|
||||
/**
|
||||
* flume使用配置
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,9 @@ public class JsonParseUtil {
|
||||
case "long":
|
||||
clazz = long.class;
|
||||
break;
|
||||
case "array":
|
||||
clazz = JSONArray.class;
|
||||
break;
|
||||
case "Integer":
|
||||
clazz = Integer.class;
|
||||
break;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>dynamic_complement</artifactId>
|
||||
<groupId>com.zdjizhi</groupId>
|
||||
<version>v3.21.04.23</version>
|
||||
<version>v3.21.06.02</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>dynamic_complement</artifactId>
|
||||
<groupId>com.zdjizhi</groupId>
|
||||
<version>v3.21.04.23</version>
|
||||
<version>v3.21.06.02</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user