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 2078810F8B for ; Wed, 21 Jan 2015 22:53:35 +0000 (UTC) Received: (qmail 95230 invoked by uid 500); 21 Jan 2015 22:53:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 95162 invoked by uid 500); 21 Jan 2015 22:53:34 -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 95151 invoked by uid 500); 21 Jan 2015 22:53:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 95148 invoked by uid 99); 21 Jan 2015 22:53:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jan 2015 22:53:34 +0000 Date: Wed, 21 Jan 2015 22:53:34 +0000 (UTC) From: "Thejas M Nair (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9436) RetryingMetaStoreClient does not retry JDOExceptions 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-9436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14286475#comment-14286475 ] Thejas M Nair commented on HIVE-9436: ------------------------------------- +1 > RetryingMetaStoreClient does not retry JDOExceptions > ---------------------------------------------------- > > Key: HIVE-9436 > URL: https://issues.apache.org/jira/browse/HIVE-9436 > Project: Hive > Issue Type: Bug > Affects Versions: 0.14.0, 0.13.1 > Reporter: Sushanth Sowmyan > Assignee: Sushanth Sowmyan > Attachments: HIVE-9436.patch > > > RetryingMetaStoreClient has a bug in the following bit of code: > {code} > } else if ((e.getCause() instanceof MetaException) && > e.getCause().getMessage().matches("JDO[a-zA-Z]*Exception")) { > caughtException = (MetaException) e.getCause(); > } else { > throw e.getCause(); > } > {code} > The bug here is that java String.matches matches the entire string to the regex, and thus, that match will fail if the message contains anything before or after JDO[a-zA-Z]\*Exception. The solution, however, is very simple, we should match .\*JDO[a-zA-Z]\*Exception.\* -- This message was sent by Atlassian JIRA (v6.3.4#6332)