petersomogyi commented on pull request #4101:
URL: https://github.com/apache/hbase/pull/4101#issuecomment-1032827452
non-interactive mode with exception:
```
➜ hbase-upstream git:(HBASE-26741) ✗ bin/hbase shell -n commands.txt
2022-02-08T17:37:11,367 WARN [main] util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
hbase:001:0> scan 'foo'
ROW COLUMN+CELL
2022-02-08T17:37:17,679 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]
at
org.apache.hadoop.hbase.client.AsyncClientScanner.lambda$startScan$1(AsyncClientScanner.java:183)
~[hbase-client-3.0.0-alpha-3-SNAPSHOT.jar:3.0.0-alpha-3-SNAPSHOT]
[[[ cropped ]]]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Took 0.1307 seconds
ERROR RuntimeError: Unknown table foo!
➜ hbase-upstream git:(HBASE-26741) ✗ echo $?
1
```
non-interactive without exceptions and non-zero exit code:
```
➜ hbase-upstream git:(HBASE-26741) ✗ cat commands-ok.txt
scan 'hbase:meta'
exit 2
➜ hbase-upstream git:(HBASE-26741) ✗ bin/hbase shell -n commands-ok.txt
2022-02-08T17:41:08,845 WARN [main] util.NativeCodeLoader: Unable to load
native-hadoop library for your platform... using builtin-java classes where
applicable
hbase:001:0> scan 'hbase:meta'
ROW COLUMN+CELL
default column=ns:d,
timestamp=2022-02-08T17:34:31.881, value=\x0A\x07default
hbase column=ns:d,
timestamp=2022-02-08T17:34:31.889, value=\x0A\x05hbase
2 row(s)
Took 0.1263 seconds
hbase:002:0> exit 2
➜ hbase-upstream git:(HBASE-26741) ✗ echo $?
2
```
--
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]