[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-10 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17490628#comment-17490628
 ] 

Hudson commented on HBASE-26741:


Results for branch master
[build #515 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/515/]: 
(x) *{color:red}-1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/515/General_20Nightly_20Build_20Report/]






(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/515/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/515/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Assignee: Peter Somogyi
>Priority: Critical
> Fix For: 2.5.0, 3.0.0-alpha-3, 2.4.10
>
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-10 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17490613#comment-17490613
 ] 

Hudson commented on HBASE-26741:


Results for branch branch-2.5
[build #46 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/46/]: 
(x) *{color:red}-1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/46/General_20Nightly_20Build_20Report/]




(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/46/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/46/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/46/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Assignee: Peter Somogyi
>Priority: Critical
> Fix For: 2.5.0, 3.0.0-alpha-3, 2.4.10
>
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-10 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17490598#comment-17490598
 ] 

Hudson commented on HBASE-26741:


Results for branch branch-2.4
[build #286 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/286/]:
 (x) *{color:red}-1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/286/General_20Nightly_20Build_20Report/]




(/) {color:green}+1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/286/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/286/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.4/286/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Assignee: Peter Somogyi
>Priority: Critical
> Fix For: 2.5.0, 3.0.0-alpha-3, 2.4.10
>
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-10 Thread Hudson (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17490594#comment-17490594
 ] 

Hudson commented on HBASE-26741:


Results for branch branch-2
[build #462 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/462/]: 
(x) *{color:red}-1 overall{color}*

details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/462/General_20Nightly_20Build_20Report/]




(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/462/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]


(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/462/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2/462/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Assignee: Peter Somogyi
>Priority: Critical
> Fix For: 2.5.0, 3.0.0-alpha-3, 2.4.10
>
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-08 Thread Peter Somogyi (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17488929#comment-17488929
 ] 

Peter Somogyi commented on HBASE-26741:
---

The problem is in Irb::eval_input method. This method has its own exception 
handling logic so the thrown exceptions are caught there and not in the 
Shell:exception_handler method. This behavior change was introduced by 
stitching to IRB.run from @shell.eval_io in HBASE-26469.

One solution I managed to find is to override the Irb::eval_input method in 
HIRB and in {{rescue Exception}} call \{{raise}. This throws the exception and 
HBase's custom exception handling logic could be invoked.

> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Priority: Critical
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (HBASE-26741) Incorrect exception handling in shell

2022-02-08 Thread Peter Somogyi (Jira)


[ 
https://issues.apache.org/jira/browse/HBASE-26741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17488807#comment-17488807
 ] 

Peter Somogyi commented on HBASE-26741:
---

The thrown exception is not caught in the 
[exception_handler|https://github.com/apache/hbase/blob/branch-2.4/hbase-shell/src/main/ruby/shell.rb#L329-L351]
 method when the commands are called via 
[IRB::HBaseLoader.file_for_load(script2run)).run|#L212]]. I think that is the 
expected behavior of the run command and I'm not able to find any option to 
force the exception to be thrown.

[~busbey], [~mdrob]: Do you have any idea how this could be solved?

> Incorrect exception handling in shell
> -
>
> Key: HBASE-26741
> URL: https://issues.apache.org/jira/browse/HBASE-26741
> Project: HBase
>  Issue Type: Bug
>  Components: shell
>Affects Versions: 2.5.0, 3.0.0-alpha-2, 2.4.10
>Reporter: Peter Somogyi
>Priority: Critical
>
> The exception handling changed in the shell compared to 2.2.
> {noformat}
> ➜  hbase-upstream git:(branch-2.4) ✗ cat commands.txt
> scan 'foo'
> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ bin/hbase shell -n commands.txt
> 2022-02-07 16:21:33,654 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
> Took 0.3890 seconds   
>   Traceback (most 
> recent call last):
> RuntimeError (Unknown table foo!)
> hbase:002:0> exit
> ➜  hbase-upstream git:(branch-2.4) ✗ echo $?
> 0 {noformat}
> The execution continues even after an exception is thrown. In 2.2.7 the 
> execution stops when an exception is thrown and the shell exits with error 
> code.
> {noformat}
> ➜  hbase-2.2.7 bin/hbase shell -n commands.txt
> 2022-02-07 16:33:54,930 WARN  [main] util.NativeCodeLoader: Unable to load 
> native-hadoop library for your platform... using builtin-java classes where 
> applicable
> ROW                                  COLUMN+CELL
> Took 0.3082 seconds                                                           
>                                                               RuntimeError: 
> Unknown table foo!
>   translate_hbase_exceptions at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:130
>                 command_safe at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell/commands.rb:49
>             internal_command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:148
>                      command at 
> /Users/petersomogyi/tmp/hbase-2.2.7/lib/ruby/shell.rb:140
>                         scan at (eval):2
>                        at commands.txt:1
>                         load at org/jruby/RubyKernel.java:973
>                        at 
> /Users/petersomogyi/tmp/hbase-2.2.7/bin/../bin/hirb.rb:186
> ➜  hbase-2.2.7 echo $?
> 1 {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)