请帮助我理解此错误。顺便说一句,这不是最新版本的 presto。我们正在使用自己的设置对其进行自定义。当我构建它时,收到以下错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project presto-connector: Compilation failure: Compilation failure:
[ERROR] /home/builder/presto/presto-connector/src/main/java/com/facebook/presto/connector/S3PartitionManager.java:[711,118] incompatible types: com.facebook.presto.hive.HiveType cannot be converted to com.facebook.presto.spi.type.Type
[ERROR] /home/builder/presto/presto-connector/src/main/java/com/facebook/presto/connector/BackgroundS3SplitLoader.java:[267,90] incompatible types: java.util.List<com.facebook.presto.hive.HiveSplit> cannot be converted to com.facebook.presto.spi.ConnectorSplit
[ERROR] /home/builder/presto/presto-connector/src/main/java/com/facebook/presto/connector/BackgroundS3SplitLoader.java:[330,60] incompatible types: java.util.List<com.facebook.presto.hive.HiveSplit> cannot be converted to com.facebook.presto.spi.ConnectorSplit
[ERROR] /home/builder/presto/presto-connector/src/main/java/com/facebook/presto/connector/BackgroundS3SplitLoader.java:[357,56] incompatible types: java.util.List<com.facebook.presto.hive.HiveSplit> cannot be converted to com.facebook.presto.spi.ConnectorSplit
[ERROR] /home/builder/presto/presto-connector/src/main/java/com/facebook/presto/connector/BackgroundS3SplitLoader.java:[382,60] incompatible types: java.util.List<com.facebook.presto.hive.HiveSplit> cannot be converted to com.facebook.presto.spi.ConnectorSplit
马文版本
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d;
2017-10-18T07:58:13Z)
Maven home: /opt/maven
Java version: 1.8.0_151,
vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.amzn2.x86_64/jre
Default locale: en_US,
platform encoding: UTF-8
OS name: "linux",
version: "4.9.76-38.79.amzn2.x86_64",
arch: "amd64",
family: "unix"
你的代码上几乎没有错误。正如错误日志所说:
-
S3PartitionManager
711号线。 -
BackgroundS3SplitLoader
267、330、357、382路
您正在将对象转换为不兼容的类型。
例如:将com.facebook.presto.hive.HiveType
转换为com.facebook.presto.spi.type.Type
是不兼容的。