trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [incubator-trafficcontrol] 35/36: Remove DEEP_CZ_MISS rtype from Traffic Router
Date Wed, 24 Jan 2018 17:23:44 GMT
This is an automated email from the ASF dual-hosted git repository.

elsloo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git

commit a63a07c630a6d08cf482422266698c26ed28cbea
Author: Rawlin Peters <rawlin_peters@comcast.com>
AuthorDate: Tue Jan 23 16:36:50 2018 -0700

    Remove DEEP_CZ_MISS rtype from Traffic Router
    
    Falling back to the regular CZ will be logged as CZ rather than
    DEEP_CZ_MISS.
---
 docs/source/admin/traffic_ops/using.rst            |  4 +--
 docs/source/admin/traffic_router.rst               | 36 ++++++++++------------
 .../traffic_router/core/router/StatTracker.java    | 12 +-------
 .../traffic_router/core/router/TrafficRouter.java  |  1 -
 .../traffic_router/core/external/StatsTest.java    |  4 +--
 5 files changed, 22 insertions(+), 35 deletions(-)

diff --git a/docs/source/admin/traffic_ops/using.rst b/docs/source/admin/traffic_ops/using.rst
index b11e20d..e7e8eb2 100644
--- a/docs/source/admin/traffic_ops/using.rst
+++ b/docs/source/admin/traffic_ops/using.rst
@@ -867,7 +867,7 @@ The Coverage Zone File (CZF) should contain a cachegroup name to network
prefix
           "192.168.8.0/24",
           "192.168.9.0/24"
         ]
