Skip to content

Commit

Permalink
Merge branch 'dev-1.1.7-webank-dcn' into dev-1.1.7-webank
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidhua1996 committed Nov 17, 2024
2 parents 6842860 + b2224ef commit b505001
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,21 @@ private void doSplitHandle(SubExchangisJob subExchangisJob,
SubExchangisJob copy = subExchangisJob.copy();
JobParamSet copyParamSet = copy.getRealmParams(splitRealm);
Map<String, Object> jobParams = copy.getJobParams();
List<String> nameSuffix = new ArrayList<>();
for (Map.Entry<String, Object> entry : splitPart.entrySet()){
// If it is mapping key, overwrite the param value
if (mappingParams.containsKey(entry.getKey())){
Optional.ofNullable(copyParamSet.get(entry.getKey()))
.ifPresent(param -> param.setValue(entry.getValue()));
String itemKey = entry.getKey();
Object itemValue = entry.getValue();
if (mappingParams.containsKey(itemKey)){
Optional.ofNullable(copyParamSet.get(itemKey))
.ifPresent(param -> param.setValue(itemValue));
}
jobParams.put(entry.getKey(), entry.getKey());
nameSuffix.add(String.valueOf(itemValue));
jobParams.put(itemKey, itemValue);
}
// Overwrite the sub exchangis job name
if (nameSuffix.size() > 0){
copy.setName(copy.getName() + Json.toJson(nameSuffix, null));
}
// Add to the handled job list
handledJobs.add(copy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,16 @@ public Map<String, Integer> getRateParamMap() {
@Override
public SubExchangisJob copy() {
TransformSubExchangisJob job = new TransformSubExchangisJob();
// Basic info
job.id = this.id;
job.name = this.name;
job.engineType = this.engineType;
job.jobLabel = this.jobLabel;
job.setJobLabels(this.getJobLabels());
job.createTime = this.createTime;
job.lastUpdateTime = this.lastUpdateTime;
job.createUser = this.createUser;
// Advance info
job.sourceType = this.sourceType;
job.sinkType = this.sinkType;
job.jobParams.putAll(this.jobParams);
Expand All @@ -296,6 +306,7 @@ public SubExchangisJob copy() {
this.copyParamSet(job::addRealmParams);
job.transformType = this.transformType;
job.jobInfoContent = this.jobInfoContent;
// Code resource
job.resources.putAll(this.resources);
job.rateParamMap = this.rateParamMap;
job.dsModelIds = this.dsModelIds;
Expand Down

0 comments on commit b505001

Please sign in to comment.