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.2.patch
        15 kB
        Vikram Dixit K
      2. HIVE-6898.1.patch
        15 kB
        Vikram Dixit K

        Issue Links

          Activity

          No work has yet been logged on this issue.

            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