首页 > 解决方案 > apache atlas - hook hive - 如何构建 apache-atlas-${project.version}-hive-hook.gz?

问题描述

我想挂钩 Hive 以在独立安装的图集中自动导入元数据。apache atlas 网站上的说明说“untar apache-atlas-${project.version}-hive-hook.tar.gz”,我找不到这个文件。

我尝试构建 apache-atlas-sources,但在“Apache atlas UI”步骤中遇到了 DependencyResolutionException 错误。是否有一个 mvn 命令只构建 apache-atlas-${project.version}-hive-hook.tar.gz 以便我可以完成说明?或者是否有解决 DependencyResolutionException 问题的方法?

标签: hadoophivebigdataapache-atlas

解决方案


TL;DR:从源代码构建 Apache Atlas 会在文件夹内的单独 tar 文件中生成二进制文件和所有挂钩distro/target/

如 apache atlas github 页面中所述,这些钩子是在 atlas 构建过程中与 atlas 二进制文件一起构建的。我已经复制了相关的 README 信息,尤其是第 3 条:

构建过程

  1. 获取 Atlas 源到您的本地目录,例如使用以下命令
$ cd <your-local-directory>    
$ git clone https://github.com/apache/atlas.git    
$ cd atlas

# Checkout the branch or tag you would like to build
#
# to checkout a branch
$ git checkout <branch>

# to checkout a tag
$ git checkout tags/<tag>
  1. 执行以下命令构建 Apache Atlas
$ export MAVEN_OPTS="-Xms2g -Xmx2g"
$ mvn clean install
$ mvn clean package -Pdist
  1. 上述构建命令成功完成后,您应该会看到以下文件
distro/target/apache-atlas-<version>-bin.tar.gz
distro/target/apache-atlas-<version>-hbase-hook.tar.gz
distro/target/apache-atlas-<version>-hive-hook.tar.gz
distro/target/apache-atlas-<version>-impala-hook.tar.gz
distro/target/apache-atlas-<version>-kafka-hook.tar.gz
distro/target/apache-atlas-<version>-server.tar.gz
distro/target/apache-atlas-<version>-sources.tar.gz
distro/target/apache-atlas-<version>-sqoop-hook.tar.gz
distro/target/apache-atlas-<version>-storm-hook.tar.gz
distro/target/apache-atlas-<version>-falcon-hook.tar.gz

推荐阅读