国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

湖南營(yíng)銷推廣網(wǎng)站多少費(fèi)用從事網(wǎng)絡(luò)營(yíng)銷的公司

湖南營(yíng)銷推廣網(wǎng)站多少費(fèi)用,從事網(wǎng)絡(luò)營(yíng)銷的公司,重慶市永川區(qū)城鄉(xiāng)建設(shè)委員會(huì)網(wǎng)站,南京電子商務(wù)網(wǎng)站建設(shè)首先確保環(huán)境的干凈,如果之前有安裝過(guò)清理掉相關(guān)殘留 確保安裝atlas的服務(wù)器有足夠的內(nèi)存(至少16G),有必要的hadoop角色 HDFS客戶端 — 檢索和更新Hadoop使用的用戶組信息(UGI)中帳戶成員資格的信息。對(duì)調(diào)…

首先確保環(huán)境的干凈,如果之前有安裝過(guò)清理掉相關(guān)殘留

確保安裝atlas的服務(wù)器有足夠的內(nèi)存(至少16G),有必要的hadoop角色

  • HDFS客戶端 — 檢索和更新Hadoop使用的用戶組信息(UGI)中帳戶成員資格的信息。對(duì)調(diào)試很有用。
  • HBase Client - Atlas 存儲(chǔ)其 Janus 數(shù)據(jù)庫(kù),用于初始導(dǎo)入 HBase 內(nèi)容,因此它需要持續(xù)訪問(wèn) HBase 服務(wù)中的兩個(gè)表。
  • Hive 客戶端 - 用于初始導(dǎo)入 Hive 內(nèi)容。

準(zhǔn)備編譯環(huán)境

mvn3.8.8 必須3.8以上的版本 3.6無(wú)法編譯

java 1.8.0_181 跟你的CDH環(huán)境保持一致

node?node-v16.20.2?

下載和解壓縮源代碼

該項(xiàng)目的網(wǎng)站可以在這里找到?Apache Atlas – Data Governance and Metadata framework for Hadoop

查找并下載 Apache Atlas?

更改pom.xml

在主pom(就是文件夾打開(kāi)第一個(gè))添加一個(gè)包含 maven 工件的 clouder 存儲(chǔ)庫(kù)

<repository><id>cloudera</id><url>https://repository.cloudera.com/artifactory/cloudera-repos</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots>
</repository>

然后修改對(duì)應(yīng)的cdh組件版本?

<hadoop.version>3.0.0-cdh6.3.2</hadoop.version>
<hbase.version>2.1.0-cdh6.3.2</hbase.version>
<hive.version>2.1.1-cdh6.3.2</hive.version>
<kafka.scala.binary.version>2.11</kafka.scala.binary.version>
<kafka.version>2.2.1-cdh6.3.2</kafka.version>
<solr-test-framework.version>7.4.0-cdh6.3.2</solr-test-framework.version>
<lucene-solr.version>7.4.0</lucene-solr.version>
<solr.version>7.4.0-cdh6.3.2</solr.version>
<sqoop.version>1.4.7-cdh6.3.2</sqoop.version>
<zookeeper.version>3.4.5-cdh6.3.2</zookeeper.version>

然后修改一些jar包的版本

將“atlas-buildtools”工件的版本從“1.0”更改為“0.8.1”<dependency><groupId>org.apache.atlas</groupId><artifactId>atlas-buildtools</artifactId><version>0.8.1</version></dependency>修改jsr.version為2.0.1<jsr.version>2.0.1</jsr.version>

修改一些次pom?

主目錄下 
grep -rn jsr311-apii | grep pom.xmladdons/impala-bridge/pom.xml:332
addons/falcon-bridge/pom.xml:178
addons/hive-bridge/pom.xml:312: 
addons/hbase-bridge/pom.xml:345:
addons/storm-bridge/pom.xml:360:
addons/sqoop-bridge/pom.xml:250:這幾個(gè)pom中jsr311-api改成javax.ws.rs-api

修改其他文件

?在文件

addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java

中,轉(zhuǎn)到第618行,

注釋”String catalogName = hiveDB.getCatalogName() != null ?hiveDB.getCatalogName().toLowerCase() : null;“

并添加 ”String catalogName = null;“:

public static String getDatabaseName(Database hiveDB) {String dbName      = hiveDB.getName().toLowerCase();//String catalogName = hiveDB.getCatalogName() != null ? hiveDB.getCatalogName().toLowerCase() : null;String catalogName = null;if (StringUtils.isNotEmpty(catalogName) && !StringUtils.equals(catalogName, DEFAULT_METASTORE_CATALOG)) {dbName = catalogName + SEP + dbName;}return dbName;
}

