You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hudson (Jira)" <ji...@apache.org> on 2020/10/15 10:37:00 UTC

[jira] [Commented] (HBASE-11686) Shell code should create a binding / irb workspace instead of polluting the root namespace

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

Hudson commented on HBASE-11686:
--------------------------------

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

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




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


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


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


(x) {color:red}-1 source release artifact{color}
-- See build output for details.


(x) {color:red}-1 client integration test{color}
-- Something went wrong with this stage, [check relevant console output|https://ci-hadoop.apache.org/job/HBase/job/HBase%20Nightly/job/branch-2/77//console].


> Shell code should create a binding / irb workspace instead of polluting the root namespace
> ------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11686
>                 URL: https://issues.apache.org/jira/browse/HBASE-11686
>             Project: HBase
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Sean Busbey
>            Assignee: Elliot Miller
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1, 2.4.0
>
>
> Right now, the shell builds a list of commands and then injects them into the root exectution's context
> bin/hirb.rb
> {code}
> # Add commands to this namespace
> @shell.export_commands(self)
> {code}
> hbase-shell/src/main/ruby/shell.rb
> {code}
>     def export_commands(where)
>       ::Shell.commands.keys.each do |cmd|
>         # here where is the IRB namespace
>         # this method just adds the call to the specified command
>         # which just references back to 'this' shell object
>         # a decently extensible way to add commands
>         where.send :instance_eval, <<-EOF
>           def #{cmd}(*args)
>             ret = @shell.command('#{cmd}', *args)
>             puts
>             return ret
>           end
>         EOF
>       end
>     end
> {code}
> This is an unclean abstraction. For one, it requires that there be an instance variable in the main namespace called '@shell' without making that clear in the docs. Additionally, it complicates maintenance by breaking isolation.
> We should update things so that shell can provide a binding for eval or a workspace for IRB execution and then use it directly when we construct our IRB session.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)