petersomogyi commented on pull request #4101:
URL: https://github.com/apache/hbase/pull/4101#issuecomment-1033872009


   > what happens to stuff that comes from stdin in non-interactive mode? (in 
2.2 and with this patch)
   
   The behavior is identical. Both quits on exceptions with exit code 1.
   The formatting is different because on master we have the hbase shell prompt 
and the stack trace.
   
   ```
   ➜  hbase-2.2.7 bin/hbase shell -n
   2022-02-09 16:14:26,755 WARN  [main] util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   scan 'foo'
   ROW                                  COLUMN+CELL
   Took 0.3674 seconds                                                          
                                                               ERROR 
RuntimeError: Unknown table foo!
   ➜  hbase-2.2.7 echo $?
   1
   ```
   
   ```
   ➜  hbase-upstream git:(HBASE-26741) ✗ bin/hbase shell -n
   2022-02-09T16:13:30,894 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-09T16:13:41,173 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]
   Took 0.1328 seconds                                                          
                                                                                
                                                       RuntimeError: Unknown 
table foo!
     translate_hbase_exceptions at 
/Users/petersomogyi/projects/hbase-upstream/hbase-shell/src/main/ruby/shell/commands.rb:130
                   command_safe at 
/Users/petersomogyi/projects/hbase-upstream/hbase-shell/src/main/ruby/shell/commands.rb:49
               internal_command at uri:classloader:/shell.rb:211
                        command at uri:classloader:/shell.rb:203
                           scan at uri:classloader:/shell.rb:166
                       evaluate at (hbase):1
                           eval at org/jruby/RubyKernel.java:1048
                       evaluate at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/workspace.rb:85
                       evaluate at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/context.rb:380
                     eval_input at 
/Users/petersomogyi/projects/hbase-upstream/hbase-shell/src/main/ruby/irb/hirb.rb:112
                  signal_status at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb:623
                     eval_input at 
/Users/petersomogyi/projects/hbase-upstream/hbase-shell/src/main/ruby/irb/hirb.rb:109
       each_top_level_statement at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/ruby-lex.rb:246
                           loop at org/jruby/RubyKernel.java:1442
       each_top_level_statement at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/ruby-lex.rb:232
                          catch at org/jruby/RubyKernel.java:1189
       each_top_level_statement at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb/ruby-lex.rb:231
                     eval_input at 
/Users/petersomogyi/projects/hbase-upstream/hbase-shell/src/main/ruby/irb/hirb.rb:108
                            run at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb:428
                          catch at org/jruby/RubyKernel.java:1189
                            run at 
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/irb.rb:427
                         <main> at 
/Users/petersomogyi/projects/hbase-upstream/bin/../hbase-shell/src/main/ruby/jar-bootstrap.rb:223
   ➜  hbase-upstream git:(HBASE-26741) ✗ echo $?
   1
   ```


-- 
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]


Reply via email to