在文件

addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/AtlasHiveHookContext.java

轉(zhuǎn)到第83行”this.metastoreHandler = (listenerEvent != null) ?metastoreEvent.getIHMSHandler() : null;“,

注釋它并添加”this.metastoreHandler = null;“:?

public AtlasHiveHookContext(HiveHook hook, HiveOperation hiveOperation, HookContext hiveContext, HiveHookObjectNamesCache knownObjects,HiveMetastoreHook metastoreHook, ListenerEvent listenerEvent) throws Exception {this.hook             = hook;this.hiveOperation    = hiveOperation;this.hiveContext      = hiveContext;this.hive             = hiveContext != null ? Hive.get(hiveContext.getConf()) : null;this.knownObjects     = knownObjects;this.metastoreHook    = metastoreHook;this.metastoreEvent   = listenerEvent;//this.metastoreHandler = (listenerEvent != null) ? metastoreEvent.getIHMSHandler() : null;this.metastoreHandler = null;init();
}

?在文件addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/CreateHiveProcess.java

注釋第 293 行提到“MATERIALIZED_VIEW”:

private boolean isDdlOperation(AtlasEntity entity) {return entity != null && !context.isMetastoreHook()&& (context.getHiveOperation().equals(HiveOperation.CREATETABLE_AS_SELECT)|| context.getHiveOperation().equals(HiveOperation.CREATEVIEW)|| context.getHiveOperation().equals(HiveOperation.ALTERVIEW_AS));//|| context.getHiveOperation().equals(HiveOperation.CREATE_MATERIALIZED_VIEW));
}

注意這里要加;號(hào),因?yàn)樵瓉?lái)的符號(hào)被注釋了?

?在文件addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java

注釋提及“MATERIALIZED_VIEW”的第 212 行和第 217 行

開(kāi)始構(gòu)建?;緹o(wú)坑。有問(wèn)題多試幾次。有時(shí)候會(huì)因?yàn)榫W(wǎng)絡(luò)問(wèn)題下不到包

mvn clean  -DskipTests package -Pdist  -Drat.skip=true

包在distro/target/apache-atlas-2.2.0-bin.tar.gz

不要用官方文檔說(shuō)的server包 那個(gè)包沒(méi)有各種hook文件

解壓到安裝目錄,開(kāi)始安裝

為atlas部署準(zhǔn)備 CDH 集群服務(wù)

  • Atlas使用HBase來(lái)存儲(chǔ)他的Janus數(shù)據(jù)庫(kù)。
  • Solr 用于存儲(chǔ)和搜索審核日志。
  • Kafka被用作從Atlas庫(kù)(即嵌入Hadoop服務(wù)中的鉤子)到Atlas本身的消息發(fā)送器。

1.1. 在 HBase 中創(chuàng)建必要的表

  1. 在 Atlas 計(jì)算機(jī)或安裝了“HBase 網(wǎng)關(guān)”角色的任何其他計(jì)算機(jī)上,創(chuàng)建必要的表
TABLE1="apache_atlas_entity_audit"
TABLE2="apache_atlas_janus"echo "create '${TABLE1}', 'dt'"  | hbase shell
echo "create '${TABLE2}', 's'" | hbase shell

檢查已創(chuàng)建的表

  1. 在 Atlas 計(jì)算機(jī)或安裝了“HBase 網(wǎng)關(guān)”角色的任何其他計(jì)算機(jī)上,執(zhí)行:

    echo "list" | hbase shell
    復(fù)制

    標(biāo)準(zhǔn)輸出:

    Took 0.0028 seconds
    list
    TABLE                        
    apache_atlas_entity_audit                             
    apache_atlas_janus
    2 row(s)
    Took 0.6872 seconds                 
    ["apache_atlas_entity_audit", "apache_atlas_janus"]
    

添加hbase集群配置文件到conf/hbase

ln -s /etc/hbase/conf/ /data/apache-atlas-2.2.0/conf/hbase

Apache Kafka

Atlas 使用 Apache Kafka 接收有關(guān) Hadoop 服務(wù)中發(fā)生的事件的消息。消息是使用嵌入在某些服務(wù)中的Atlas的特殊庫(kù)發(fā)送的。目前,Atlas 讀取有關(guān) Hbase 和 Hive 中事件的消息,例如創(chuàng)建和刪除表、添加列、等等等等......

