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 18C9918197 for ; Sat, 18 Jul 2015 02:16:05 +0000 (UTC) Received: (qmail 77541 invoked by uid 500); 18 Jul 2015 02:16:04 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 77469 invoked by uid 500); 18 Jul 2015 02:16:04 -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 77172 invoked by uid 99); 18 Jul 2015 02:16:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jul 2015 02:16:04 +0000 Date: Sat, 18 Jul 2015 02:16:04 +0000 (UTC) From: "Apekshit Sharma (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-14119) Show error message instead of stack traces in hbase shell commands 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-14119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632221#comment-14632221 ] Apekshit Sharma commented on HBASE-14119: ----------------------------------------- patch attached. > Show error message instead of stack traces in hbase shell commands > ------------------------------------------------------------------ > > Key: HBASE-14119 > URL: https://issues.apache.org/jira/browse/HBASE-14119 > Project: HBase > Issue Type: Bug > Reporter: Apekshit Sharma > Assignee: Apekshit Sharma > Priority: Minor > Attachments: HBASE-14119.patch > > > This isn't really a functional bug, just more about erroring out cleanly. > * the shell commands assign, move, unassign and merge_region can throw the following error if given an invalid argument: > {noformat} > hbase(main):032:0> unassign 'adsfdsafdsa' > ERROR: org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.hbase.UnknownRegionException: adsfdsafdsa > at org.apache.hadoop.hbase.master.HMaster.unassign(HMaster.java:1562) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:364) > at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1336) > Here is some help for this command: > Unassign a region. Unassign will close region in current location and then > reopen it again. Pass 'true' to force the unassignment ('force' will clear > all in-memory state in master before the reassign. If results in > double assignment use hbck -fix to resolve. To be used by experts). > Use with caution. For expert use only. Examples: > hbase> unassign 'REGIONNAME' > hbase> unassign 'REGIONNAME', true > hbase(main):033:0> > {noformat} > * drop_namespace, describe_namespace throw stack trace too. > {noformat} > hbase(main):002:0> drop_namespace "SDf" > ERROR: org.apache.hadoop.hbase.NamespaceNotFoundException: SDf > at org.apache.hadoop.hbase.master.TableNamespaceManager.remove(TableNamespaceManager.java:175) > at org.apache.hadoop.hbase.master.HMaster.deleteNamespace(HMaster.java:2119) > at org.apache.hadoop.hbase.master.MasterRpcServices.deleteNamespace(MasterRpcServices.java:430) > at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:44279) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2035) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107) > at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130) > at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107) > at java.lang.Thread.run(Thread.java:745) > Here is some help for this command: > Drop the named namespace. The namespace must be empty. > {noformat} > * fix error message in close_region > {noformat} > hbase(main):007:0> close_region "sdf" > ERROR: sdf > {noformat} > * delete_snapshot throws exception too. > {noformat} > ERROR: org.apache.hadoop.hbase.snapshot.SnapshotDoesNotExistException: Snapshot 'sdf' doesn't exist on the filesystem > at org.apache.hadoop.hbase.master.snapshot.SnapshotManager.deleteSnapshot(SnapshotManager.java:270) > at org.apache.hadoop.hbase.master.MasterRpcServices.deleteSnapshot(MasterRpcServices.java:452) > at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:44261) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2035) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107) > at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130) > at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107) > at java.lang.Thread.run(Thread.java:745) > Here is some help for this command: > Delete a specified snapshot. Examples: > hbase> delete_snapshot 'snapshotName', > {noformat} > other commands, when given bogus arguments, tend to fail cleanly and not leave stacktrace in the output. -- This message was sent by Atlassian JIRA (v6.3.4#6332)