You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Xiang Li (JIRA)" <ji...@apache.org> on 2017/05/01 11:27:04 UTC

[jira] [Commented] (HBASE-15199) Move jruby jar so only on hbase-shell module classpath; currently globally available

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

Xiang Li commented on HBASE-15199:
----------------------------------

Updated patch 002 for master branch to address [~busbey]'s comments!

The logic with the patch is  
(1) if JRUBY_HOME is defined, CLASSPATH is updated according to JRUBY_HOME defined
(2) if JRUBY_HOME is not defined, check if the command issued belongs to a pre-defined command set (currently it contains shell and org.jruby.Main). 
A. if yes, add jruby jar packaged with HBase into CLASSPATH
B. if no,   do nothing

There is a behavior change when comparing with original logic(without the patch)
(1) without the patch, JRUBY_HOME and JRUBY_OPTS only takes effect when "hbase shell", that is, it does not take effect when "hbase org.jruby.Main xxx.rb“. It is a bug I believe
(2) with the patch, JRUBY_HOME takes effect, for all commands, as long as it is specified. When JRUBY_HOME is specified, the jruby-complete jar packaged with HBase will be ignored.

Make any sense to you? [~busbey], [~stack], [~jinghe]

> Move jruby jar so only on hbase-shell module classpath; currently globally available
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-15199
>                 URL: https://issues.apache.org/jira/browse/HBASE-15199
>             Project: HBase
>          Issue Type: Task
>          Components: dependencies, jruby, shell
>            Reporter: stack
>            Assignee: Xiang Li
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: 15199.txt, HBASE-15199.master.001.patch, HBASE-15199.master.002.patch
>
>
> A suggestion that came up out of internal issue (filed by Mr Jan Van Besien) was to move the scope of the jruby include down so it is only a dependency for the hbase-shell. jruby jar brings in a bunch of dependencies (joda time for example) which can clash with the includes of others. Our Sean suggests that could be good to shut down exploit possibilities if jruby was not globally available. Only downside I can think is that it may no longer be available to our bin/*rb scripts if we move the jar but perhaps these can be changed so they can find the ruby jar in new location.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)