在 Kafka 中添加必要的topic

  1. Apache Atlas 需要 Apache Kafka 中的三個(gè)topic。在安裝了 Kafka 的計(jì)算機(jī)上創(chuàng)建它們:

kafka-topics --zookeeper S0:2181,S1:2181,S2:2181,S3:2181 --create --replication-factor 3 --partitions 3 --topic _HOATLASOK
kafka-topics --zookeeper S0:2181,S1:2181,S2:2181,S3:2181 --create --replication-factor 3 --partitions 3 --topic ATLAS_ENTITIES
kafka-topics --zookeeper S0:2181,S1:2181,S2:2181,S3:2181 --create --replication-factor 3 --partitions 3 --topic ATLAS_HOOK

有kerberos的會(huì)麻煩一點(diǎn) 具體看這篇

Kerberos環(huán)境下 命令行連接kafka 和zk_啟用kerberos后zk_Mumunu-的博客-CSDN博客

?配置atlas的sentry role 以訪問(wèn)kafka topic?

在具有“Kafka 網(wǎng)關(guān)”和“sentry網(wǎng)關(guān)”角色的機(jī)器上,在sentry中創(chuàng)建“kafka4atlas_role”角色:

KROLE="kafka4atlas_role"kafka-sentry -cr -r ${KROLE}
將創(chuàng)建的角色分配給 atlas 組:kafka-sentry -arg -r ${KROLE} -g atlas為消費(fèi)者分配權(quán)限:
TOPIC1="_HOATLASOK"
TOPIC2="ATLAS_ENTITIES"
TOPIC3="ATLAS_HOOK"kafka-sentry -gpr -r ${KROLE} -p "Host=*->CONSUMERGROUP=*->action=read"
kafka-sentry -gpr -r ${KROLE} -p "Host=*->CONSUMERGROUP=*->action=describe"kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC1}->action=read"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC2}->action=read"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC3}->action=read"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC1}->action=describe"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC2}->action=describe"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC3}->action=describe"
為生產(chǎn)者分配權(quán)限
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC1}->action=write"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC2}->action=write"
kafka-sentry -gpr -r ${KROLE} -p "HOST=*->TOPIC=${TOPIC3}->action=write"
檢查sentry設(shè)置$ kafka-sentry -lr
....
solradm_role
kafka4atlas_role
顯示組及其分配角色的列表:$ kafka-sentry -lg
...
atlas = kafka4atlas_role
test2_solr_admins = solradm_role
顯示權(quán)限列表:$ kafka-sentry -lp -r kafka4atlas_role
...
HOST=*->TOPIC=_HOATLASOK->action=read
HOST=*->TOPIC=_HOATLASOK->action=describe
HOST=*->TOPIC=ATLAS_HOOK->action=read
HOST=*->TOPIC=ATLAS_ENTITIES->action=describe
HOST=*->TOPIC=ATLAS_HOOK->action=describe
HOST=*->CONSUMERGROUP=*->action=describe
HOST=*->TOPIC=_HOATLASOK->action=write
HOST=*->TOPIC=ATLAS_ENTITIES->action=write
HOST=*->TOPIC=ATLAS_HOOK->action=write
HOST=*->TOPIC=ATLAS_ENTITIES->action=read
HOST=*->CONSUMERGROUP=*->action=read

集成CDH的Solr
①將apache-atlas-2.1.0/conf/solr文件拷貝到solr的安裝目錄下,即/opt/cloudera/parcels/CDh/lib/solr下,然后更名為atlas-solr

②創(chuàng)建collection

vi /etc/passwd
/sbin/nologin 修改為 /bin/bash
su - solr/opt/cloudera/parcels/CDH/lib/solr/bin/solr create -c  vertex_index -d /opt/cloudera/parcels/CDH/lib/solr/atlas-solr -shards 3 -replicationFactor 2/opt/cloudera/parcels/CDH/lib/solr/bin/solr create -c  edge_index -d /opt/cloudera/parcels/CDH/lib/solr/atlas-solr -shards 3 -replicationFactor 2/opt/cloudera/parcels/CDH/lib/solr/bin/solr create -c  fulltext_index -d /opt/cloudera/parcels/CDH/lib/solr/atlas-solr -shards 3 -replicationFactor 2


③驗(yàn)證創(chuàng)建collection成功
登錄 solr web控制臺(tái): http://xxxx:8983 驗(yàn)證是否啟動(dòng)成功

