-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INLONG-10081][DataProxy] Modify the data format of metadata saved in…
… the metadata.json file (#10083)
- Loading branch information
1 parent
60c2676
commit b5714f8
Showing
14 changed files
with
535 additions
and
354 deletions.
There are no files selected for viewing
260 changes: 231 additions & 29 deletions
260
...roxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/ConfigManager.java
Large diffs are not rendered by default.
Oops, something went wrong.
372 changes: 143 additions & 229 deletions
372
...roxy-source/src/main/java/org/apache/inlong/dataproxy/config/holder/MetaConfigHolder.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...aproxy-source/src/main/java/org/apache/inlong/dataproxy/config/pojo/InLongMetaConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.inlong.dataproxy.config.pojo; | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder; | ||
|
||
import java.util.Map; | ||
|
||
public class InLongMetaConfig { | ||
|
||
private String md5; | ||
private CacheType mqType; | ||
private Map<String, CacheClusterConfig> clusterConfigMap; | ||
private Map<String, IdTopicConfig> idTopicConfigMap; | ||
|
||
public InLongMetaConfig() { | ||
|
||
} | ||
|
||
public InLongMetaConfig(String md5, CacheType mqType, | ||
Map<String, CacheClusterConfig> clusterConfigMap, | ||
Map<String, IdTopicConfig> idTopicConfigMap) { | ||
this.md5 = md5; | ||
this.mqType = mqType; | ||
this.clusterConfigMap = clusterConfigMap; | ||
this.idTopicConfigMap = idTopicConfigMap; | ||
} | ||
|
||
public String getMd5() { | ||
return md5; | ||
} | ||
|
||
public CacheType getMqType() { | ||
return mqType; | ||
} | ||
|
||
public Map<String, CacheClusterConfig> getClusterConfigMap() { | ||
return clusterConfigMap; | ||
} | ||
|
||
public Map<String, IdTopicConfig> getIdTopicConfigMap() { | ||
return idTopicConfigMap; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this) | ||
.append("md5", md5) | ||
.append("mqType", mqType) | ||
.append("clusterConfigMap", clusterConfigMap) | ||
.append("idTopicConfigMap", idTopicConfigMap) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
inlong-dataproxy/dataproxy-source/src/test/resources/metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"result":true,"errCode":0,"md5":"5a3f5939bb7368f493bf41c1d785b8f3","data":{"proxyCluster":{"name":"test_dataproxy","setName":"test_set","zone":"default\u003dtrue","channels":[],"inlongIds":[{"inlongId":"test_group.stream1","topic":"stream1","params":{"namespace":"test_group","ignoreParseError":"true","appGroupName":"app_test_group","productId":"58","productName":"test_meta","wrapWithInlongMsg":"true"}}],"sources":[],"sinks":[]},"cacheClusterSet":{"setName":"test_set","type":"TUBEMQ","cacheClusters":[{"name":"test_tubemq","token":"******","zone":"default\u003dtrue","params":{"masterWebUrl":"http://127.0.0.1:8080","messageQueueHandler":"org.apache.inlong.dataproxy.sink.mq.tube.TubeHandler","master-host-port-list":"127.0.0.1:8000"}}],"topics":[]}}} | ||
{"md5":"5a3f5939bb7368f493bf41c1d785b8f3","mqType":"TUBE","clusterConfigMap":{"test_tubemq":{"clusterName": "test_tubemq","token": "******","zone": "default=true","params": {"masterWebUrl": "http://127.0.0.1:8080","messageQueueHandler": "org.apache.inlong.dataproxy.sink.mq.tube.TubeHandler","master-host-port-list": "127.0.0.1:8000"}}},"idTopicConfigMap":{"test_group.stream1":{"uid":"test_group.stream1","inlongGroupId":"test_group","inlongStreamid":"stream1","topicName":"test_group","dataType":"N","fieldDelimiter":"|","fileDelimiter":"","useExtendedFields":false,"params":{"appGroupName":"app_test_group","productId":"58","namespace":"test_group","useExtendedFields":"false","ignoreParseError":"true","productName":"test_meta","wrapWithInlongMsg":"true"}}}} |