Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D0ACE18C52 for ; Sat, 8 Aug 2015 08:30:45 +0000 (UTC) Received: (qmail 8030 invoked by uid 500); 8 Aug 2015 08:30:45 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 8008 invoked by uid 500); 8 Aug 2015 08:30:45 -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 7997 invoked by uid 99); 8 Aug 2015 08:30:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Aug 2015 08:30:45 +0000 Date: Sat, 8 Aug 2015 08:30:45 +0000 (UTC) From: =?utf-8?Q?Micha=C5=82_W=C4=99grzyn_=28JIRA=29?= To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-11501) HiveConnection.readOnly always throws a "Method not supported" exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-11501?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Micha=C5=82 W=C4=99grzyn updated HIVE-11501: ---------------------------------- Attachment: HIVE-11501.patch The patch fixes the issue by throwing only if the connection is closed or t= he request tries to change the default, disabled read-only mode. > HiveConnection.readOnly always throws a "Method not supported" exception > ------------------------------------------------------------------------ > > Key: HIVE-11501 > URL: https://issues.apache.org/jira/browse/HIVE-11501 > Project: Hive > Issue Type: Bug > Reporter: Micha=C5=82 W=C4=99grzyn > Assignee: Micha=C5=82 W=C4=99grzyn > Attachments: HIVE-11501.patch > > > HiveConnection.setReadOnly's automatically generated implementation alway= s throws a generic "Method not supported" exception and thus is not complia= nt with the JDBC spec. Per JDBC spec, an exception can be thrown only if th= e connection is closed, DB access error occurs or the method is called duri= ng a transaction (which is not a case for HiveConnection).=20 > JDBC spec does not say a word about not supporting the method by the driv= er. The most correct behavior could be to throw only if the request tries t= o enable the read-only mode (as HiveConnection.isReadOnly always returns fa= lse). > This issue is a blocker for JDBC connection pools (i.e. HikariCP) that ex= pect JDBC-compliant behavior from the driver. -- This message was sent by Atlassian JIRA (v6.3.4#6332)