-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24468/
-----------------------------------------------------------

Review request for Ambari, Nate Cole and Sid Wagle.


Bugs: AMBARI-6780
    https://issues.apache.org/jira/browse/AMBARI-6780


Repository: ambari


Description
-------

The heart of the problem was the metrics regex and matching. Things that were 
being done wrong:
- Creating categories from a given property ID (incorrect category creation 
when regex/methods were present)
- Searching using startsWith or contains(...) when a regular expression was 
needed
- Not matching all potential subproperties when retrieving the metrics to 
request

We never saw these issues in YARN because of:
- There were no metrics with the same name defined both with and without 
regular expressions
- Luck; the patterns being matched on appears first, and thus the 
startsWith(...) was working

We're building the correct categories now, and turning those categories into 
regex that will match on what's in the JSON files.

NOTE: the change to ServiceConfigVersionResourceDefinition was a spelling 
correctly that's been bothering me (cenfigurations).


Diffs
-----

  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceConfigVersionResourceDefinition.java
 a907166 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractPropertyProvider.java
 542567f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java
 f31ed7a 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
 00efa1a 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseProviderTest.java
 c8fcf70 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/PropertyHelperTest.java
 6380d4e 

Diff: https://reviews.apache.org/r/24468/diff/


Testing
-------

Verified that metrics that would be affected (YARN and FLUME) both work. 
Updated test cases to account for the change in propertyId/categories and wrote 
a new test that covers the more complex metrics that were throwing off the 
regex.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16:47.532s
[INFO] Finished at: Thu Aug 07 16:41:59 EDT 2014
[INFO] Final Memory: 21M/207M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley

Reply via email to