創(chuàng)建好相關(guān)的kerberos帳號(hào)和keytab

修改atlas-application.properties

#########  Graph Database Configs  ########## Graph Database#Configures the graph database to use.  Defaults to JanusGraph
#atlas.graphdb.backend=org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase# Graph Storage
# Set atlas.graph.storage.backend to the correct value for your desired storage
# backend. Possible values:
#
# hbase
# cassandra
# embeddedcassandra - Should only be set by building Atlas with  -Pdist,embedded-cassandra-solr
# berkeleyje
#
# See the configuration documentation for more information about configuring the various  storage backends.
#
atlas.graph.storage.backend=hbase
atlas.graph.storage.hbase.table=apache_atlas_janus#Hbase
#For standalone mode , specify localhost
#for distributed mode, specify zookeeper quorum here
atlas.graph.storage.hostname=S0:2181,S1:2181,S2:2181
atlas.graph.storage.hbase.regions-per-server=1
atlas.graph.stoorage.lock.wait-time=10000#In order to use Cassandra as a backend, comment out the hbase specific properties above, and uncomment the
#the following properties
#atlas.graph.storage.clustername=
#atlas.graph.storage.port=# Gremlin Query Optimizer
#
# Enables rewriting gremlin queries to maximize performance. This flag is provided as
# a possible way to work around any defects that are found in the optimizer until they
# are resolved.
#atlas.query.gremlinOptimizerEnabled=true# Delete handler
#
# This allows the default behavior of doing "soft" deletes to be changed.
#
# Allowed Values:
# org.apache.atlas.repository.store.graph.v1.SoftDeleteHandlerV1 - all deletes are "soft" deletes
# org.apache.atlas.repository.store.graph.v1.HardDeleteHandlerV1 - all deletes are "hard" deletes
#
#atlas.DeleteHandlerV1.impl=org.apache.atlas.repository.store.graph.v1.SoftDeleteHandlerV1# Entity audit repository
#
# This allows the default behavior of logging entity changes to hbase to be changed.
#
# Allowed Values:
# org.apache.atlas.repository.audit.HBaseBasedAuditRepository - log entity changes to hbase
# org.apache.atlas.repository.audit.CassandraBasedAuditRepository - log entity changes to cassandra
# org.apache.atlas.repository.audit.NoopEntityAuditRepository - disable the audit repository
#
atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository# if Cassandra is used as a backend for audit from the above property, uncomment and set the following
# properties appropriately. If using the embedded cassandra profile, these properties can remain
# commented out.
# atlas.EntityAuditRepository.keyspace=atlas_audit
# atlas.EntityAuditRepository.replicationFactor=1# Graph Search Index
atlas.graph.index.search.backend=solr#Solr
#Solr cloud mode properties
atlas.graph.index.search.solr.mode=cloud
atlas.graph.index.search.solr.zookeeper-url=S0:2181/solr,S1:2181/solr,S2:2181/solr
atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
atlas.graph.index.search.solr.zookeeper-session-timeout=60000
atlas.graph.index.search.solr.wait-searcher=true#Solr http mode properties
#atlas.graph.index.search.solr.mode=http
#atlas.graph.index.search.solr.http-urls=http://localhost:8983/solr# ElasticSearch support (Tech Preview)
# Comment out above solr configuration, and uncomment the following two lines. Additionally, make sure the
# hostname field is set to a comma delimited set of elasticsearch master nodes, or an ELB that fronts the masters.
#
# Elasticsearch does not provide authentication out of the box, but does provide an option with the X-Pack product
# https://www.elastic.co/products/x-pack/security
#
# Alternatively, the JanusGraph documentation provides some tips on how to secure Elasticsearch without additional
# plugins: https://docs.janusgraph.org/latest/elasticsearch.html
#atlas.graph.index.search.hostname=localhost
#atlas.graph.index.search.elasticsearch.client-only=true# Solr-specific configuration property
atlas.graph.index.search.max-result-set-size=150#########  Import Configs  #########
#atlas.import.temp.directory=/temp/import#########  Notification Configs  #########
atlas.notification.embedded=false
atlas.kafka.data=${sys:atlas.home}/data/kafka
atlas.kafka.zookeeper.connect=S0:2181,S1:2181,S2:2181
atlas.kafka.bootstrap.servers=S0:9092,S1:9092,S2:9092
atlas.kafka.zookeeper.session.timeout.ms=60000
atlas.kafka.zookeeper.connection.timeout.ms=60000
atlas.kafka.zookeeper.sync.time.ms=20
atlas.kafka.auto.commit.interval.ms=1000
atlas.kafka.hook.group.id=atlasatlas.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=1000atlas.notification.create.topics=true
atlas.notification.replicas=1
atlas.notification.topics=ATLAS_HOOK,ATLAS_ENTITIES
atlas.notification.log.failed.messages=true
atlas.notification.consumer.retry.interval=500
atlas.notification.hook.retry.interval=1000
# Enable for Kerberized Kafka clusters
#atlas.notification.kafka.service.principal=kafka/_HOST@EXAMPLE.COM
#atlas.notification.kafka.keytab.location=/etc/security/keytabs/kafka.service.keytab## Server port configuration
atlas.server.http.port=21000
#atlas.server.https.port=21443#########  Security Properties  ########## SSL config
atlas.enableTLS=false#truststore.file=/path/to/truststore.jks
#cert.stores.credential.provider.path=jceks://file/path/to/credentialstore.jceks#following only required for 2-way SSL
#keystore.file=/path/to/keystore.jks# Authentication config
atlas.authentication.method=kerberos
atlas.authentication.keytab=/data/hive.keytab
atlas.authentication.principal=hive@TEST.COMatlas.authentication.method.kerberos=true
atlas.authentication.method.kerberos.principal=hive@TEST.COM
atlas.authentication.method.kerberos.keytab=/data/hive.keytab
atlas.authentication.method.kerberos.name.rules=RULE:[2:$1@$0](hive@TEST.COM)s/.*/hive/
atlas.authentication.method.kerberos.token.validity=3600#atlas.authentication.method.file=true#### ldap.type= LDAP or AD
atlas.authentication.method.ldap.type=none#### user credentials file
atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties### groups from UGI
#atlas.authentication.method.ldap.ugi-groups=true######## LDAP properties #########
#atlas.authentication.method.ldap.url=ldap://<ldap server url>:389
#atlas.authentication.method.ldap.userDNpattern=uid={0},ou=People,dc=example,dc=com
#atlas.authentication.method.ldap.groupSearchBase=dc=example,dc=com
#atlas.authentication.method.ldap.groupSearchFilter=(member=uid={0},ou=Users,dc=example,dc=com)
#atlas.authentication.method.ldap.groupRoleAttribute=cn
#atlas.authentication.method.ldap.base.dn=dc=example,dc=com
#atlas.authentication.method.ldap.bind.dn=cn=Manager,dc=example,dc=com
#atlas.authentication.method.ldap.bind.password=<password>
#atlas.authentication.method.ldap.referral=ignore
#atlas.authentication.method.ldap.user.searchfilter=(uid={0})
#atlas.authentication.method.ldap.default.role=<default role>######### Active directory properties #######
#atlas.authentication.method.ldap.ad.domain=example.com
#atlas.authentication.method.ldap.ad.url=ldap://<AD server url>:389
#atlas.authentication.method.ldap.ad.base.dn=(sAMAccountName={0})
#atlas.authentication.method.ldap.ad.bind.dn=CN=team,CN=Users,DC=example,DC=com
#atlas.authentication.method.ldap.ad.bind.password=<password>
#atlas.authentication.method.ldap.ad.referral=ignore
#atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0})
#atlas.authentication.method.ldap.ad.default.role=<default role>#########  JAAS Configuration ########atlas.jaas.KafkaClient.loginModuleName=com.sun.security.auth.module.Krb5LoginModule
atlas.jaas.KafkaClient.loginModuleControlFlag=required
atlas.jaas.KafkaClient.option.useKeyTab=true
atlas.jaas.KafkaClient.option.storeKey=true
atlas.jaas.KafkaClient.option.serviceName=kafka
atlas.jaas.KafkaClient.option.keyTab=/data/atlas.service.keytab
atlas.jaas.KafkaClient.option.principal=atlas/s1.hadoop.com@TEST.COMatlas.jaas.Client.loginModuleName=com.sun.security.auth.module.Krb5LoginModule
atlas.jaas.Client.loginModuleControlFlag=required
atlas.jaas.Client.option.useKeyTab=true
atlas.jaas.Client.option.storeKey=true
atlas.jaas.Client.option.keyTab=/data/atlas.service.keytab
atlas.jaas.Client.option.principal=atlas/s1.hadoop.com@TEST.COM#########  Server Properties  #########
atlas.rest.address=http://localhost:21000
# If enabled and set to true, this will run setup steps when the server starts
#atlas.server.run.setup.on.start=false#########  Entity Audit Configs  #########
atlas.audit.hbase.tablename=apache_atlas_entity_audit
atlas.audit.zookeeper.session.timeout.ms=1000
atlas.audit.hbase.zookeeper.quorum=S0:2181,S1:2181,S2:2181#########  High Availability Configuration ########
atlas.server.ha.enabled=false
#### Enabled the configs below as per need if HA is enabled #####
#atlas.server.ids=id1
#atlas.server.address.id1=localhost:21000
#atlas.server.ha.zookeeper.connect=localhost:2181
#atlas.server.ha.zookeeper.retry.sleeptime.ms=1000
#atlas.server.ha.zookeeper.num.retries=3
#atlas.server.ha.zookeeper.session.timeout.ms=20000
## if ACLs need to be set on the created nodes, uncomment these lines and set the values ##
#atlas.server.ha.zookeeper.acl=<scheme>:<id>
#atlas.server.ha.zookeeper.auth=<scheme>:<authinfo>######### Atlas Authorization #########
atlas.authorizer.impl=simple
atlas.authorizer.simple.authz.policy.file=atlas-simple-authz-policy.json#########  Type Cache Implementation ########
# A type cache class which implements
# org.apache.atlas.typesystem.types.cache.TypeCache.
# The default implementation is org.apache.atlas.typesystem.types.cache.DefaultTypeCache which is a local in-memory type cache.
#atlas.TypeCache.impl=#########  Performance Configs  #########
#atlas.graph.storage.lock.retries=10
#atlas.graph.storage.cache.db-cache-time=120000#########  CSRF Configs  #########
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############ KNOX Configs ################
#atlas.sso.knox.browser.useragent=Mozilla,Chrome,Opera
#atlas.sso.knox.enabled=true
#atlas.sso.knox.providerurl=https://<knox gateway ip>:8443/gateway/knoxsso/api/v1/websso
#atlas.sso.knox.publicKey=############ Atlas Metric/Stats configs ################
# Format: atlas.metric.query.<key>.<name>
atlas.metric.query.cache.ttlInSecs=900
#atlas.metric.query.general.typeCount=
#atlas.metric.query.general.typeUnusedCount=
#atlas.metric.query.general.entityCount=
#atlas.metric.query.general.tagCount=
#atlas.metric.query.general.entityDeleted=
#
#atlas.metric.query.entity.typeEntities=
#atlas.metric.query.entity.entityTagged=
#
#atlas.metric.query.tags.entityTags=#########  Compiled Query Cache Configuration  ########## The size of the compiled query cache.  Older queries will be evicted from the cache
# when we reach the capacity.#atlas.CompiledQueryCache.capacity=1000# Allows notifications when items are evicted from the compiled query
# cache because it has become full.  A warning will be issued when
# the specified number of evictions have occurred.  If the eviction
# warning threshold <= 0, no eviction warnings will be issued.#atlas.CompiledQueryCache.evictionWarningThrottle=0#########  Full Text Search Configuration  ##########Set to false to disable full text search.
#atlas.search.fulltext.enable=true#########  Gremlin Search Configuration  ##########Set to false to disable gremlin search.
atlas.search.gremlin.enable=false########## Add http headers ############atlas.headers.Access-Control-Allow-Origin=*
#atlas.headers.Access-Control-Allow-Methods=GET,OPTIONS,HEAD,PUT,POST
#atlas.headers.<headerName>=<headerValue>#########  UI Configuration ########atlas.ui.default.version=v1

