包org.apache.hadoop.hive.ql.exec.vector不存在

时间:2017-11-03 18:58:29

标签: java maven hadoop

我正在尝试使用Hive UDF和UDAF,到目前为止,我已经通过命令行中的maven管理得很好基本上由一个非常知识渊博的人建立起来。我是Java新手(项目,而不是语言)但我至少可以看到我目前的问题。我不知道的是它为什么会发生以及如何解决它。

因此...

我的问题是无论出于何种原因,在运行时

mvn install

编译器无法找到过去的任何类

/org/apache/hadoop/hive/ql/exec

它可以找到' exec'中的所有课程。文件夹,但没有任何子文件夹嵌套在' exec'中。我不明白为什么会这样。这是我的POM文件。

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>com.matthewrathbone.example.RawMapreduce</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.matthewrathbone.example</groupId>
  <artifactId>hive-extensions</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>hive-extensions</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>2.0.0-mr1-cdh4.3.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
      <version>0.10.0-cdh4.3.1</version>
      <scope>provided</scope>
    </dependency>
    <!-- TEST DEPENDENCIES -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-test</artifactId>
      <version>2.0.0-mr1-cdh4.1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
    <repositories>
    <repository>
      <id>cloudera</id>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
    </repository>
  </repositories>
</project>

我得到的许多错误之一的一个例子是标题。 &#39;矢量&#39;是位于/org/apache/hadoop/hive/ql/exec

的文件夹

据我所知,hive-exec.jar文件在我的POM文件中列为依赖项,所以我不确定为什么编译器无法找到其中包含的所有类(它可以找到一些,如前所述)。

基本上我尝试做的是将其中一个内置的UDAF作为我自己的临时功能,这样我就可以绕过Hive对&内部子查询的限制#39; SELECT&#39;言。

1 个答案:

答案 0 :(得分:1)

所以,更具体一点,我做了一些调整,并最终将其缩小到编译器正在寻找class VectorizedUDAFs,事实证明,我的版本hive-exec .jar没有.. .. 去搞清楚。因此,它无法找到它,因为它实际上并不存在......

相关问题