Hive
  1. Hive
  2. HIVE-6898

Functions in hive are failing with java.lang.ClassNotFoundException on Tez

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0, 0.14.0
    • Fix Version/s: 0.14.0, 0.13.1
    • Component/s: Tez
    • Labels:
      None

      Description

      CREATE TABLE T1(key int, val STRING) STORED AS TEXTFILE;
      
      LOAD DATA LOCAL INPATH '../../data/files/T1.txt' INTO TABLE T1;
      
      add jar /tmp/testudf.jar;
      create temporary function square as 'org.apache.hive.udf.UDFSquare';
      select square(key) from T1 limit 3;
      

      Fails with

      Vertex failed, vertexName=Map 1, vertexId=vertex_1397230190905_0590_1_00, diagnostics=[Task failed, taskId=task_1397230190905_0590_1_00_000000, diagnostics=[AttemptID:attempt_1397230190905_0590_1_00_000000_0 Info:Error: java.lang.RuntimeException: Map operator initialization failed
      	at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:145)
      	at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:163)
      	at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:307)
      	at org.apache.hadoop.mapred.YarnTezDagChild$5.run(YarnTezDagChild.java:564)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:415)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1557)
      	at org.apache.hadoop.mapred.YarnTezDagChild.main(YarnTezDagChild.java:553)
      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.hive.udf.UDFSquare
      	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge.getUdfClass(GenericUDFBridge.java:133)
      	at org.apache.hadoop.hive.ql.exec.FunctionRegistry.isStateful(FunctionRegistry.java:1636)
      	at org.apache.hadoop.hive.ql.exec.FunctionRegistry.isDeterministic(FunctionRegistry.java:1599)
      	at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.isDeterministic(ExprNodeGenericFuncEvaluator.java:132)
      	at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.iterate(ExprNodeEvaluatorFactory.java:83)
      	at org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.toCachedEval(ExprNodeEvaluatorFactory.java:73)
      	at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:59)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460)
      	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416)
      	at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:189)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
      	at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:425)
      	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
      	at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:121)
      	... 7 more
      
      1. HIVE-6898.1.patch
        15 kB
        Vikram Dixit K
      2. HIVE-6898.2.patch
        15 kB
        Vikram Dixit K

        Issue Links

          Activity

          Hide
          Sergey Shelukhin added a comment -

          Couple of nits on rb, can be fixed on commit, +1

          Show
          Sergey Shelukhin added a comment - Couple of nits on rb, can be fixed on commit, +1
          Hide
          Vikram Dixit K added a comment -

          Address Sergey's comments.

          Show
          Vikram Dixit K added a comment - Address Sergey's comments.
          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12639877/HIVE-6898.1.patch

          SUCCESS: +1 5614 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2226/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2226/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12639877

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12639877/HIVE-6898.1.patch SUCCESS: +1 5614 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2226/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2226/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12639877
          Hide
          Hive QA added a comment -

          Overall: -1 at least one tests failed

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12639890/HIVE-6898.2.patch

          ERROR: -1 due to 1 failed/errored test(s), 5614 tests executed
          Failed tests:

          org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16
          

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2230/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2230/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          Tests exited with: TestsFailedException: 1 tests failed
          

          This message is automatically generated.

          ATTACHMENT ID: 12639890

          Show
          Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12639890/HIVE-6898.2.patch ERROR: -1 due to 1 failed/errored test(s), 5614 tests executed Failed tests: org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_auto_sortmerge_join_16 Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2230/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/2230/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 1 tests failed This message is automatically generated. ATTACHMENT ID: 12639890
          Hide
          Sergey Shelukhin added a comment -

          committed to trunk

          Show
          Sergey Shelukhin added a comment - committed to trunk
          Hide
          Thejas M Nair added a comment -

          This jira has been fixed as part of 0.13.1 release. If you find further issues, please create a new jira and link it to this one.

          Show
          Thejas M Nair added a comment - This jira has been fixed as part of 0.13.1 release. If you find further issues, please create a new jira and link it to this one.

            People

            • Assignee:
              Vikram Dixit K
              Reporter:
              Vikram Dixit K
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development