Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-7055 YARN Timeline Service v.2: beta 1
  3. YARN-8129

Improve error message for invalid value in fields attribute

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.10.0, 3.2.0, 3.0.4, 3.1.2
    • Component/s: ATSv2
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Query with invalid values for the 'fields' attributes throws a message that isn't very informative.
      Reader log,

      2018-04-09 08:59:46,069 INFO  reader.TimelineReaderWebServices (TimelineReaderWebServices.java:getEntities(595)) - Received URL /ws/v2/timeline/users/hrt_qa/flows/test_flow/apps?limit=3&fields=INFOS from user hrt_qa
      
      2018-04-09 08:59:46,070 INFO  reader.TimelineReaderWebServices (TimelineReaderWebServices.java:handleException(173)) - Processed URL /ws/v2/timeline/users/hrt_qa/flows/test_flow/apps?limit=3&fields=INFOS but encountered exception (Took 1 ms.)

      Here INFOS is the invalid value for the fields attribute.
      Response,

      {
        "exception": "BadRequestException",
        "message": "java.lang.Exception: No enum constant org.apache.hadoop.yarn.server.timelineservice.storage.TimelineReader.Field.INFOS",
        "javaClassName": "org.apache.hadoop.yarn.webapp.BadRequestException"
      }

      The message shouldn't ideally contain the enum information.

        Attachments

        1. YARN-8129.001.patch
          1 kB
          Abhishek Modi

          Activity

            People

            • Assignee:
              abmodi Abhishek Modi
              Reporter:
              charanh Charan Hebri
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: