1:增加补全程序数据类型Array
2:修改版本到21.06.02
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>dynamic_complement</artifactId>
|
<artifactId>dynamic_complement</artifactId>
|
||||||
<groupId>com.zdjizhi</groupId>
|
<groupId>com.zdjizhi</groupId>
|
||||||
<version>v3.21.04.23</version>
|
<version>v3.21.06.02</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ public class FlumeDynamicApp implements Interceptor {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "app_match":
|
case "app_match":
|
||||||
if ((int) name != 0 && appendTo == null) {
|
if (name != null && appendTo == null) {
|
||||||
JsonParseUtil.setValue(object, appendToKeyName, appMatch(appIdHttpUrl, Integer.parseInt(name.toString())));
|
JsonParseUtil.setValue(object, appendToKeyName, appMatch(appIdHttpUrl, name.toString()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "geo_ip_country":
|
case "geo_ip_country":
|
||||||
@@ -280,11 +280,12 @@ public class FlumeDynamicApp implements Interceptor {
|
|||||||
/**
|
/**
|
||||||
* appId与缓存中对应关系补全appName
|
* appId与缓存中对应关系补全appName
|
||||||
*
|
*
|
||||||
* @param appId id
|
* @param appIds id
|
||||||
* @return appName
|
* @return appName
|
||||||
*/
|
*/
|
||||||
private static String appMatch(String appIdHttpUrl, int appId) {
|
private static String appMatch(String appIdHttpUrl, String appIds) {
|
||||||
String appName = AppUtils.getAppName(appIdHttpUrl, appId);
|
String appId = appIds.split(FlowWriteConfig.FORMAT_SPLITTER)[0];
|
||||||
|
String appName = AppUtils.getAppName(appIdHttpUrl, Integer.parseInt(appId));
|
||||||
if (StringUtil.isBlank(appName)) {
|
if (StringUtil.isBlank(appName)) {
|
||||||
logger.warn("AppMap get appName is null, ID is :{}", appId);
|
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 IS_JSON_KEY_TAG = "$.";
|
||||||
public static final String IF_CONDITION_SPLITTER = "=";
|
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使用配置
|
* flume使用配置
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ public class JsonParseUtil {
|
|||||||
case "long":
|
case "long":
|
||||||
clazz = long.class;
|
clazz = long.class;
|
||||||
break;
|
break;
|
||||||
|
case "array":
|
||||||
|
clazz = JSONArray.class;
|
||||||
|
break;
|
||||||
case "Integer":
|
case "Integer":
|
||||||
clazz = Integer.class;
|
clazz = Integer.class;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>dynamic_complement</artifactId>
|
<artifactId>dynamic_complement</artifactId>
|
||||||
<groupId>com.zdjizhi</groupId>
|
<groupId>com.zdjizhi</groupId>
|
||||||
<version>v3.21.04.23</version>
|
<version>v3.21.06.02</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>dynamic_complement</artifactId>
|
<artifactId>dynamic_complement</artifactId>
|
||||||
<groupId>com.zdjizhi</groupId>
|
<groupId>com.zdjizhi</groupId>
|
||||||
<version>v3.21.04.23</version>
|
<version>v3.21.06.02</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -7,7 +7,7 @@
|
|||||||
<groupId>com.zdjizhi</groupId>
|
<groupId>com.zdjizhi</groupId>
|
||||||
<artifactId>dynamic_complement</artifactId>
|
<artifactId>dynamic_complement</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>v3.21.04.23</version>
|
<version>v3.21.06.02</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>FlumeDynamicInterceptor</module>
|
<module>FlumeDynamicInterceptor</module>
|
||||||
<module>FlumeSubscriberInterceptor</module>
|
<module>FlumeSubscriberInterceptor</module>
|
||||||
|
|||||||
Reference in New Issue
Block a user