ajithme opened a new pull request #27042: [SPARK-30382] start-thriftserver 
--help throws ClassNotFoundException
URL: https://github.com/apache/spark/pull/27042
 
 
   start-thriftserver.sh --help throws
   ```
   .....
        
   
   Thrift server options:
   Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/logging/log4j/spi/LoggerContextFactory
        at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:167)
        at 
org.apache.spark.sql.hive.thriftserver.HiveThriftServer2$.main(HiveThriftServer2.scala:82)
        at 
org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.main(HiveThriftServer2.scala)
   Caused by: java.lang.ClassNotFoundException: 
org.apache.logging.log4j.spi.LoggerContextFactory
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 3 more
   ```
   
   ### What changes were proposed in this pull request?
   Avoid hive log initialisation as 
https://github.com/apache/hive/blob/rel/release-2.3.5/common/src/java/org/apache/hadoop/hive/common/LogUtils.java
 introduces dependency over 
`org.apache.logging.log4j.core.impl.Log4jContextFactory` which is missing in 
our spark installer classpath directly. I believe the 
`LogUtils.initHiveLog4j()` code is here as the HiveServer2 class is copied from 
Hive.
   
   ### Why are the changes needed?
   To make `start-thriftserver.sh --help` command success
   
   
   ### Does this PR introduce any user-facing change?
   No
   
   
   ### How was this patch tested?
   Checked Manually

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to