要改的配置很多。。務(wù)必仔細(xì)核對(duì)。很多默認(rèn)配置都是有問(wèn)題的,keytab 新建或者復(fù)用都可以,擔(dān)心可能會(huì)涉及到權(quán)限問(wèn)題所以我選擇了hive的賬戶。hbase中應(yīng)該也需要配置相應(yīng)的權(quán)限。沒(méi)測(cè)試過(guò)是否需要配置

修改atlas-env.sh

#!/usr/bin/env bash# The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path
export JAVA_HOME=/usr/java/default
export HBASE_CONF_DIR=/etc/hbase/conf
# any additional java opts you want to set. This will apply to both client and server operations
#export ATLAS_OPTS=# any additional java opts that you want to set for client only
#export ATLAS_CLIENT_OPTS=# java heap size we want to set for the client. Default is 1024MB
#export ATLAS_CLIENT_HEAP=# any additional opts you want to set for atlas service.
#export ATLAS_SERVER_OPTS=# indicative values for large number of metadata entities (equal or more than 10,000s)
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 -Djava.security.krb5.conf=/etc/krb5.conf -Djava.security.auth.login.config=/data/atlas2.2/conf/jaas.conf"# java heap size we want to set for the atlas server. Default is 1024MB
#export ATLAS_SERVER_HEAP=# indicative values for large number of metadata entities (equal or more than 10,000s) for JDK 8
export ATLAS_SERVER_HEAP="-Xms15360m -Xmx15360m -XX:MaxNewSize=5120m -XX:MetaspaceSize=100M -XX:MaxMetaspaceSize=512m"# What is is considered as atlas home dir. Default is the base locaion of the installed software
export ATLAS_HOME_DIR=/opt/atlas2.2# Where log files are stored. Defatult is logs directory under the base install location
#export ATLAS_LOG_DIR=# Where pid files are stored. Defatult is logs directory under the base install location
#export ATLAS_PID_DIR=# where the atlas titan db data is stored. Defatult is logs/data directory under the base install location
#export ATLAS_DATA_DIR=# Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.
#export ATLAS_EXPANDED_WEBAPP_DIR=# indicates whether or not a local instance of HBase should be started for Atlas
export MANAGE_LOCAL_HBASE=false# indicates whether or not a local instance of Solr should be started for Atlas
export MANAGE_LOCAL_SOLR=false# indicates whether or not cassandra is the embedded backend for Atlas
export MANAGE_EMBEDDED_CASSANDRA=false# indicates whether or not a local instance of Elasticsearch should be started for Atlas
export MANAGE_LOCAL_ELASTICSEARCH=false

