Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77574C5A5 for ; Wed, 19 Jun 2013 22:28:22 +0000 (UTC) Received: (qmail 39295 invoked by uid 500); 19 Jun 2013 22:28:21 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 39218 invoked by uid 500); 19 Jun 2013 22:28:21 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 39144 invoked by uid 500); 19 Jun 2013 22:28:21 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 39112 invoked by uid 99); 19 Jun 2013 22:28:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jun 2013 22:28:21 +0000 Date: Wed, 19 Jun 2013 22:28:21 +0000 (UTC) From: "Eugene Koifman (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-4580) Change DDLTask to report errors using canonical error messages rather than http status codes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eugene Koifman updated HIVE-4580: --------------------------------- Status: Patch Available (was: Open) > Change DDLTask to report errors using canonical error messages rather than http status codes > -------------------------------------------------------------------------------------------- > > Key: HIVE-4580 > URL: https://issues.apache.org/jira/browse/HIVE-4580 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 0.11.0 > Reporter: Eugene Koifman > Assignee: Eugene Koifman > Fix For: 0.12.0 > > Attachments: HIVE-4580.1.patch, HIVE-4580.patch > > Original Estimate: 40h > Remaining Estimate: 40h > > 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. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira