Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B7B57200AE3 for ; Wed, 4 May 2016 10:04:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B64471609FE; Wed, 4 May 2016 10:04:14 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 092F41609FD for ; Wed, 4 May 2016 10:04:13 +0200 (CEST) Received: (qmail 19628 invoked by uid 500); 4 May 2016 08:04:13 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 19619 invoked by uid 99); 4 May 2016 08:04:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 08:04:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CD22C2C14F9 for ; Wed, 4 May 2016 08:04:12 +0000 (UTC) Date: Wed, 4 May 2016 08:04:12 +0000 (UTC) From: "Hari Sankar Sivarama Subramaniyan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-13608) We should provide better error message while constraints with duplicate names are created MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 May 2016 08:04:14 -0000 [ https://issues.apache.org/jira/browse/HIVE-13608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15270289#comment-15270289 ] Hari Sankar Sivarama Subramaniyan commented on HIVE-13608: ---------------------------------------------------------- [~ashutoshc] I looked at this option. I am a +0 for this idea of parsing the error message to see if it matches some string and prevent the retry altogether. {code} else if ((t instanceof MetaException) && t.getMessage().matches( "(?s).*(JDO[a-zA-Z]*|TProtocol|TTransport)Exception.*")) { caughtException = (MetaException)t; } {code} This can make the man-in-the-middle attack scenario with the current system worse. I realize why the above code was added in the first place to tackle JDO*/T* exceptions which are unrecoverable otherwise, but still this whole thing is hacky and adding more parsing messages here will worsen the existing code. For practical purpose, the change you mentioned should be ok and I can upload the patch, but as I said, this is something that needs to be revisited to increase the security of the product. Thanks Hari > We should provide better error message while constraints with duplicate names are created > ----------------------------------------------------------------------------------------- > > Key: HIVE-13608 > URL: https://issues.apache.org/jira/browse/HIVE-13608 > Project: Hive > Issue Type: Bug > Reporter: Hari Sankar Sivarama Subramaniyan > Assignee: Hari Sankar Sivarama Subramaniyan > Attachments: HIVE-13608.1.patch > > > {code} > PREHOOK: query: create table t1(x int, constraint pk1 primary key (x) disable novalidate) > PREHOOK: type: CREATETABLE > PREHOOK: Output: database:default > PREHOOK: Output: default@t1 > POSTHOOK: query: create table t1(x int, constraint pk1 primary key (x) disable novalidate) > POSTHOOK: type: CREATETABLE > POSTHOOK: Output: database:default > POSTHOOK: Output: default@t1 > PREHOOK: query: create table t2(x int, constraint pk1 primary key (x) disable novalidate) > PREHOOK: type: CREATETABLE > PREHOOK: Output: database:default > PREHOOK: Output: default@t2 > FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.) > {code} > In the above case, it seems like useful error message is lost. It looks like a generic problem with metastore server/client exception handling and message propagation. Seems like exception parsing logic of RetryingMetaStoreClient::invoke() needs to be updated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)