?env中的jaas.conf 需要增加一個(gè)jaas.conf

Client {com.sun.security.auth.module.Krb5LoginModule requireduseKeyTab=trueKeyTab="/data/atlas.service.keytab"storeKey=trueprincipal="atlas/s1.hadoop.com@TEST.COM"debug=false;
};

?集成hive

首先去CDH的hive上添加3處配置

HiveServer2 的 Java 配置選項(xiàng)???{{JAVA_GC_ARGS}} -Datlas.conf=/data/apache-atlas-2.2.0/conf/

?

?hive-site.xml的HiveServer2 高級(jí)配置代碼段 (安全閥)

名稱: hive.exec.post.hooks
值:?org.apache.atlas.hive.hook.HiveHook

HiveServer2 環(huán)境高級(jí)配置片段(安全閥)

HIVE_AUX_JARS_PATH=/data/apache-atlas-2.2.0/hook/hive/

?復(fù)制一份atlas-application.properties到/etc/hive/conf下 。注意需要修改

改為false
atlas.authentication.method.kerberos=false
增加
atlas.client.readTimeoutMSecs=90000
atlas.client.connectTimeoutMSecs=90000

最后兩個(gè)配置的含義是讀取連接時(shí)間,,默認(rèn)的太短

然后就可以啟動(dòng)了

