Created 09-05-2018 02:53 AM
Hello Everyone,
Is there any API/CURL command to pull HBase data locality ? we can monitor or view data locality from Ambari without that is there any easy way to find data locality in HBase.
HBase version: 1.1.2.2.5.3.0-37
HDP version:2.5.3
Thanks.
Created 09-05-2018 04:45 AM
"percentFilesLocal" which is basically a Percent of store file data that can be read from the local DataNode, 0-100.
This is actually a Region Server Property hence you should be able to get that value by making the JMX call to individual RegionServer. Like following:
# curl -S "http://region_1.example.com:16030/jmx?qry=Hadoop:service=HBase,name=RegionServer,sub=Server" | grep 'percentFilesLocal' . . # curl -S "http://region_2.example.com:16030/jmx?qry=Hadoop:service=HBase,name=RegionServer,sub=Server" | grep 'percentFilesLocal'
.
Created 09-05-2018 03:04 AM
Are you talking about the "Percent Files Local": Percentage of files served from the local DataNode for the RegionServer.
In that case you can use AMS Grafana/Metrics.
Ambari Metrics Grafana: Search for "Percent Files Local"
http://$GRAFANA_HOST:3000/dashboard/db/hbase-regionservers
Or by directly making the AMS API call:
http://$AMBARI_METRICS_COLLECTOR_HOST:6188/ws/v1/timeline/metrics/?metricNames=regionserver.Server.p...
Reference: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-operations/content/grafana_hbase_...
Created 09-05-2018 04:02 AM
@Jay Kumar SenSharma thanks for your response, i'm looking for "Average percentage of local files to Region server in the cluster". Is there any other way apart from Ambari and Grafana to pull directly from HBase because we don't use Ambari or Grafana, thanks.
Created 09-05-2018 04:45 AM
"percentFilesLocal" which is basically a Percent of store file data that can be read from the local DataNode, 0-100.
This is actually a Region Server Property hence you should be able to get that value by making the JMX call to individual RegionServer. Like following:
# curl -S "http://region_1.example.com:16030/jmx?qry=Hadoop:service=HBase,name=RegionServer,sub=Server" | grep 'percentFilesLocal' . . # curl -S "http://region_2.example.com:16030/jmx?qry=Hadoop:service=HBase,name=RegionServer,sub=Server" | grep 'percentFilesLocal'
.
Created 09-06-2018 02:43 PM
@Jay Kumar SenSharma is there way we can get "Average percentage of local files to Region server in the cluster" for entire HBase cluster instead of querying by each region server , thanks.