Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven java编译错误_Java_Presto - Fatal编程技术网

Maven java编译错误

Maven java编译错误,java,presto,Java,Presto,请帮我理解这个错误。顺便说一句,这不是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: [

请帮我理解这个错误。顺便说一句,这不是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

您的代码上几乎没有错误。 正如错误日志所说:

  • S3PartitionManager
    第711行
  • BackgroundS3SplitLoader
    行号267、330、357和382
您正在将对象转换为不兼容的类型


例如:将
com.facebook.presto.hive.HiveType
转换为
com.facebook.presto.spi.type.type
是不兼容的。

这个问题显然与Maven无关。请学习理解这些明显的编译错误。您正在将
HiveType
转换为
Type
,并将
List
转换为
ConnectorSplit
,这是无效的(但我不知道这些类是什么)您能看一下下面的代码并提出错误建议吗?我们在这里提到的内容和编译器错误应该已经足够清楚了,您可以发现代码的问题,不是吗?请明确检查您正在使用的API是否共享代码以供参考:
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"