bin/atlas-start.pybin/atlas-stop.py

啟動(dòng)過(guò)程如下圖所示

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

該過(guò)程會(huì)耗時(shí)較久,包含index創(chuàng)建、數(shù)據(jù)的初始化等操作,可能長(zhǎng)達(dá)數(shù)小時(shí),請(qǐng)耐心等待。
此時(shí)可以跟一下atlas的啟動(dòng)日志,直到日志不再刷新,再lsof或netstat查一下21000是否已經(jīng)監(jiān)聽(tīng)了,如已存在,則打開(kāi)瀏覽器輸入ip:21000登錄atlas頁(yè)面

千萬(wàn)不要相信他提示的Apache Atlas?Server started!!!和jps顯示的Atlas進(jìn)程 ,因?yàn)閱?dòng)腳本超過(guò)一定時(shí)間后一定會(huì)報(bào)成功,但此時(shí)21000端口還未被監(jiān)聽(tīng),服務(wù)是不可用的,真正可用還是以21000被成功監(jiān)聽(tīng),可以進(jìn)到Atlas登錄頁(yè)面為準(zhǔn)

然后開(kāi)始正式使用

導(dǎo)入hive數(shù)據(jù)

記得kinit 
bin/import-hive.sh 
也可以單獨(dú)導(dǎo)入某個(gè)庫(kù)
bin/import-hive.sh -d default

