Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hbase property update through Ambari API

avatar
Expert Contributor

I am trying to update Hbase properties through Ambari API and was following this document.

Here are the steps I followed :

  • Dumped the existing config into newconfig.json
curl -u "admin:admin" -G "https://myhbase.net/api/v1/clusters/myhbase/configurations?type=hbase-site&tag=TOPOLOGY_RESOLVED" | jq --arg newtag $(echo version$(date +%s%N)) '.items[] | del(.href, .version, .Config) | .tag |= $newtag | {"Clusters": {"desired_config": .}}' > newconfig.json
  • Then Modified the property from `0.4` to `0.6` in newconfig.json, also version number
"hbase.regionserver.global.memstore.size": "0.6",
  • Then apply the modified config
cat newconfig.json | curl -u "admin:admin" -H "X-Requested-By: ambari" -X PUT -d "@-" "https://myhbase.net/api/v1/clusters/myhbase"
  • Then restarted the HBase
  • Stop
echo '{"RequestInfo": {"context" :"Stopping the Hbase service"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}' | curl -u "admin:admin" -H "X-Requested-By: ambari" -X PUT -d "@-" "https://myhbase.net/api/v1/clusters/myhbase/services/HBASE"
  • Start
echo '{"RequestInfo": {"context" :"Restarting the Hbase service"}, "Body": {"ServiceInfo": {"state": "STARTED"}}}' | curl -u "admin:admin" -H "X-Requested-By: ambari" -X PUT -d "@-" "https://myhbase.net/api/v1/clusters/myhbase/services/HBASE"

But after restart Hbase master & region server went down & stuck into restart mode, where they were getting restarted.

Anyone know what wrong I ma doing here ? is there any better way to do this through Ambari API ?

1 ACCEPTED SOLUTION

avatar

@roy p

What error do you see in the "/var/log/hbase/hbase-hbase-master-host.example.com.log" log file while trying to restart HMaster ?

Remember that the combined value cannot exceed 0.8. Please check the settings for hbase.regionserver.global.memstore.size and hfile.block.cache.size in your configuration. hbase.regionserver.global.memstore.size is 0.6 hfile.block.cache.size is 0.4

Also what is the value for "hfile.block.cache.size" at your end?

View solution in original post

2 REPLIES 2

avatar

@roy p

What error do you see in the "/var/log/hbase/hbase-hbase-master-host.example.com.log" log file while trying to restart HMaster ?

Remember that the combined value cannot exceed 0.8. Please check the settings for hbase.regionserver.global.memstore.size and hfile.block.cache.size in your configuration. hbase.regionserver.global.memstore.size is 0.6 hfile.block.cache.size is 0.4

Also what is the value for "hfile.block.cache.size" at your end?

avatar
Expert Contributor

After correcting values for

hbase.regionserver.global.memstore.size and hfile.block.cache.size

everything looks good.