Monthly Archives: September 2016

  • 0

Update your Capacity Scheduler through REST API

Sometime you want change your Capacity Scheduler through REST API or you have a requirement where you have to change your Capacity Scheduler configurations frequently via some script then this article will help you to do your work.

You can achieve it via following command.

[root@sandbox conf.server]# curl -v -u admin:admin -H “Content-Type: application/json” -H “X-Requested-By:ambari” -X PUT –data ‘{

“Clusters”: {

“desired_config”: [


“type”: “capacity-scheduler”,

“tag”: “version14534007568115”,

“service_config_version_note”: “To test”,

“properties”: {

“yarn.scheduler.capacity.maximum-am-resource-percent”: 0.2,

“yarn.scheduler.capacity.maximum-applications”: 10000,

“yarn.scheduler.capacity.node-locality-delay”: 40,

“yarn.scheduler.capacity.resource-calculator”: “org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator”,

“yarn.scheduler.capacity.queue-mappings-override.enable”: false,

“yarn.scheduler.capacity.root.acl_administer_queue”: “*”,

“yarn.scheduler.capacity.root.capacity”: 100,

“yarn.scheduler.capacity.root.queues”: “default”,

“yarn.scheduler.capacity.root.accessible-node-labels”: “*”,

“yarn.scheduler.capacity.root.default.acl_submit_applications”: “*”,

“yarn.scheduler.capacity.root.default.maximum-capacity”: 100,

“yarn.scheduler.capacity.root.default.user-limit-factor”: 0.5,

“yarn.scheduler.capacity.root.default.state”: “RUNNING”,

“yarn.scheduler.capacity.root.default.capacity”: 100






Note : In the above command you have to change following parameters.

  1. <ambari-server hostname or ip address >
  2. version of your CS view(you can get it in web url by visting your view )
  3. name of your view instance (you can get it in web url by visting your view )

After that you can refresh your queue by following command.

yarn rmadmin -refreshQueues

I hope it will help you to control your CS very easily.

  • 0

Start Namenode manually

Sometime we do not want to start all hdfs services at once or we just want to start NN,DN or SNN only via command then this article will help you to do this in a very simple manner.

1. Kill the current operation if already going on from ambari for namenode startup

2. set hadoop.root.logger=DEBUG,console

3. Try executing the below command

/usr/hdp/current/hadoopclient/sbin/ config /usr/hdp/current/hadoopclient/conf start namenode


  • 0

Enable Debug mode for hive in Ambari

Category : Hive

Many time we see that during troubleshoot we do not find much information if we are just default logger. So no worries I will help you to guide how to enable debug mode in logs or on your console.

Case 1: Use the following command to start hive: Set follwoing property to turn on debug mode on console. 
hive -hiveconf hive.root.logger=ALL,console
It will log all messages to console.

Case 2: In case if you want to write you log in log file only for each and every steps which user or job does then you can use following process.

  • Login to Ambari portal and click on Hive service.
  • Goto config and search for hive.root.logger string in search box.
  • Once you will then you need to change default value(hive.root.logger=INFO,DFRA) to hive.root.logger=DEBUG,DFRA

Note: It may fill your log dir soon so please keep deleting old file or keep maintain log dir.