Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-561 Integrate Oozie with HCatalog
  3. OOZIE-1141

Escaping Ampersand in the HCat URI to bypass XML validation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None

    Description

      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 "&" 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.

      Attachments

        Issue Links

          Activity

            People

              rohini Rohini Palaniswamy
              chitnis Mona Chitnis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: