UDF for pig not working

to create new topics or reply. | New User Registration

Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by  pranjal rajput 2 years, 3 months ago.

  • Creator
    Topic
  • #17869

    i have created a UDF jar for use with pig with HDP VM on virtualbox.
    uploaded it using ‘select udf jar’ button on sandbox ui and clicked ‘add’.
    the statement – register ‘myudf.jar'; is generating following error
    2013-03-15 03:00:48,476 [main] INFO org.apache.pig.Main – Apache Pig version 0.10.1.21 (rexported) compiled Jan 10 2013, 04:00:42
    2013-03-15 03:00:48,476 [main] INFO org.apache.pig.Main – Logging error messages to: /home/sandbox/hue/pig_1363341648473.log
    2013-03-15 03:00:48,916 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: file:///
    2013-03-15 03:00:49,817 [main] ERROR org.apache.pig.tools.grunt.Grunt – ERROR 2997: Encountered IOException. File does not exist: hdfs://sandbox:8020/tmp/udfs/’myudf.jar’
    Details at logfile: /home/sandbox/hue/pig_1363341648473.log

    however the file exists in the /tmp/udfs/ location.
    what could be the reason behind this? and how to resolve it?

Viewing 3 replies - 1 through 3 (of 3 total)

You must be to reply to this topic. | Create Account

  • Author
    Replies
  • #18772

    many thanks for the response.
    i figured this ‘without quote’ thingy a while ago on my own.
    although the quotes were my mistake but it was taking too long to get community help on this. hence i switched back to bare bones pig and hadoop installations on ubuntu, instead of banging my head against HDP vm.
    however the IOException is ridiculously misleading.

    thanks peter and tedr.

    Collapse
    #18771

    You have an error in your register statement. You can click on UDF jar and it will automatically register or use next statement (without quotes and semicolon)
    register myudf.jar

    Collapse
    #17876

    tedr
    Member

    Hi Pranjal,

    Thanks for trying the Hortonworks Sandbox.
    Check the persmissions on the UDF file, is it world readable? If not this could be the reason that Pig claims it is not there.

    Thanks,
    Ted.

    Collapse
Viewing 3 replies - 1 through 3 (of 3 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.