问题描述
- Spark1.3基于scala2.11编译hive-thrift报错,关于jline的 5C
- [INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spark Project Hive Thrift Server 1.3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ spark-hive-thriftserver_2.11 ---
[INFO] Deleting /usr/local/spark-1.3.0/sql/hive-thriftserver/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ spark-hive-thriftserver_2.11 ---
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:add-source (eclipse-add-source) @ spark-hive-thriftserver_2.11 ---
[INFO] Add Source directory: /usr/local/spark-1.3.0/sql/hive-thriftserver/src/main/scala
[INFO] Add Test Source directory: /usr/local/spark-1.3.0/sql/hive-thriftserver/src/test/scala
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:add-source (add-scala-sources) @ spark-hive-thriftserver_2.11 ---
[INFO] Source directory: /usr/local/spark-1.3.0/sql/hive-thriftserver/src/main/scala added.
[INFO]
[INFO] --- build-helper-maven-plugin:1.8:add-source (add-default-sources) @ spark-hive-thriftserver_2.11 ---
[INFO] Source directory: /usr/local/spark-1.3.0/sql/hive-thriftserver/v0.13.1/src/main/scala added.
[INFO]
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ spark-hive-thriftserver_2.11 ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spark-hive-thriftserver_2.11 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /usr/local/spark-1.3.0/sql/hive-thriftserver/src/main/resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- scala-maven-plugin:3.2.0:compile (scala-compile-first) @ spark-hive-thriftserver_2.11 ---
[WARNING] Zinc server is not available at port 3030 - reverting to normal incremental compile
[INFO] Using incremental compilation
[INFO] compiler plugin: BasicArtifact(org.scalamacrosparadise_2.11.22.0.1null)
[INFO] Compiling 9 Scala sources to /usr/local/spark-1.3.0/sql/hive-thriftserver/target/scala-2.11/classes...
[ERROR] /usr/local/spark-1.3.0/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala:25: object ConsoleReader is not a member of package jline
[ERROR] import jline.{ConsoleReader History}
[ERROR] ^
[WARNING] Class jline.Completor not found - continuing with a stub.
[WARNING] Class jline.ConsoleReader not found - continuing with a stub.
[ERROR] /usr/local/spark-1.3.0/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala:165: not found: type ConsoleReader
[ERROR] val reader = new ConsoleReader()
[ERROR] ^
[ERROR] Class jline.Completor not found - continuing with a stub.
[WARNING] Class com.google.protobuf.Parser not found - continuing with a stub.
[WARNING] Class com.google.protobuf.Parser not found - continuing with a stub.
[WARNING] Class com.google.protobuf.Parser not found - continuing with a stub.
[WARNING] Class com.google.protobuf.Parser not found - continuing with a stub.
[WARNING] 6 warnings found
[ERROR] three errors found
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [01:20 min]
[INFO] Spark Project Networking ........................... SUCCESS [01:31 min]
[INFO] Spark Project Shuffle Streaming Service ............ SUCCESS [ 47.808 s]
[INFO] Spark Project Core ................................. SUCCESS [34:00 min]
[INFO] Spark Project Bagel ................................ SUCCESS [03:21 min]
[INFO] Spark Project GraphX ............................... SUCCESS [09:22 min]
[INFO] Spark Project Streaming ............................ SUCCESS [15:07 min]
[INFO] Spark Project Catalyst ............................. SUCCESS [14:35 min]
[INFO] Spark Project SQL .................................. SUCCESS [16:31 min]
[INFO] Spark Project ML Library ........................... SUCCESS [18:15 min]
[INFO] Spark Project Tools ................................ SUCCESS [01:50 min]
[INFO] Spark Project Hive ................................. SUCCESS [13:58 min]
[INFO] Spark Project REPL ................................. SUCCESS [06:13 min]
[INFO] Spark Project YARN ................................. SUCCESS [07:05 min]
[INFO] Spark Project Hive Thrift Server ................... FAILURE [01:39 min]
[INFO] Spark Project Assembly ............................. SKIPPED
[INFO] Spark Project External Twitter ..................... SKIPPED
[INFO] Spark Project External Flume Sink .................. SKIPPED
[INFO] Spark Project External Flume ....................... SKIPPED
[INFO] Spark Project External MQTT ........................ SKIPPED
[INFO] Spark Project External ZeroMQ ...................... SKIPPED
[INFO] Spark Project Examples ............................. SKIPPED
[INFO] Spark Project YARN Shuffle Service ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:25 h
[INFO] Finished at: 2015-04-16T14:11:24+08:00
[INFO] Final Memory: 62M/362M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile ""hadoop-2.5"" could not be activated because it does not exist.
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile (scala-compile-first) on project spark-hive-thriftserver_2.11: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.2.0:compile failed. CompileFailed -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems you can resume the build with the command
[ERROR] mvn -rf :spark-hive-thriftserver_2.11
解决方案
我也有遇到 没解决呢
解决方案二:
检查一下是否版本依赖的问题,我看官方下的是0.9.94版本,cdh下来的是1.11
我在hive-thriftserver的pom.xml上加上
jline
jline
0.9.94
可以试一下
解决方案三:
<dependency> <groupId>jline</groupId> <artifactId>jline</artifactId> <version>0.9.94</version></dependency>
解决方案四:
请看官网说明,scall 2.11是不可以支持JDBC
Building for Scala 2.11
To produce a Spark package compiled with Scala 2.11 use the -Dscala-2.11 property:
dev/change-version-to-2.11.sh
mvn -Pyarn -Phadoop-2.4 -Dscala-2.11 -DskipTests clean package
Spark does not yet support its JDBC component for Scala 2.11.