Mona Chitnis created OOZIE-1141:
-----------------------------------

             Summary: Escaping Ampersand in HCatURI to bypass XML validation
                 Key: OOZIE-1141
                 URL: https://issues.apache.org/jira/browse/OOZIE-1141
             Project: Oozie
          Issue Type: Sub-task
            Reporter: Mona Chitnis
            Assignee: Mona Chitnis


Uncovered during end-to-end testing. In an HCat URI like this
hcat://<server>:<port>/db/table/partition1=abc&partition2=xyz, the '&' between 
the partition key-value pairs, fails XML validation. It needs to be escaped - 
but keeping in mind
1. HCat URIs are stored as missing dependencies in database. Each time they are 
retrieved, the logic needs to check for the escaping (very frequent and 
increases overhead)
2. When displaying back to the user his missing dependencies, the original 
unescaped URI should be shown.

Alternatives for approach:
1. Asking the user to use the encoded string "&amp;" in his URI-template is a 
usability-killer.
2. The other alternative is to use some other separator instead of ampersand, 
which does not conflict existing separators in Oozie, such as colon (:), but it 
is highly non-intuitive in a URI

Therefore to me, the lesser of two evils seems to do escape logic during XML 
validation, storing separator as something else internally for db retrievals, 
and again showing original '&' for display to user.

Please provide your thoughts.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to