Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-5245

HBase shell should use alternate jruby if JRUBY_HOME is set, should pass along JRUBY_OPTS

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.90.4
    • None
    • shell
    • None
    • Hide
      Can now specify an alternative jruby by setting the JRUBY_HOME environment variable.
      HBase shell passes the JRUBY_OPTS environment variable to the jruby runner. To launch the HBase shell in ruby-1.9 mode, run 'export JRUBY_OPTS=--1.9' before launching the shell.
      Show
      Can now specify an alternative jruby by setting the JRUBY_HOME environment variable. HBase shell passes the JRUBY_OPTS environment variable to the jruby runner. To launch the HBase shell in ruby-1.9 mode, run 'export JRUBY_OPTS=--1.9' before launching the shell.
    • ruby jruby hbase shell 1.9 1.8 1.8.7 1.9.2

    Description

      Invoking hbase shell, the hbase runner launches the jruby jar directly, and so behaves differently than the traditional jruby runner. Specifically, it

      • does not respect the JRUBY_OPTS environment variable (among other things, I cannot launch the shell to use ruby-1.9 mode)
      • does not respect the JRUBY_HOME environment variable (placing things in an inconsistent state if my classpath holds the system jruby).

      This patch allows you to use an alternative jruby and to specify options to the jruby jar.

      • When the command is 'shell', adds $JRUBY_OPTS to the CLASS
      • When the command is 'shell' and $JRUBY_HOME is set, adds "$JRUBY_HOME/lib/jruby.jar" to the classpath, and sets -Djruby.home and -Djruby.job config variables.

      Attachments

        1. 5245-v2.txt
          1 kB
          Michael Stack
        2. hbase-jruby_home-and-jruby_opts.patch
          1 kB
          Flip Kromer

        Activity

          People

            Unassigned Unassigned
            mrflip Flip Kromer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: