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 0848C10C20 for ; Tue, 17 Sep 2013 18:25:26 +0000 (UTC) Received: (qmail 50807 invoked by uid 500); 17 Sep 2013 18:24:56 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 50720 invoked by uid 500); 17 Sep 2013 18:24:55 -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 50668 invoked by uid 99); 17 Sep 2013 18:24:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 18:24:53 +0000 Date: Tue, 17 Sep 2013 18:24:53 +0000 (UTC) From: "Francis Liu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9510) Namespace operations should throw clean exceptions 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-9510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769771#comment-13769771 ] Francis Liu commented on HBASE-9510: ------------------------------------ Thanks Stack. I had one more comment which could come as a follow-up. [~enis] Should we add an api to test wether a namespace exists? I'm not fond of having to catch an exception to test existence, it makes the code less readable. > Namespace operations should throw clean exceptions > -------------------------------------------------- > > Key: HBASE-9510 > URL: https://issues.apache.org/jira/browse/HBASE-9510 > Project: HBase > Issue Type: Bug > Components: master > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Fix For: 0.98.0, 0.96.0 > > Attachments: 9510v4.txt, 9510v4.txt, hbase-9510_v1.patch, hbase-9510_v2.patch, hbase-9510_v3.patch > > > Some of the namespace operations does not throw clean exceptions mimicking table exceptions (TableNotFoundException, etc). > For example: > {code} > hbase(main):007:0> describe_namespace 'non_existing_namespace' > ERROR: java.io.IOException > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2117) > at org.apache.hadoop.hbase.ipc.RpcServer$CallRunner.run(RpcServer.java:1816) > at org.apache.hadoop.hbase.ipc.SimpleRpcScheduler.consumerLoop(SimpleRpcScheduler.java:165) > at org.apache.hadoop.hbase.ipc.SimpleRpcScheduler.access$0(SimpleRpcScheduler.java:161) > at org.apache.hadoop.hbase.ipc.SimpleRpcScheduler$1.run(SimpleRpcScheduler.java:113) > at java.lang.Thread.run(Thread.java:680) > Caused by: java.lang.NullPointerException > at org.apache.hadoop.hbase.protobuf.ProtobufUtil.toProtoNamespaceDescriptor(ProtobufUtil.java:2138) > at org.apache.hadoop.hbase.master.HMaster.getNamespaceDescriptor(HMaster.java:3029) > at org.apache.hadoop.hbase.protobuf.generated.MasterAdminProtos$MasterAdminService$2.callBlockingMethod(MasterAdminProtos.java:32904) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2079) > ... 5 more > {code} > We can clean up the exceptions thrown from ns commands. -- 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