guangxuCheng commented on a change in pull request #535: KYLIN-3895 Failed to
register new MBean when "kylin.server.query-metrics-enabled" set true
URL: https://github.com/apache/kylin/pull/535#discussion_r268030613
##########
File path:
server-base/src/main/java/org/apache/kylin/rest/metrics/QueryMetricsFacade.java
##########
@@ -79,12 +79,11 @@ private static void updateMetricsToLocal(SQLRequest
sqlRequest, SQLResponse sqlR
return;
String projectName = sqlRequest.getProject();
- String cubeName = sqlResponse.getCube();
-
update(getQueryMetrics("Server_Total"), sqlResponse);
-
update(getQueryMetrics(projectName), sqlResponse);
+ String cube = sqlResponse.getCube();
+ String cubeName = cube.replace("=", "->");
Review comment:
The format of sqlResponse.getCube() is
"CUBE[name=KYLIN_HIVE_METRICS_JOB_QA]", the subname of cubeMetricName always
contains "=" which is not conform to the naming convention of mbean. Metrics2
has done a similar operation. See:
https://github.com/apache/kylin/blob/d9b028b24a0ad9ca09d4d4f1f6ee4de1e59ccd6a/server-base/src/main/java/org/apache/kylin/rest/metrics/QueryMetrics2Facade.java#L64
----------------------------------------------------------------
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]
With regards,
Apache Git Services