Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-14707

Hive view should return 400 (instead of 500) when the hive query cannot be compiled

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.2.1
    • ambari-views
    • None

    Description

      When user submit invalid hive query, hive view should return 400 response code (Bad request) instead of 500 (server error)

      Currently if invalid query is submitted, jobs url returns 500 response code:

      /api/v1/views/HIVE/versions/1.0.0/instances/AUTO_HIVE_INSTANCE/jobs

      11/18/2015 8:27:33 PM [qtp-client-68] ERROR org.apache.ambari.view.hive.utils.ServiceFormattedException - H110 Unable to submit statement. Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'OAD' 'DATA' 'INPATH' [ERROR_STATUS]
      11/18/2015 8:27:33 PM [qtp-client-68] ERROR org.apache.ambari.view.hive.utils.ServiceFormattedException - org.apache.ambari.view.hive.client.HiveErrorStatusException: H110 Unable to submit statement. Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'OAD' 'DATA' 'INPATH' [ERROR_STATUS]
      org.apache.ambari.view.hive.client.HiveErrorStatusException: H110 Unable to submit statement. Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'OAD' 'DATA' 'INPATH' [ERROR_STATUS]

      Attachments

        1. AMBARI-14707_branch-2.2.patch
          7 kB
          Gaurav Nagar
        2. AMBARI-14707.2_branch-2.1.2.patch
          8 kB
          Gaurav Nagar
        3. AMBARI-14707.2_branch-2.2.patch
          8 kB
          Gaurav Nagar

        Issue Links

          Activity

            People

              gnagar Gaurav Nagar
              gnagar Gaurav Nagar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: