petersomogyi commented on pull request #4101: URL: https://github.com/apache/hbase/pull/4101#issuecomment-1033865780
> what happens to stuff that comes from stdin in non-interactive mode? (in 2.2 and with this patch) Behaviour is identical. If a command throws an exception the shell does not quit and `exit` closes the shell. When `exit 2` is called the exit code is always 0 on 2.2 and with this patch. ``` ➜ hbase-2.2.7 bin/hbase shell 2022-02-09 16:06:25,663 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable HBase Shell Use "help" to get list of supported commands. Use "exit" to quit this interactive shell. For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell Version 2.2.7, r0fc18a9056e5eb3a80fdbde916865607946c5195, 2021年 04月 11日 星期日 19:24:57 CST Took 0.0022 seconds hbase(main):001:0> scan 'foo' ROW COLUMN+CELL ERROR: Unknown table foo! For usage try 'help "scan"' Took 0.2882 seconds hbase(main):002:0> exit ➜ hbase-2.2.7 echo $? 0 ``` ``` ➜ hbase-upstream git:(HBASE-26741) ✗ bin/hbase shell 2022-02-09T16:11:16,979 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable HBase Shell Use "help" to get list of supported commands. Use "exit" to quit this interactive shell. For Reference, please visit: http://hbase.apache.org/book.html#shell Version 3.0.0-alpha-3-SNAPSHOT, r938144db0616f2008eb16c3653977dc6db1883fd, Wed Feb 9 14:05:48 CET 2022 Took 0.0012 seconds hbase:001:0> scan 'foo' ROW COLUMN+CELL 2022-02-09T16:11:24,984 WARN [RPCClient-NioEventLoopGroup-1-2] client.AsyncNonMetaRegionLocator: Failed to locate region in 'foo', row='', locateType=CURRENT org.apache.hadoop.hbase.TableNotFoundException: foo at org.apache.hadoop.hbase.client.AsyncNonMetaRegionLocator$1.onComplete(AsyncNonMetaRegionLocator.java:503) ~[hbase-client-3.0.0-alpha-3-SNAPSHOT.jar:3.0.0-alpha-3-SNAPSHOT] [[[ LONG STACKTRACE ]]] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242] ERROR: Unknown table foo! For usage try 'help "scan"' Took 0.1283 seconds hbase:002:0> exit ➜ hbase-upstream git:(HBASE-26741) ✗ echo $? 0 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
