文章目录
  1. 1. Atlas的安装和编译
    1. 1.1. 编译Atlas
    2. 1.2. Atlas编译要求
    3. 1.3. Atlas安装与配置
    4. 1.4. 启动atlas
    5. 1.5. 错误排查
      1. 1.5.1. Kafka启动失败
      2. 1.5.2. UI Keep Loading

最近一直在做公司数据湖的项目,我们用的是Apache正在incubating的开源项目atlas, atlas在管理元数据方面的功能十分强大。

这篇blog是介绍如何在centos中编译和安装atlas

Atlas的安装和编译

编译Atlas

  1. 从git下载源码库

    git clone https://git-wip-us.apache.org/repos/asf/incubator-atlas.git atlas
    git checkout altas-0.7-incubating
    
  2. 切换到atlas文件夹

    cd atlas
    
  3. 编译atlas

    export MAVEN_OPTS="-Xmx1536m -XX:MaxPermSize=512m" && mvn clean install -DskipTests -Drat.numUnapprovedLicenses=100
    
  4. skip Licenses

    http://stackoverflow.com/questions/30181154/skipping-some-license-tests-in-maven
    
    -Drat.numUnapprovedLicenses=100
    
  5. Skip test cases

    mvn install 
    

Atlas编译要求

  1. maven版本到3.1.0以上

Atlas安装与配置

  1. mvn clean package -Pdist -DskipTests
  2. 编译完之后解压生成的tar包

    tar -xzvf apache-atlas-${project.version}-bin.tar.gz
    cd atlas-${project.version}
    
  3. 配置atlas参数

    所有atlas参数配置都在conf文件夹下,这里主要修改atlas-application.properties的配置

    配置kafka相关参数

    atlas.notification.embedded=false
    atlas.kafka.data=${sys:atlas.home}/data/kafka
    atlas.kafka.zookeeper.connect=localhost:2181
    atlas.kafka.bootstrap.servers=fsdn1:6667
    

    配置Zookeeper相关参数

    atlas.audit.hbase.zookeeper.quorum={zookeeeper_host}:2181
    

启动atlas

bin/atlas_start.py 

这样可在浏览器中输入:http://localhost:21000,就可以打开atlas的web页面

错误排查

Kafka启动失败

论坛提问: https://community.hortonworks.com/questions/67795/fail-to-start-kafka-when-starting-the-atlas.html

关闭Zookeeper,报错Connection Refused
开启Zookeeper,报错cannot assign requested address

Resolution:
修改Kafka相关参数:

atlas.notification.embedded=false

参考资料 – 集成atlas与kafka

UI Keep Loading

如图:

论坛提问贴 – 多亏了这个帖子,找到了解决方案

Resolution:

根据论坛的回复,有两个解决方案,我用了第一种,就是下载hdp2.5然后把atlas web相关的文件夹覆盖掉0.7的文件夹

  1. I have replaced web folder from Sandbox(HDP 2.5 with Atlas 0.7) and it worked fine.

    下载HDP2.5,找到usr/hdp/2.5.0.0-1245/atlas文件夹,将其中的web相关文件夹copy and replace原本atlas的对应文件夹
    ![](http://i.imgur.com/CEvYjx5.png)
    
  2. Download the patch and git apply it – ATLAS-1199-PATCH

    Git Apply Patch Failed (http://www.fwolf.com/blog/post/448)

    $ git apply --reject 0001-BUG-Sybase.patch
    Checking patch source.php...
    error: while searching for:
            // 注释
            // 以下为几行代码片断
    error: patch failed: source.php:38
    Applying patch source.php with 1 rejects...
    Rejected hunk #1.
    
  3. Full Authentication needed to access the Atlas API

    论坛帖子

    Per default, Atlas uses Basic Authentication. So use your Atlas user and password, e.g. like

    curl -s -u admin:admin http://atlas-server:21000/api/atlas/types
    
  4. Out of Memory

    https://cwiki.apache.org//confluence/display/MAVEN/OutOfMemoryError
    
文章目录
  1. 1. Atlas的安装和编译
    1. 1.1. 编译Atlas
    2. 1.2. Atlas编译要求
    3. 1.3. Atlas安装与配置
    4. 1.4. 启动atlas
    5. 1.5. 错误排查
      1. 1.5.1. Kafka启动失败
      2. 1.5.2. UI Keep Loading