You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Brian Johnson (JIRA)" <ji...@apache.org> on 2015/07/29 02:21:06 UTC

[jira] [Commented] (PIG-4640) Compiling Pig with JDK8 or JDK7 Update 85 breaks Ruby UDFs

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

Brian Johnson commented on PIG-4640:
------------------------------------

It seems to me that there is a lot of unnecessary translation going on with the jruby UDFs converting Java classes to jruby objects. I think Pig could benefit from a more efficient implementation that passed in Java Tuples and DataBags instead of RubyDataBags, hashes and arrays. If we worked on a second implementation (so as not to break backwards compatibility), would that be something that you would be interested in making a part of pig?

> Compiling Pig with JDK8 or JDK7 Update 85 breaks Ruby UDFs
> ----------------------------------------------------------
>
>                 Key: PIG-4640
>                 URL: https://issues.apache.org/jira/browse/PIG-4640
>             Project: Pig
>          Issue Type: Bug
>         Environment: CentOS 6.5
> Pig 0.14.3
> Java 1.7.0 - see below
>            Reporter: Edward Winslow
>
> If you build pig against java patch version 79, it works, but pig built against 85 does not.  Here is the code to reproduce.
> {code}
> $ java -version
> java version "1.7.0_85"
> OpenJDK Runtime Environment (rhel-2.6.1.3.el6_6-x86_64 u85-b01)
> OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
> {code}
> Then add this code to `query.pig`. Notice that we're registering a ruby UDF and that's all.
> {code}
> SET job.priority 'normal'; REGISTER ./utility_udfs.rb using jruby AS utilities;
> {code}
> Make sure you build pig against this java version.
> {code}
> $ant
> {code}
> Then run the job
> {code}
> $pig -x local -F query.pig
> {code}
> You will get this error
> {code}
> 2015-07-24 11:32:25,215 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2999: Unexpected internal error. Native Exception: 'class java.lang.ClassFormatError'; Message: Duplicate method name&signature in class file org/apache/pig/scripting/jruby/RubyDataBag$i$initialize; StackTrace: java.lang.ClassFormatError: Duplicate method name&signature in class file org/apache/pig/scripting/jruby/RubyDataBag$i$initialize
>     at java.lang.ClassLoader.defineClass1(Native Method)
>     at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
>     at org.jruby.util.JRubyClassLoader.defineClass(JRubyClassLoader.java:76)
>     at org.jruby.internal.runtime.methods.InvocationMethodFactory.endClass(InvocationMethodFactory.java:1378)
>     at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethodClass(InvocationMethodFactory.java:792)
>     at org.jruby.internal.runtime.methods.InvocationMethodFactory.getAnnotatedMethod(InvocationMethodFactory.java:702)
>     at org.jruby.RubyModule.defineAnnotatedMethod(RubyModule.java:716)
>     at org.jruby.anno.TypePopulator$DefaultTypePopulator.populate(TypePopulator.java:75)
>     at org.jruby.RubyModule.defineAnnotatedMethodsIndividually(RubyModule.java:708)
>     at org.jruby.RubyModule.defineAnnotatedMethods(RubyModule.java:596)
>     at org.apache.pig.scripting.jruby.RubyDataBag.define(RubyDataBag.java:112)
>     at org.apache.pig.scripting.jruby.PigJrubyLibrary.load(PigJrubyLibrary.java:76)
> {code}
> If you're on this Java version, everything runs fine
> {code}
> $ java -version
> java version "1.7.0_79"
> OpenJDK Runtime Environment (rhel-2.5.5.3.el6_6-x86_64 u79-b14)
> OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
> {code}
> java 1.7.0_85 also breaks with pig 0.15



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)