Following steps would help in cleaning up Ambari Metrics System data in a given cluster.
Important Note:
- Cleaning up the AMS data would remove all the historical AMS data available
- The hbase parameters mentioned above are specific to AMS and they are different from the Cluster Hbase parameters
Step-by-step guide
- Using Ambari
- Set AMS to maintenance
- Stop AMS from Ambari
- Identify the following from the AMS Configs screen
- 'Metrics Service operation mode' (embedded or distributed)
- hbase.rootdir
- hbase.zookeeper.property.dataDir
- AMS data would be stored in 'hbase.rootdir' identified above. Backup and remove the AMS data.
- If the Metrics Service operation mode
- is 'embedded', then the data is stored in OS files. Use regular OS commands to backup and remove the files in hbase.rootdir
- is 'distributed', then the data is stored in HDFS. Use 'hdfs dfs' commands to backup and remove the files in hbase.rootdir
- If the Metrics Service operation mode
- Remove the AMS zookeeper data by backing up and removing the contents of 'hbase.tmp.dir'/zookeeper
- Remove any Phoenix spool files from 'hbase.tmp.dir'/phoenix-spool folder
- Restart AMS using Ambari
Related articles