zrhoffman commented on a change in pull request #4724:
URL: https://github.com/apache/trafficcontrol/pull/4724#discussion_r442584880
##########
File path:
traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/config/ConfigHandler.java
##########
@@ -491,21 +491,36 @@ private void parseTopologyConfig(final JsonNode
allTopologies, final Map<String,
deliveryServiceMap.forEach((xmlId, ds) -> {
final List<DeliveryServiceReference> dsReferences = new
ArrayList<>();
+ final List<String> dsNames = new ArrayList<>(); // for
stats
Stream.of(ds.getTopology())
- .filter((topologyName) ->
!Objects.isNull(topologyName) && topologyMap.containsKey(topologyName))
- .flatMap((topologyName) ->
topologyMap.get(topologyName).stream())
- .flatMap((node) ->
cacheRegister.getCacheLocation(node).getCaches().stream())
- .filter((cache) ->
ds.hasRequiredCapabilities(cache.getCapabilities()))
- .forEach((cache) -> {
+ .filter(topologyName ->
!Objects.isNull(topologyName) && topologyMap.containsKey(topologyName))
+ .flatMap(topologyName -> {
+ statMap.put(ds.getId(),
dsNames);
+ return
topologyMap.get(topologyName).stream();
+ })
+ .flatMap(node ->
cacheRegister.getCacheLocation(node).getCaches().stream())
+ .filter(cache ->
ds.hasRequiredCapabilities(cache.getCapabilities()))
+ .forEach(cache -> {
+
cacheRegister.getDeliveryServiceMatchers(ds).stream()
+
.flatMap(deliveryServiceMatcher ->
deliveryServiceMatcher.getRequestMatchers().stream())
+
.map(requestMatcher -> requestMatcher.getPattern().pattern())
+
.forEach(pattern -> {
+ final
String remap = ds.getRemap(pattern);
+ final
String fqdn = pattern.contains(".*") && !ds.isDns()
+
? cache.getId() + "." + remap
+
: remap;
+
dsNames.add(getDsName(fqdn, tld));
+ try {
+
dsReferences.add(new DeliveryServiceReference(ds.getId(), fqdn));
Review comment:
The alias-detecting condition was catching DNS DS URLs, fixed in
18f2f3a15. I am getting proper responses back for DNS DSes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]