Chelsyx has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371980 )
Change subject: Breakdown search API requests by referer class and use GetSearchRequestTypeUDF ...................................................................... Breakdown search API requests by referer class and use GetSearchRequestTypeUDF Please do not merge this patch since the new UDF hasn’t been released to production. Bug: T172452 Change-Id: Ia4aa5260fe243abeced91c67de8f44bdc9be859b --- M modules/metrics/search/search_api_usage 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden refs/changes/80/371980/1 diff --git a/modules/metrics/search/search_api_usage b/modules/metrics/search/search_api_usage index a0b1b7c..f9de476 100755 --- a/modules/metrics/search/search_api_usage +++ b/modules/metrics/search/search_api_usage @@ -1,11 +1,12 @@ #!/bin/bash hive -S -e "ADD JAR hdfs:///wmf/refinery/current/artifacts/refinery-hive.jar; -CREATE TEMPORARY FUNCTION search_classify AS 'org.wikimedia.analytics.refinery.hive.SearchClassifierUDF'; +CREATE TEMPORARY FUNCTION search_classify AS 'org.wikimedia.analytics.refinery.hive.GetSearchRequestTypeUDF'; USE wmf; SELECT '$1' AS date, search_classify(uri_path, uri_query) AS api, + referer_class, COUNT(*) AS calls FROM webrequest WHERE @@ -13,6 +14,6 @@ AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) >= '$1' AND CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) < '$2' AND http_status = '200' - AND search_classify(uri_path, uri_query) IN('language', 'cirrus', 'prefix', 'geo', 'open') -GROUP BY '$1', search_classify(uri_path, uri_query); + AND search_classify(uri_path, uri_query) IN('language', 'cirrus', 'cirrus (more like)', 'prefix', 'geo', 'open') +GROUP BY '$1', search_classify(uri_path, uri_query), referer_class; " 2> /dev/null | grep -v parquet.hadoop | grep -v WARN: -- To view, visit https://gerrit.wikimedia.org/r/371980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia4aa5260fe243abeced91c67de8f44bdc9be859b Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/golden Gerrit-Branch: master Gerrit-Owner: Chelsyx <c...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits