WangTaoTheTonic created SPARK-3547: -------------------------------------- Summary: Maybe we should not simply make return code 1 equal to CLASS_NOT_FOUND Key: SPARK-3547 URL: https://issues.apache.org/jira/browse/SPARK-3547 Project: Spark Issue Type: Improvement Components: Deploy Reporter: WangTaoTheTonic Priority: Minor
It incurred runtime exception when hadoop version is not A.B.* format, which is detected by Hive. Then the jvm return code is 1, while equals to CLASS_NOT_FOUND_EXIT_STATUS in start-thriftserver.sh script. It proves even runtime exception can lead the jvm existed with code 1. Should we just modify the misleading error message in script ? The error message in script: CLASS_NOT_FOUND_EXIT_STATUS=1 if [[ exit_status -eq CLASS_NOT_FOUND_EXIT_STATUS ]]; then echo echo "Failed to load Hive Thrift server main class $CLASS." echo "You need to build Spark with -Phive." fi Below is exception stack I met: [omm@dc1-rack1-host2 sbin]$ ./start-thriftserver.sh log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: java.lang.RuntimeException: Illegal Hadoop Version: V100R001C00 (expected A.B.* format) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:286) at org.apache.spark.sql.hive.thriftserver.HiveThriftServer2$.main(HiveThriftServer2.scala:54) at org.apache.spark.sql.hive.thriftserver.HiveThriftServer2.main(HiveThriftServer2.scala) 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.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:332) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:79) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: java.lang.RuntimeException: Illegal Hadoop Version: V100R001C00 (expected A.B.* format) at org.apache.hadoop.hive.ql.metadata.HiveUtils.getAuthenticator(HiveUtils.java:368) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:278) ... 9 more Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Illegal Hadoop Version: V100R001C00 (expected A.B.* format) at org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator.setConf(HadoopDefaultAuthenticator.java:53) at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73) at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133) at org.apache.hadoop.hive.ql.metadata.HiveUtils.getAuthenticator(HiveUtils.java:365) ... 10 more Caused by: java.lang.RuntimeException: Illegal Hadoop Version: V100R001C00 (expected A.B.* format) at org.apache.hadoop.hive.shims.ShimLoader.getMajorVersion(ShimLoader.java:141) at org.apache.hadoop.hive.shims.ShimLoader.loadShims(ShimLoader.java:113) at org.apache.hadoop.hive.shims.ShimLoader.getHadoopShims(ShimLoader.java:80) at org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator.setConf(HadoopDefaultAuthenticator.java:51) ... 13 more Failed to load Hive Thrift server main class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2. You need to build Spark with -Phive. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org