Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4059 Pig on Spark
  3. PIG-4192

Make ruby udfs work with Spark

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: spark-branch
    • Component/s: spark
    • Labels:
      None

      Description

      Related e2e tests: RubyUDFs_1 - RubyUDFs_13

      Sample script:
      register './libexec/ruby/scriptingudfs.rb' using jruby as myfuncs;
      a = load '/user/pig/tests/data/singlefile/studenttab10k' using PigStorage() as (name, age:int, gpa:double);
      b = foreach a generate myfuncs.square(age);
      store b into '/user/pig/out/praveenr-1411382446-nightly.conf/RubyUDFs_1.out';

      Pig Stack Trace
      ---------------
      ERROR 0: org.apache.spark.SparkException: Job aborted: Task 0.0:0 failed 1 times (most recent failure: Exception failure: java.lang.RuntimeException: org.apache.pig.backend.executionengine.ExecException: ERROR 0: Exception while executing [POUserFunc (Name: POUserFunc(org.apache.pig.scripting.jruby.JrubyEvalFunc)[int] - scope-3 Operator Key: scope-3) children: null at []]: java.lang.NullPointerException)

      org.apache.pig.backend.executionengine.ExecException: ERROR 0: org.apache.spark.SparkException: Job aborted: Task 0.0:0 failed 1 times (most recent failure: Exception failure: java.lang.RuntimeException: org.apache.pig.backend.executionengine.ExecException: ERROR 0: Exception while executing [POUserFunc (Name: POUserFunc(org.apache.pig.scripting.jruby.JrubyEvalFunc)[int] - scope-3 Operator Key: scope-3) children: null at []]: java.lang.NullPointerException)
      at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.launchPig(HExecutionEngine.java:285)
      at org.apache.pig.PigServer.launchPlan(PigServer.java:1378)
      at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1363)
      at org.apache.pig.PigServer.execute(PigServer.java:1352)
      at org.apache.pig.PigServer.executeBatch(PigServer.java:403)
      at org.apache.pig.PigServer.executeBatch(PigServer.java:386)
      at org.apache.pig.tools.grunt.GruntParser.executeBatch(GruntParser.java:170)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:233)
      at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:204)
      at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:81)
      at org.apache.pig.Main.run(Main.java:611)
      at org.apache.pig.Main.main(Main.java:164)
      Caused by: org.apache.spark.SparkException: Job aborted: Task 0.0:0 failed 1 times (most recent failure: Exception failure: java.lang.RuntimeException: org.apache.pig.backend.executionengine.ExecException: ERROR 0: Exception while executing [POUserFunc (Name: POUserFunc(org.apache.pig.scripting.jruby.JrubyEvalFunc)[int] - scope-3 Operator Key: scope-3) children: null at []]: java.lang.NullPointerException)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1028)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1026)
      at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
      at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
      at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$abortStage(DAGScheduler.scala:1026)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$processEvent$10.apply(DAGScheduler.scala:619)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$processEvent$10.apply(DAGScheduler.scala:619)
      at scala.Option.foreach(Option.scala:236)
      at org.apache.spark.scheduler.DAGScheduler.processEvent(DAGScheduler.scala:619)
      at org.apache.spark.scheduler.DAGScheduler$$anonfun$start$1$$anon$2$$anonfun$receive$1.applyOrElse(DAGScheduler.scala:207)
      at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
      at akka.actor.ActorCell.invoke(ActorCell.scala:456)
      at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
      at akka.dispatch.Mailbox.run(Mailbox.scala:219)
      at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
      at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      ================================================================================

        Attachments

        1. test_harnesss_1417492592
          448 kB
          Praveen Rachabattuni
        2. ruby.udfs_13.detail.log
          80 kB
          liyunzhang
        3. ruby.udfs_10.detail.log
          80 kB
          liyunzhang
        4. PIG-4232_1.patch
          7 kB
          liyunzhang

          Activity

            People

            • Assignee:
              kellyzly liyunzhang
              Reporter:
              praveenr019 Praveen Rachabattuni
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: