Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8D081149B for ; Sat, 17 May 2014 00:42:27 +0000 (UTC) Received: (qmail 5936 invoked by uid 500); 16 May 2014 23:42:09 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 154 invoked by uid 500); 16 May 2014 23:42:02 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 96851 invoked by uid 99); 16 May 2014 23:36:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 May 2014 23:36:15 +0000 Date: Fri, 16 May 2014 23:36:15 +0000 (UTC) From: "Jimmy Xiang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7623) Username is not available for HConnectionManager to use in HConnectionKey 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/HBASE-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14000498#comment-14000498 ] Jimmy Xiang commented on HBASE-7623: ------------------------------------ Your code snippet should work. Is security enabled in the HBase server side? > Username is not available for HConnectionManager to use in HConnectionKey > ------------------------------------------------------------------------- > > Key: HBASE-7623 > URL: https://issues.apache.org/jira/browse/HBASE-7623 > Project: HBase > Issue Type: Improvement > Components: Client, security > Reporter: Jimmy Xiang > Assignee: Jimmy Xiang > Priority: Minor > Attachments: pom.xml, trunk-7623.patch, yogesh_bedekar.vcf, yogesh_bedekar.vcf, yogesh_bedekar.vcf > > > Sometimes, some non-IOException prevents User.getCurrent() to get a username. It makes it impossible to create a HConnection. We should catch all exception here: > {noformat} > try { > User currentUser = User.getCurrent(); > if (currentUser != null) { > username = currentUser.getName(); > } > } catch (IOException ioe) { > LOG.warn("Error obtaining current user, skipping username in HConnectionKey", > ioe); > } > {noformat} > Not just IOException, so that client can move forward. -- This message was sent by Atlassian JIRA (v6.2#6252)