?過(guò)程中會(huì)提示輸入atlas用戶名和密碼,都輸入admin即可
成功后會(huì)提示

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

該過(guò)程時(shí)間視hive現(xiàn)有數(shù)據(jù)量大小而定

登錄后如下圖

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

此時(shí)可以點(diǎn)擊右上角小圖標(biāo)

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

查看總體數(shù)據(jù)情況
?

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))


?

查看所有hive表
?

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))


?

隨便點(diǎn)擊一個(gè)表查看詳情

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

可以清楚地看到這個(gè)表的各項(xiàng)信息、字段及血緣圖等
?
我們也可以通過(guò)左側(cè)搜索欄檢索過(guò)濾想要查找的項(xiàng)

Atlas2.2.0編譯、安裝及使用(集成ElasticSearch,導(dǎo)入Hive數(shù)據(jù))

http://m.aloenet.com.cn/news/34528.html

相關(guān)文章:

  • 寧波網(wǎng)站建設(shè) 聯(lián)系哪家七臺(tái)河網(wǎng)站seo
  • 百度付費(fèi)推廣圖片seo優(yōu)化是什么意思
  • 上海最新發(fā)布最新發(fā)布煙臺(tái)seo網(wǎng)絡(luò)推廣
  • wordpress手機(jī)QQ登錄seo服務(wù)商排名
  • php mysql動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)與全程實(shí)例網(wǎng)絡(luò)營(yíng)銷工具的特點(diǎn)
  • 網(wǎng)站開(kāi)發(fā)用哪種語(yǔ)言天津的網(wǎng)絡(luò)優(yōu)化公司排名
  • 網(wǎng)站開(kāi)發(fā)模版百度官網(wǎng)認(rèn)證價(jià)格
  • 網(wǎng)站除了做流量還需要什么培訓(xùn)機(jī)構(gòu)不退費(fèi)最有效方式
  • 網(wǎng)站項(xiàng)目團(tuán)隊(duì)介紹怎么寫(xiě)阿里域名注冊(cè)網(wǎng)站
  • 北京華人博學(xué)營(yíng)銷型網(wǎng)站建設(shè)公司杭州排名優(yōu)化公司電話
  • 做恒生指數(shù)看什么網(wǎng)站免費(fèi)發(fā)廣告的軟件
  • 網(wǎng)站注冊(cè)費(fèi)公眾號(hào)推廣方法
  • 上海浦東建設(shè)集團(tuán)官方網(wǎng)站英文網(wǎng)站建設(shè)
  • wordpress網(wǎng)站的根目錄在哪關(guān)鍵詞搜索排行榜
  • 西昌城鄉(xiāng)建設(shè)網(wǎng)站曹操博客seo
  • 免費(fèi)做網(wǎng)站的軟件seminar是什么意思
  • 廣州網(wǎng)站開(kāi)發(fā)技術(shù)網(wǎng)推平臺(tái)有哪些比較好
  • 專業(yè)網(wǎng)站設(shè)計(jì)團(tuán)隊(duì)日本櫻花免m38vcom費(fèi)vps
  • 做的比較好的卡車網(wǎng)站網(wǎng)站策劃是什么
  • 做網(wǎng)站遇到競(jìng)爭(zhēng)對(duì)手怎么辦秘密入口3秒自動(dòng)進(jìn)入
  • 棗莊做網(wǎng)站優(yōu)化網(wǎng)站客服系統(tǒng)
  • 萬(wàn)網(wǎng)域名申請(qǐng)網(wǎng)站全自動(dòng)推廣引流軟件
  • 網(wǎng)站上的logo怎么做今日國(guó)內(nèi)新聞
  • 網(wǎng)站設(shè)計(jì)聯(lián)盟西安seo學(xué)院
  • 網(wǎng)站開(kāi)發(fā)wbs工作分解結(jié)構(gòu)北京互聯(lián)網(wǎng)公司有哪些
  • wordpress背景圖更改網(wǎng)站自然優(yōu)化
  • 北京網(wǎng)站如何制作seo網(wǎng)站關(guān)鍵詞優(yōu)化快速官網(wǎng)
  • wordpress 入侵視頻優(yōu)化營(yíng)商環(huán)境條例全文
  • 怎么設(shè)計(jì)app太原seo排名外包
  • 做app好還是響應(yīng)式網(wǎng)站深圳企業(yè)黃頁(yè)網(wǎng)