AnsweredAssumed Answered

Error while trying to Integrate Hive and Mapr Table "java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/mapreduce/TableInputFormatBase"

Question asked by mayur_saparia on Mar 16, 2015
Latest reply on Mar 16, 2015 by mayur_saparia
I am trying to integrate hive and Mapr Table , but when I give the following query

     hive> INSERT OVERWRITE TABLE mapr_table_1 SELECT * FROM pokes WHERE foo=98;

It give me error as follows in HUE

    > Your query has the following error(s):
    >
    > java.lang.NoClassDefFoundError:
    > org/apache/hadoop/hbase/mapreduce/TableInputFormatBase

Also when I tried to do it from shell it give me following error:

    Total MapReduce jobs = 1
    Launching Job 1 out of 1
    Number of reduce tasks is set to 0 since there's no reduce operator
    Starting Job = job_201503160532_0005, Tracking URL = http://ubuntu:50030/jobdetails.jsp?jobid=job_201503160532_0005
    Kill Command = /opt/mapr/hadoop/hadoop-0.20.2/bin/../bin/hadoop job  -kill job_201503160532_0005
    Hadoop job information for Stage-0: number of mappers: 1; number of reducers: 0
    2015-03-16 06:41:36,110 Stage-0 map = 0%,  reduce = 0%
    2015-03-16 06:42:36,820 Stage-0 map = 100%,  reduce = 100%
    Ended Job = job_201503160532_0005 with errors
    Error during job, obtaining debugging information...
    Job Tracking URL: http://ubuntu:50030/jobdetails.jsp?jobid=job_201503160532_0005
    Examining task ID: task_201503160532_0005_m_000000 (and more) from job job_201503160532_0005
    
    Task with the most failures(4):
    -----
    Task ID:
      task_201503160532_0005_m_000000
    
    -----
    Diagnostic Messages for this Task:
    java.lang.RuntimeException: Error in configuring object
            at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
            at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
            at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
            at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:414)
            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:349)
            at org.apache.hadoop.mapred.Child$4.run(Child.java:270)
            at java.security.AccessController.doPrivileged(Native Method)
            at javax.security.auth.Subject.doAs(Subject.java:396)
            at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1127)
            at org.apache.hadoop.mapred.Child.main(Child.java:264)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
            ... 9 more
    Caused by: java.lang.RuntimeException: Error in configuring object
            at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)
            at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)
            at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
            at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
            ... 14 more
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)
            ... 17 more
    Caused by: java.lang.RuntimeException: Map operator initialization failed
            at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:121)
            ... 22 more
    Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.NullPointerException
            at org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:385)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:451)
            at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:407)
            at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:62)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:451)
            at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:407)
            at org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:78)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:451)
            at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:407)
            at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:186)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)
            at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:543)
            at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:375)
            at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:100)
            ... 22 more
    Caused by: java.lang.NullPointerException
            at org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:322)
            ... 38 more
    
    
    FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
    MapReduce Jobs Launched:
    Job 0: Map: 1   MAPRFS Read: 0 MAPRFS Write: 0 FAIL
    Total MapReduce CPU Time Spent: 0 msec


Can someone please help as to how to solve this problem. Have spent the whole day looking for the solution.












Outcomes