Uploaded image for project: 'Chukwa'
  1. Chukwa
  2. CHUKWA-463

Improve pattern for getTag() method

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Data Processors
    • Labels:
      None

      Description

      The current pattern used for extracting tags from the tags field:

      Pattern tagPattern = Pattern.compile("."tagName"=\"(.?)\".*");

      Doesn't work very well. If you pass tagName "bar", will also match (and return) the content of foobar="dssad" tag.

      The proposed path is more correct, and also faster than using .*

        Attachments

        1. fixpat.patch
          0.6 kB
          Ari Rabkin
        2. improve_tags_pattern.diff
          0.8 kB
          Guille -bisho-
        3. improve_tags_pattern-v2.diff
          0.9 kB
          Guille -bisho-

          Activity

            People

            • Assignee:
              asrabkin Ari Rabkin
              Reporter:
              bisho Guille -bisho-
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: