1. 程式人生 > >maven 新增hive-exec後出現錯誤

maven 新增hive-exec後出現錯誤

建立maven工程,在pom中新增hive-exec來建立UDF,但是在pom中新增下面引用後出錯:

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>0.14.0</version>
</dependency>

錯誤:

Multiple markers at this line
- Missing artifact org.apache.calcite:calcite-core:jar:0.9.2-incubating-SNAPSHOT
- Missing artifact org.apache.calcite:calcite-avatica:jar:0.9.2-incubating-SNAPSHOT

解決方法是再新增兩個引用

 <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>0.14.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-avatica</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>

參考資料:

http://stackoverflow.com/questions/27710049/hive-0-14-udf-maven-project-missing-dependencies