How to export AMS (Ambari Metrics) hbase data and import on a remote cluster

Follow the following steps to export the AMS hbase data from 1 cluster to another,

AMS (Ambari Metrics) Hbase data export:

 export JAVA_HOME=/usr/jdk64/jdk1.8.0_112
 export HBASE_CONF_DIR=/etc/ambari-metrics-collector/conf/
 hbase org.apache.hadoop.hbase.mapreduce.Export "METRICS_METADATA" "/user/ams/export"

 In this example, we are mapping the HBASE_CONF_DIR variable to AMS configuration directory. 

We are trying to export "METRICS_METADATA" hbase table to the HDFS location /user/ams/export.

 It will create the following files, 

[ams@test ~]$ hadoop fs -ls /user/ams/export/
Found 2 items
-rw-r--r--   3 ams ams          0 2018-04-30 19:28 /user/ams/export/_SUCCESS
-rw-r--r--   3 ams ams    5987578 2018-04-30 19:28 /user/ams/export/part-m-00000


We can then transfer these hdfs files to remote cluster to import. Will cover the import steps in next article.

3 comments:

Boost Your Download Speed with lftp Segmentation

Looking for a faster way to download files via sftp to a Linux machine? Try using "lftp" instead. This tool offers segmented downl...

Other relevant topics