Skip to content

Commit

Permalink
[INLONG-8617][Manager] Optimize compatibility of SortSdk config inter…
Browse files Browse the repository at this point in the history
…face
  • Loading branch information
vernedeng committed Aug 1, 2023
1 parent d0d16fa commit f56f82a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -81,7 +82,8 @@ public class SortSourceServiceImpl implements SortSourceService {
}
};
private static final String KEY_AUTH = "authentication";
private static final String KEY_TENANT = "pulsarTenant";
private static final String KEY_OLD_TENANT = "tenant";
private static final String KEY_NEW_TENANT = "pulsarTenant";

private static final int RESPONSE_CODE_SUCCESS = 0;
private static final int RESPONSE_CODE_NO_UPDATE = 1;
Expand Down Expand Up @@ -386,7 +388,7 @@ private CacheZone parsePulsarZone(
SortSourceClusterInfo cluster,
boolean isBackupTag) {
Map<String, String> param = cluster.getExtParamsMap();
String tenant = param.get(KEY_TENANT);
String tenant = Optional.ofNullable(param.get(KEY_NEW_TENANT)).orElse(param.get(KEY_OLD_TENANT));
String auth = param.get(KEY_AUTH);
List<Topic> sdkTopics = sinks.stream()
.map(sink -> {
Expand Down

0 comments on commit f56f82a

Please sign in to comment.