ajithme commented on issue #27042: [SPARK-30382] start-thriftserver --help 
throws ClassNotFoundException
URL: https://github.com/apache/spark/pull/27042#issuecomment-569714382
 
 
   > I doubt we can include log4j 2 successfully. Hm. So this code path doesn't 
get used unless --help is called? can you summarize why, because this looks 
like a main entry point. I don't know this code at all though. I'm worried it 
will break other logging.
   
   Sure, currently for spark thrift server, the entrypoint class is 
`org.apache.spark.sql.hive.thriftserver.HiveThriftServer2` 
https://github.com/apache/spark/blob/master/sbin/start-thriftserver.sh#L32
   
   In `org.apache.spark.sql.hive.thriftserver.HiveThriftServer2#main`, we can 
see, its calling hive's class `org.apache.hive.service.server.HiveServer2#main` 
only incase of argument passed to the HiveThriftServer2#main is `--help` or 
`-h`, referring to code at 
https://github.com/apache/spark/blob/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala#L81
 which inturn invokes our culprit `LogUtils.initHiveLog4j()`
   
   So, Any other flow which is not passing help argument to 
`org.apache.spark.sql.hive.thriftserver.HiveThriftServer2`, it will not invoke 
`org.apache.hive.service.server.HiveServer2#main`
   

----------------------------------------------------------------
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