Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

ambari metrics + change the path of hbase.rootdir because local disk not have space

Solved Go to solution
Highlighted

ambari metrics + change the path of hbase.rootdir because local disk not have space

hi all



in ambari metrics configuration , we have the following

hbase.rootdir=/var/lib/ambari-metrics-collector/hbase

since /var is 97%

we want to replace the path to the new disk ( that mounted to data_metrics folder )

as the following:

hbase.rootdir=/data_metrics/lib/ambari-metrics-collector/hbase

can we just change the path and restart the metrics service ?

so all metrics data will be under - /data_metrics/lib/ambari-metrics-collector/hbase

instead of - /var/lib/ambari-metrics-collector/hbase ?



Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: ambari metrics + change the path of hbase.rootdir because local disk not have space

HI @Michael Bronson ,


Referring to your doubt of Changing the hbase.rootdir

Please follow the following steps and let me know if this helps ( I am assuming that you need to preserve all the Previously collected metrics )


Steps


1)Stop ambari-metrics

2) Copy the contents of /var/lib/ambari-metrics-collector/ to the New directory you want to set as new

for ex :

cd /var/lib/ambari-metrics-collector/
mv hbase hbase-tmp/ /tmp/ambari-metrics-collector/

3) go to ambari-ui->services->ambari-metrics->config -> search for hbase.rootdir and hbase.tmpdir and change it accordingly as per new Folder sctructure.

4) Start ambari-metrics collector

5) you can see AMS has successfully using the new Hbase dir and also the old matrics are preserved


Let me know if this helps. Please accept the answer if it did.



3 REPLIES 3

Re: ambari metrics + change the path of hbase.rootdir because local disk not have space

HI @Michael Bronson ,


Referring to your doubt of Changing the hbase.rootdir

Please follow the following steps and let me know if this helps ( I am assuming that you need to preserve all the Previously collected metrics )


Steps


1)Stop ambari-metrics

2) Copy the contents of /var/lib/ambari-metrics-collector/ to the New directory you want to set as new

for ex :

cd /var/lib/ambari-metrics-collector/
mv hbase hbase-tmp/ /tmp/ambari-metrics-collector/

3) go to ambari-ui->services->ambari-metrics->config -> search for hbase.rootdir and hbase.tmpdir and change it accordingly as per new Folder sctructure.

4) Start ambari-metrics collector

5) you can see AMS has successfully using the new Hbase dir and also the old matrics are preserved


Let me know if this helps. Please accept the answer if it did.



Re: ambari metrics + change the path of hbase.rootdir because local disk not have space

do you mean to copy the folder /var/lib/ambari-metrics-collector/hbase to the new path - /data_metrics/lib/ambari-metrics-collector/


as


mv /var/lib/ambari-metrics-collector/hbase /data_metrics/lib/ambari-metrics-collector/ 
Michael-Bronson

Re: ambari metrics + change the path of hbase.rootdir because local disk not have space

you should be copying the directory structure as it is . Create folder hbase and hbase in /data_metrics/lib/ambari-metrics-collector/ and copy the contents from other place as it is.