Hive
  1. Hive
  2. HIVE-4580

Change DDLTask to report errors using canonical error messages rather than http status codes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: HCatalog
    • Labels:
      None

      Description

      org.apache.hadoop.hive.ql.exec.DDLTask handles DDL operations in Hive.
      Some operations (those exposed as REST API by Templeton) in this class, write a JSON object to stdout (on failure) which includes "error" and "errorCode" fields. "errorCode" is set to values like 404, 500, etc. i.e. Http Status codes. I believe this was done to support Templeton REST API. This is not the right place to introduce Http codes.

      DDLTask should use canonical error messages defined in org.apache.hadoop.hive.ql.ErrorMsg and propagate it up to HCatCli which can decide how to encode the error and to which stream. In particular it can create a parseable JSON object which Templeton can then interpret. JSON object can also be generated here for errors from the parser/resolver (e.g. trying to describe a table which doesn't exist).

      Then Templeton can map the canonical error code to appropriate Http Code.

      1. HIVE-4580.3.patch
        139 kB
        Eugene Koifman
      2. HIVE-4580.2.patch
        139 kB
        Eugene Koifman
      3. HIVE-4580.1.patch
        139 kB
        Eugene Koifman
      4. HIVE-4580.patch
        137 kB
        Eugene Koifman

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Eugene Koifman
              Reporter:
              Eugene Koifman
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 40h
                40h
                Remaining:
                Remaining Estimate - 40h
                40h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development