Bug 1091128
| Summary: | ObjectNameQueryUtility does not support query of partial value match query | ||
|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> |
| Component: | Plugin Container | Assignee: | Nobody <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.9 | CC: | hrupp, jshaughn |
| Target Milestone: | --- | ||
| Target Release: | RHQ 4.13 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Merged in master f0a5cc74233f7e1ddf052e98834f80c238575b9d Thanks Elias I have backed this out, as it contained unforseen side effects with the as4 plugin namely key-values of "name=*" are producing errors on as4. This may be a bug in the as4 (more specific eap4.3) mbean server, but needs to be addressed somehow e5f22a889fc6e8492 |
Description of problem: Hadoop (CDH4) has ObjectNames like this: Hadoop:name=IPCLoggerChannel-127.0.0.1-234,service=NameNode Unfortunately, to query, this syntax is not currently supported: <c:simple-property name="objectName" default="Hadoop:name=IPCLoggerChannel-%addr%,service=NameNode" /> The solution is to allow %key% to appear within an attribute value, not as the entire value. The changes are probably supportable in ObjectNameQueryUtility itself. private void buildMatchMap(String objectNameQueryTemplate) { ... for (String key : keys) { Pattern p2 = Pattern.compile("^([^=]*)=\\%(.*)\\%$"); Matcher m2 = p2.matcher(key); maybe change to: Pattern p2 = Pattern.compile("^([^=]*)=(.*\\%(.*)\\%.*)$"); etc.