You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Dan <da...@gmail.com> on 2013/04/11 16:20:13 UTC

Ruby 1.9 and jRuby 1.7

Hey,

With the last release support for jRuby was added to Pig. I've started
using this now for some work I'm doing but there are a few details missing
that are hard to pull out of the pig code.

I can't see anywhere we are specifying the version of Ruby that the
embedded jRuby engine is using? In jRuby 1.6 it will default down to 1.8
which I think might be happening.

It might be useful to add a parameter so we can specify which version of
ruby to be using if not?

Also are there any plans to support jRuby 1.7 as this has quite a large
performance improvement, especially with Java 7. jRuby 1.7 defaults to Ruby
1.9 which is also another change.

Any thoughts from others using this would be great?

Thanks,
Dan

Re: Ruby 1.9 and jRuby 1.7

Posted by Dan <da...@gmail.com>.
Testing it out a bit more and I think it is set to 1.9 at the moment so
that's good. I'm using EMR so setting environment variables is a
bit fiddly, but I'll do that to make sure at the moment.

One issue with supporting 1.7 on EMR might be that depending on HBase as
well currently uses jRuby 1.6.x so there may be dependency collisions there?

I'd see that ticket before but didn't realise it contained the jRuby 1.7
changes too. I'll talk a look and discuss in that ticket for more.

Have you done much unit testing with the ruby UDFs? I've started writing
some out and have a basic framework in place to work with them in a
standard ruby way. Might be worth having a common test framework to save
people hassle if this starts to get much use?



On 11 April 2013 21:59, Jonathan Coveney <jc...@gmail.com> wrote:

> Dan,
>
> I implemented most of the jruby stuff. Glad to hear you're trying it out!
> Please let us know what your experience is like.
>
> I definitely had plans to upgrade to jruby 1.7, and am not sure why I never
> did...hmm.
>
> Ahh, ok, it's part of this patch...which still isn't committed...you should
> bump it :)
> https://issues.apache.org/jira/browse/PIG-2927
>
> I definitely think we should upgrade, and 1.9 should be the default.
>
> That said, if you
> check src/org/apache/pig/scripting/jruby/JrubyScriptEngine.java , the ruby
> engine it attempts to set up is 1.9 BUT in 1.6.7 this can be buggy. To be
> absolutely sure you need to set an environment variable (I think that's
> documented in the JIRA).
>
> Mainly we should just apply that patch :)
>
>
> 2013/4/11 Dan <da...@gmail.com>
>
> > Hey,
> >
> > With the last release support for jRuby was added to Pig. I've started
> > using this now for some work I'm doing but there are a few details
> missing
> > that are hard to pull out of the pig code.
> >
> > I can't see anywhere we are specifying the version of Ruby that the
> > embedded jRuby engine is using? In jRuby 1.6 it will default down to 1.8
> > which I think might be happening.
> >
> > It might be useful to add a parameter so we can specify which version of
> > ruby to be using if not?
> >
> > Also are there any plans to support jRuby 1.7 as this has quite a large
> > performance improvement, especially with Java 7. jRuby 1.7 defaults to
> Ruby
> > 1.9 which is also another change.
> >
> > Any thoughts from others using this would be great?
> >
> > Thanks,
> > Dan
> >
>

Re: Ruby 1.9 and jRuby 1.7

Posted by Jonathan Coveney <jc...@gmail.com>.
Dan,

I implemented most of the jruby stuff. Glad to hear you're trying it out!
Please let us know what your experience is like.

I definitely had plans to upgrade to jruby 1.7, and am not sure why I never
did...hmm.

Ahh, ok, it's part of this patch...which still isn't committed...you should
bump it :)
https://issues.apache.org/jira/browse/PIG-2927

I definitely think we should upgrade, and 1.9 should be the default.

That said, if you
check src/org/apache/pig/scripting/jruby/JrubyScriptEngine.java , the ruby
engine it attempts to set up is 1.9 BUT in 1.6.7 this can be buggy. To be
absolutely sure you need to set an environment variable (I think that's
documented in the JIRA).

Mainly we should just apply that patch :)


2013/4/11 Dan <da...@gmail.com>

> Hey,
>
> With the last release support for jRuby was added to Pig. I've started
> using this now for some work I'm doing but there are a few details missing
> that are hard to pull out of the pig code.
>
> I can't see anywhere we are specifying the version of Ruby that the
> embedded jRuby engine is using? In jRuby 1.6 it will default down to 1.8
> which I think might be happening.
>
> It might be useful to add a parameter so we can specify which version of
> ruby to be using if not?
>
> Also are there any plans to support jRuby 1.7 as this has quite a large
> performance improvement, especially with Java 7. jRuby 1.7 defaults to Ruby
> 1.9 which is also another change.
>
> Any thoughts from others using this would be great?
>
> Thanks,
> Dan
>