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

Julien Le Dem commented on PIG-928:
-----------------------------------

Argh... Sorry about that
{code}
        /** 
         * figure out the jar location from the class 
         * @param clazz
         * @return the jar file location, null if the class was not loaded from 
a jar
         */
        protected static String getJar(Class<?> clazz) {
                URL resource = 
clazz.getClassLoader().getResource(clazz.getCanonicalName().replace(".","/")+".class");
                if (resource.getProtocol().equals("jar")) {
                        return 
resource.getPath().substring(resource.getPath().indexOf(':')+1,resource.getPath().indexOf('!'));
                }
                return null;
        }
{code}

> UDFs in scripting languages
> ---------------------------
>
>                 Key: PIG-928
>                 URL: https://issues.apache.org/jira/browse/PIG-928
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Alan Gates
>            Assignee: Aniket Mokashi
>             Fix For: 0.8.0
>
>         Attachments: calltrace.png, package.zip, PIG-928.patch, 
> pig-greek.tgz, pig.scripting.patch.arnab, pyg.tgz, RegisterPythonUDF2.patch, 
> RegisterPythonUDF3.patch, RegisterPythonUDF4.patch, 
> RegisterPythonUDFFinale.patch, RegisterScriptUDFDefineParse.patch, 
> scripting.tgz, scripting.tgz, test.zip
>
>
> It should be possible to write UDFs in scripting languages such as python, 
> ruby, etc.  This frees users from needing to compile Java, generate a jar, 
> etc.  It also opens Pig to programmers who prefer scripting languages over 
> Java.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to