Apache Atlas2.1.0本地部署

本文档详细记录了解决Apache Atlas 2.1.0本地部署中遇到的bug,包括debug模式下的修复和ES存储版本兼容性问题。同时介绍了环境配置、IDEA设置及关键配置参数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前言

感觉国内使用Atlas做数据治理的并不多,网上没有太多的资料,所以很多时候遇到问题都无从下手,逼着自己去解决这些问题。现在接触Atlas已经有大半年了,慢慢记录下自己的排错过程吧。

准备工作

Atlas用到的组件:Hbase和ES(或者Solr)等的部署,我不在这里做赘述了。我自己在虚拟机里部署了这些组件,大家也可以按照自己的需求做相应的部署。

编译包

补充下编译好的包,使用的是github代码编译,版本号是:apache-atlas-3.0.0-SNAPSHOT。
提供了两个包,一个是绑定了hbase和solr的包,正常是可以直接运行的,一般用于测试;另一个没有任何绑定,可以根据自己的需求配置。

  1. apache atlas no embedded
  2. apache atlas embedded-hbase-solr

Bug处理

现在Atlas还是有些小bug的,如果你用到了debug模式或者使用了es做存储,需要对源码最一些修改。

debug模式下的bug修复

  • 这个Bug会导致到实体的audit模块不可用,会报一个空指针的异常。
  • Bug位置:在“org.apache.atlas.repository.audit.HBaseBasedAuditRepository“的213行。
  • 修复方案:
LOG.debug("Listing events for entity id {}, operation {}, starting key{}, maximum result count {}", entityId, auditAction, startKey, maxResultCount);

使用es做存储时,版本不兼容

Atlas2.1.0依赖的janusgraph版本是: 0.5.1,这个版本官网推荐的es版本是: 7.6.1,所以在pom里把es版本改为7.6.1后就可以正常启动服务了。
修改es版本

环境配置

  • 创建部署目录,结构如下所示
    目录结构
  • 将atlas的所有配置文件复制到conf目录下
  • 将atlas的models目录复制到主目录下
  • 将atlas.war复制到webapp目录下

IDEA配置

  • VM Options
-Datlas.home=F:\atlas_deploy
-Datlas.conf=F:\atlas_deploy\conf
-Datlas.log.dir=F:\atlas_deploy\logs
-Datlas.log.file=application.log
-Dlog4j.configuration=file:\\F:\atlas_deploy\conf\atlas-log4j.xml
  • Program arguments
--port 21000
-app F:\atlas_deploy\webapp\atlas.war
  • Working directory
    – Atlas源码的webapp模块

配置

最后只要把Atlas的配置配好就可以了。具体配置需要根据自己的实际情况做配置:

atlas.graph.storage.backend=hbase2
atlas.graph.storage.hbase.table=apache_atlas_janus
atlas.graph.storage.hostname=192.168.159.129
atlas.graph.storage.hbase.regions-per-server=1
atlas.graph.storage.lock.wait-time=10000
atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository
atlas.graph.index.search.backend=elasticsearch
atlas.graph.index.search.hostname=192.168.159.129
atlas.graph.index.search.elasticsearch.client-only=true
atlas.graph.index.search.max-result-set-size=150
atlas.kafka.zookeeper.connect=192.168.159.129/kafka
atlas.kafka.bootstrap.servers=192.168.159.129:9092
atlas.kafka.zookeeper.session.timeout.ms=400
atlas.kafka.zookeeper.connection.timeout.ms=200
atlas.kafka.zookeeper.sync.time.ms=20
atlas.kafka.auto.commit.interval.ms=1000
atlas.kafka.hook.group.id=atlas
atlas.kafka.hivepartition.group.id=atlas
atlas.kafka.enable.auto.commit=false
atlas.kafka.auto.offset.reset=earliest
atlas.kafka.session.timeout.ms=30000
atlas.kafka.offsets.topic.replication.factor=1
atlas.kafka.poll.timeout.ms=1000

atlas.notification.create.topics=true
atlas.notification.replicas=1
atlas.notification.topics=ATLAS_HOOK,ATLAS_ENTITIES
atlas.notification.hook.consumer.topic.names=ATLAS_HOOK
atlas.notification.entities.consumer.topic.names=ATLAS_ENTITIES
atlas.notification.log.failed.messages=true
atlas.notification.consumer.retry.interval=500
atlas.notification.hook.retry.interval=1000
atlas.enableTLS=false
atlas.authentication.method.kerberos=false
atlas.authentication.method.file=true
atlas.authentication.method.ldap.type=none
atlas.authentication.method.file.filename=\\conf\\users-credentials.properties
atlas.rest.address=http://localhost:21000
atlas.audit.hbase.tablename=apache_atlas_entity_audit
atlas.audit.zookeeper.session.timeout.ms=1000
atlas.audit.hbase.zookeeper.quorum=192.168.159.129:2181
atlas.server.ha.enabled=false
atlas.authorizer.impl=simple
atlas.authorizer.simple.authz.policy.file=atlas-simple-authz-policy.json
atlas.rest-csrf.enabled=true
atlas.rest-csrf.browser-useragents-regex=^Mozilla.*,^Opera.*,^Chrome.*
atlas.rest-csrf.methods-to-ignore=GET,OPTIONS,HEAD,TRACE
atlas.rest-csrf.custom-header=X-XSRF-HEADER
atlas.metric.query.cache.ttlInSecs=900
atlas.search.gremlin.enable=false
atlas.ui.default.version=v1
atlas.ui.editable.entity.types=*
atlas.cluster.name=mytest
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值