Atlas--编译启动

下载

  • 我下载的最新版apache atlas 2.0:https://atlas.apache.org/Downloads.html
  • 下载后解压,进入该目录,然后开始编译。
  • 命令:

    mvn clean -DskipTests install (atlas使用外部hbase和solr服务)
    mvn clean -DskipTests package -Pdist,embedded-hbase-solr (atlas使用自带的hbase和solr服务)

  1. 我目前使用他自带的服务hbase、solr服务.命令:mvn clean -DskipTests package -Pdist,embedded-hbase-solr
  2. 这个过程有点长,主要是这里,如果使用自带的服务需要下载一个hbase,100多MB
  3. 如果不想等,可以自己手动下载然后放入下面提示的目录,即通过:http://archive.apache.org/dist/hbase/2.0.2/hbase-2.0.2-bin.tar.gz下载
    apache atlas
  4. solr服务同理,如下比较耗时,可以手动下载
  5. 重新编译,成功
    apache atlas编译成功
    注意:这种方式(自带hbase+solr)只用于开发环境,不要用于生产

  6. 编译完后有如下gz压缩包,可以发现已经被解压

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    txd:conf tangxuandong$ cd /opt/dev/idea/apache-atlas-sources-2.0.0/distro/target/
    txd:target tangxuandong$ ll
    total 4151232
    drwxr-xr-x 5 tangxuandong wheel 160 5 20 18:17 META-INF
    drwxr-xr-x 4 tangxuandong wheel 128 5 20 18:17 antrun
    drwxr-xr-x 4 tangxuandong wheel 128 5 22 18:16 apache-atlas-2.0.0-bin
    -rw-r--r-- 1 tangxuandong wheel 699096451 5 20 18:20 apache-atlas-2.0.0-bin.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-falcon-hook
    -rw-r--r-- 1 tangxuandong wheel 9211833 5 20 18:18 apache-atlas-2.0.0-falcon-hook.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-hbase-hook
    -rw-r--r-- 1 tangxuandong wheel 11079551 5 20 18:18 apache-atlas-2.0.0-hbase-hook.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-hive-hook
    -rw-r--r-- 1 tangxuandong wheel 16267168 5 20 18:18 apache-atlas-2.0.0-hive-hook.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-kafka-hook
    -rw-r--r-- 1 tangxuandong wheel 9219793 5 20 18:18 apache-atlas-2.0.0-kafka-hook.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:19 apache-atlas-2.0.0-server
    -rw-r--r-- 1 tangxuandong wheel 594436213 5 20 18:19 apache-atlas-2.0.0-server.tar.gz
    -rw-r--r-- 1 tangxuandong wheel 11078022 5 20 18:21 apache-atlas-2.0.0-sources.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-sqoop-hook
    -rw-r--r-- 1 tangxuandong wheel 9200673 5 20 18:18 apache-atlas-2.0.0-sqoop-hook.tar.gz
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:18 apache-atlas-2.0.0-storm-hook
    -rw-r--r-- 1 tangxuandong wheel 58914529 5 20 18:18 apache-atlas-2.0.0-storm-hook.tar.gz
    drwxr-xr-x 2 tangxuandong wheel 64 5 20 18:18 archive-tmp
    -rw-r--r-- 1 tangxuandong wheel 678903752 5 20 18:18 atlas-distro-2.0.0.jar
    drwxr-xr-x 13 tangxuandong wheel 416 5 20 18:17 bin
    drwxr-xr-x 11 tangxuandong wheel 352 5 20 18:17 conf
    drwxr-xr-x 13 tangxuandong wheel 416 5 20 18:17 hbase
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:16 hbase.temp
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:17 maven-archiver
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:16 maven-shared-archive-resources
    -rw-r--r-- 1 tangxuandong wheel 3833 5 20 18:16 rat.txt
    drwxr-xr-x 14 tangxuandong wheel 448 5 20 18:17 solr
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:17 solr.temp
    drwxr-xr-x 3 tangxuandong wheel 96 5 20 18:17 test-classes

启动服务

  • 编译好后,进入$project_name/distro/target/apache-atlas-2.0.0-bin/apache-atlas-2.0.0目录
  • 把这个压缩包apache-atlas-2.0.0-bin.tar.gz放入到其他地方,解压后运行也是可以的,同上面一样的

  • 修改配置文件,conf/atlas-env.sh

  1. 如果运行的本地hbase/solr需要配置(默认已经配置好了)
    export MANAGE_LOCAL_HBASE=true
    export MANAGE_LOCAL_SOLR=true

  2. 设置支持大量的元数据对象
    如果你计划来存储大量的元数据对象,建议您使用值调整GC JVM的性能更好。      
    以下值是常见的服务器端选项:(参见官网)
    export ATLAS_SERVER_OPTS=”-server -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+PrintTenuringDistribution -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dumps/atlas_server.hprof -Xloggc:logs/gc-worker.log -verbose:gc -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1m -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps”

  3. 如果是mac os
    配置
    export ATLAS_SERVER_OPTS=”-Djava.awt.headless=true -Djava.security.krb5.realm= -Djava.security.krb5.kdc=”

  • 运行服务:./bin/atlas_start.py (默认hbase/solr一起启动)
    apache atlas 启动服务

访问服务

当前网速较慢或者你使用的浏览器不支持博客特定功能,请尝试刷新或换用Chrome、Firefox等现代浏览器