【问题标题】:apache atlas - hook hive - how to build apache-atlas-${project.version}-hive-hook.gz?apache atlas - hook hive - 如何构建 apache-atlas-${project.version}-hive-hook.gz?
【发布时间】:2025-11-29 19:00:02
【问题描述】:

我想挂钩 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 问题的方法?

【问题讨论】:

  • 我建议询问 Apache Atlas 开发邮件列表。
  • 两周前我给他们发了邮件,但没有收到回复

标签: hadoop hive bigdata apache-atlas


【解决方案1】:

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

如 apache atlas github page 中所述,这些挂钩是在 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

【讨论】: