Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-2678

Unable to execute Hive Queries due to failure to load Grok classes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.1
    • Component/s: None
    • Labels:
      None
    • Rank:
      1|hzyucn:

      Description

      Steps to reproduce

      Create a stream called test
      Load access log
      Set clf format
      Execute SELECT COUNT(*) FROM  stream_test
      

      The Query fails to run - the system tries to load io.thekraken.grok jars via URL classloader and fails

      
      Caused by: java.lang.RuntimeException: Error in configuring object
      	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:109)
      	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:75)
      	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
      	at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38)
      	... 14 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
      	... 17 more
      Caused by: java.lang.RuntimeException: Map operator initialization failed
      	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:154)
      	... 22 more
      Caused by: java.lang.NoClassDefFoundError: oi/thekraken/grok/api/exception/GrokException
      	at co.cask.cdap.data.format.RecordFormats.<clinit>(RecordFormats.java:45)
      	at co.cask.cdap.hive.stream.StreamSerDe.initialize(StreamSerDe.java:94)
      	at org.apache.hadoop.hive.serde2.SerDeUtils.initializeSerDe(SerDeUtils.java:519)
      	at org.apache.hadoop.hive.ql.exec.MapOperator.getConvertedOI(MapOperator.java:306)
      	at org.apache.hadoop.hive.ql.exec.MapOperator.setChildren(MapOperator.java:352)
      	at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:123)
      	... 22 more
      Caused by: java.lang.ClassNotFoundException: oi.thekraken.grok.api.exception.GrokException
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 28 more
      
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ashau Albert Shau
                Reporter:
                sree Sreevatsan Raman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: