Thursday, October 10, 2019

Step by step process of Changing Ambari Metrics Collector service from Embedded to distributed mode - HDP

Steps:

# STOP AMS service

# Create directories in HDFS

$ hdfs dfs -mkdir -p /apps/ams/metrics
$ hdfs dfs -chown -R ams:hadoop /apps/ams/
$ hdfs dfs -chown -R ams:hadoop /apps/ams/metrics/


 # Copy the metric data from the AMS local directory( This is the value of hbase.rootdir in Advanced ams-hbase-site used when running in embedded mode) to an HDFS directory.

 $ hdfs dfs -copyFromLocal /opt/log/var/lib/ambari-metrics-collector/hbase/*  /apps/ams/metrics


 # Go to  Ambari> Services > Ambari Metrics > Configs.

 # Please change the Metrics Service operation mode from embedded to distributed.

 $ timeline.metrics.service.operation.mode -> distributed

 # In Advanced ams-hbase-site, 

 $ hbase.cluster.distributed -> true

 Please change root directory to HDFS from Local

 $ hbase.rootdir -> hdfs://<$NAMENODE_FQDN>:8020/apps/ams/metrics


Restart the Ambari Metrics collector > A new HMaster, HRegion server and Application History Server daemons will starts in metrics collector host.

 $ ps -ef | grep ams

# Configure the memory as per below document,

https://docs.cloudera.com/HDPDocuments/Ambari-2.7.3.0/using-ambari-core-services/content/amb_customize_ams_environment_specific_settings_for_a_cluster.html

1 comment:

Hive Architecture

Hive Architecture in One Image