-      }
+      },
       "cache-group-02": {
         "coordinates": {
           "latitude":  3.3,
@@ -916,7 +916,7 @@ The Deep Coverage Zone File (DCZF) format is similar to the CZF format
but adds
           "edge-01",
           "edge-02"
         ]
-      }
+      },
       "location-02": {
         "coordinates": {
           "latitude":  7.7,
diff --git a/docs/source/admin/traffic_router.rst b/docs/source/admin/traffic_router.rst
index 84b0f25..474dc96 100644
--- a/docs/source/admin/traffic_router.rst
+++ b/docs/source/admin/traffic_router.rst
@@ -187,23 +187,23 @@ Items within brackets below are detailed under the HTTP and DNS sections
 Fields Always Present
 ---------------------
 
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|Name  |Description                                                                     
|Data                                                                       |
-+======+=================================================================================+===========================================================================+
-|qtype |Whether the request was for DNS or HTTP                                         
|Always DNS or HTTP                                                         |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|chi   |The IP address of the requester                                                 
|Depends on whether this was a DNS or HTTP request, see below sections      |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|ttms  |The amount of time in milliseconds it took Traffic Router to process the request
|A number greater than or equal to zero                                     |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|rtype |Routing Result Type                                                             
|One of ERROR, CZ, GEO, MISS, STATIC_ROUTE, DS_REDIRECT, DS_MISS, INIT, FED |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|rloc  |GeoLocation of result                                                           
|Latitude and Longitude in Decimal Degrees                                  |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|rdtl  |Result Details Associated with unusual conditions                               
|One of DS_NOT_FOUND, DS_NO_BYPASS, DS_BYPASS, DS_CZ_ONLY                   |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
-|rerr  |Message about internal Traffic Router Error                                     
|String                                                                     |
-+------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------+
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|Name  |Description                                                                     
|Data                                                                                |
++======+=================================================================================+====================================================================================+
+|qtype |Whether the request was for DNS or HTTP                                         
|Always DNS or HTTP                                                                  |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|chi   |The IP address of the requester                                                 
|Depends on whether this was a DNS or HTTP request, see below sections               |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|ttms  |The amount of time in milliseconds it took Traffic Router to process the request
|A number greater than or equal to zero                                              |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|rtype |Routing Result Type                                                             
|One of ERROR, CZ, DEEP_CZ, GEO, MISS, STATIC_ROUTE, DS_REDIRECT, DS_MISS, INIT, FED |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|rloc  |GeoLocation of result                                                           
|Latitude and Longitude in Decimal Degrees                                           |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|rdtl  |Result Details Associated with unusual conditions                               
|One of DS_NOT_FOUND, DS_NO_BYPASS, DS_BYPASS, DS_CZ_ONLY                            |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
+|rerr  |Message about internal Traffic Router Error                                     
|String                                                                              |
++------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------+
 
 **rtype meanings**
 
@@ -216,8 +216,6 @@ Fields Always Present
 +-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |DEEP_CZ      |The result was derived from Deep Coverage Zone data based on the address in
the chi field                                                                            
  |
 +-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|DEEP_CZ_MISS |Traffic Router was unable to find a "deep" cache for the requested resource
but fell back to the regular Coverage Zone to derive a result based on the chi address   
  |
-+-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |GEO          |The result was derived from geolocation service based on the address in the
chi field                                                                                
  |
 +-------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |MISS         |Traffic Router was unable to resolve a DNS request or find a cache for the
requested resource                                                                       
   |
diff --git a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/StatTracker.java
b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/StatTracker.java
index 78e1772..b444cd8 100644
--- a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/StatTracker.java
+++ b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/StatTracker.java
@@ -50,12 +50,6 @@ public class StatTracker {
 		public void setDeepCzCount(final int deepCzCount) {
 			this.deepCzCount = deepCzCount;
 		}
-		public int getDeepCzMissCount() {
-			return deepCzMissCount;
-		}
-		public void setDeepCzMissCount(final int deepCzMissCount) {
-			this.deepCzMissCount = deepCzMissCount;
-		}
 		public int getDsrCount() {
 			return dsrCount;
 		}
@@ -102,7 +96,6 @@ public class StatTracker {
 		public int czCount;
 		public int geoCount;
 		public int deepCzCount;
-		public int deepCzMissCount;
 		public int missCount;
 		public int dsrCount;
 		public int errCount;
@@ -118,7 +111,7 @@ public class StatTracker {
 		}
 
 		public static enum ResultType {
-			ERROR, CZ, GEO, MISS, STATIC_ROUTE, DS_REDIRECT, DS_MISS, INIT, FED, RGDENY, RGALT, GEO_REDIRECT,
DEEP_CZ, DEEP_CZ_MISS
+			ERROR, CZ, GEO, MISS, STATIC_ROUTE, DS_REDIRECT, DS_MISS, INIT, FED, RGDENY, RGALT, GEO_REDIRECT,
DEEP_CZ
 		}
 
 		public enum ResultDetails {
@@ -291,9 +284,6 @@ public class StatTracker {
 		case DEEP_CZ:
 			tallies.deepCzCount++;
 			break;
-		case DEEP_CZ_MISS:
-			tallies.deepCzMissCount++;
-			break;
 		case MISS:
 			tallies.missCount++;
 			break;
diff --git a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
index 8037497..bb1dbb5 100644
--- a/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
+++ b/traffic_router/core/src/main/java/com/comcast/cdn/traffic_control/traffic_router/core/router/TrafficRouter.java
@@ -257,7 +257,6 @@ public class TrafficRouter {
 				result = ResultType.DEEP_CZ;
 			} else {
 				// No deep caches for this client, would have used them if there were any. Fallback to
regular CZ
-				result = ResultType.DEEP_CZ_MISS;
 				cacheLocation = getCoverageZoneCacheLocation(request.getClientIP(), ds);
 			}
 		} else {
diff --git a/traffic_router/core/src/test/java/com/comcast/cdn/traffic_control/traffic_router/core/external/StatsTest.java
b/traffic_router/core/src/test/java/com/comcast/cdn/traffic_control/traffic_router/core/external/StatsTest.java
index 97674ab..b68b43b 100644
--- a/traffic_router/core/src/test/java/com/comcast/cdn/traffic_control/traffic_router/core/external/StatsTest.java
+++ b/traffic_router/core/src/test/java/com/comcast/cdn/traffic_control/traffic_router/core/external/StatsTest.java
@@ -85,12 +85,12 @@ public class StatsTest {
 			Map<String, Object> dnsStats = (Map<String, Object>) statsData.get("dnsMap");
 			Map<String, Object> cacheDnsStats = (Map<String, Object>) dnsStats.values().iterator().next();
 			assertThat(cacheDnsStats.keySet(), containsInAnyOrder("czCount", "geoCount", "missCount",
"dsrCount", "errCount",
-					"deepCzCount", "deepCzMissCount", "staticRouteCount", "fedCount", "regionalDeniedCount",
"regionalAlternateCount"));
+					"deepCzCount", "staticRouteCount", "fedCount", "regionalDeniedCount", "regionalAlternateCount"));
 
 			Map<String, Object> httpStats = (Map<String, Object>) statsData.get("httpMap");
 			Map<String, Object> cacheHttpStats = (Map<String, Object>) httpStats.values().iterator().next();
 			assertThat(cacheHttpStats.keySet(), containsInAnyOrder("czCount", "geoCount", "missCount",
"dsrCount", "errCount",
-					"deepCzCount", "deepCzMissCount", "staticRouteCount", "fedCount", "regionalDeniedCount",
"regionalAlternateCount"));
+					"deepCzCount", "staticRouteCount", "fedCount", "regionalDeniedCount", "regionalAlternateCount"));
 
 			Map<String, Object> updateTracker = (Map<String, Object>) statsData.get("updateTracker");
 			Set<String> keys = updateTracker.keySet();

-- 
To stop receiving notification emails like this one, please contact
elsloo@apache.org.

Mime
View raw message