Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-15209

Web UI's timeline visualizations fails to render if descriptions contain single quotes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.1, 2.0.0
    • 1.6.2, 2.0.0
    • Web UI
    • None

    Description

      If a Spark job's job description contains a single quote (') then the driver UI's job event timeline will fail to render due to Javascript errors. To reproduce these symptoms, run

      sc.setJobDescription("double quote: \" ")
      sc.parallelize(1 to 10).count()
      
      sc.setJobDescription("single quote: ' ")
      sc.parallelize(1 to 10).count() 
      

      and browse to the driver UI. This will currently result in an "Uncaught SyntaxError" because the single quote is not escaped and ends up closing a Javascript string literal too early.

      I think that a simple fix may be to change the relevant JS to use double quotes and then to use the existing XML escaping logic to escape the string's contents.

      Attachments

        Activity

          People

            joshrosen Josh Rosen
            joshrosen Josh Rosen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: