REST API disable / enable service auto start by API
how to disable service auto start by API as the following

how to enable service auto start by API as the following

Do you mean something similar to the one which is mentioned here:
https://community.hortonworks.com/questions/136769/auto-start-services-from-disable-to-enable.html
the api from from this link answer about to enable all services , but what we need is only to enable / disable the auto start services , as described in the pictures ( like click on button to disable (pic1) ,and click on the button to enable (pic2) )
Through API call it will be bit complex because ambari client needs to send a very huge Payload to make that change.
However the easiest option will be to use the following approach from ambari server host:
To Enable Auto start Services
# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=TestCluster --config-type=cluster-env -k "recovery_enabled" -v "true"
To Disable Auto start Services
# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=TestCluster --config-type=cluster-env -k "recovery_enabled" -v "false"
Please change the Cluster name "TestCluster" and ambari credentials in the above script .
Above script needs to be executed from ambari server host as it has the "config.py" file.
@Jay thank you so much , regrading the cluster size ( https://community.hortonworks.com/questions/177371/cant-start-ambari-collector.html ) , dose cluster size mean - Number of workers machines ?
REST API disable / enable service auto start by API的更多相关文章
- Swagger2在DBA Service中生成RESTful API的实践
目的与背景: 目的:对外暴露DBA Service必要的RESTful API,形成规整的API文档 背景:DBA Service后端采用Spring-boot,属于Spring家族,故生成API的工 ...
- windows service承载的web api宿主搭建(Microsoft.Owin+service)
今天突然想起改良一下以前搭建的“windows service承载的web api”服务,以前也是直接引用的类库,没有使用nuget包,时隔几年应该很旧版本了吧.所以本次把需要nuget获取的包记录一 ...
- http服务 WCF、Web API、Web service、WCF REST之间的区别
http服务 WCF.Web API.Web service.WCF REST之间的区别 在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web ...
- API生命周期第三阶段:API实施:使用swagger codegen生成可部署工程,择取一个作为mock service
在分享培训了swagger对于API的设计之后,有一些人问我说:你看,现在咱们前端使用web_API做为mock data在进行测试,后端也有mock 测试.然后我们再进行联调,这之中肯定会出现一些偏 ...
- Web API和Web Service
首先,Web API是由Web Service演变而来,它们两者关系就是所有Web Service都是API,但并非所有API都是Web Service.其次,两者都有利于信息的传输,但Web API ...
- 【ASP.NET Web API教程】2 创建各种Web API
原文 [ASP.NET Web API教程]2 创建各种Web API Chapter 2: Creating Web APIs第2章 创建各种Web API 本文引自:http://www.asp. ...
- 【ASP.NET Web API教程】1 ASP.NET Web API入门
原文 [ASP.NET Web API教程]1 ASP.NET Web API入门 Getting Started with ASP.NET Web API第1章 ASP.NET Web API入门 ...
- REST API设计指导——译自Microsoft REST API Guidelines(四)
前言 前面我们说了,如果API的设计更规范更合理,在很大程度上能够提高联调的效率,降低沟通成本.那么什么是好的API设计?这里我们不得不提到REST API. 关于REST API的书籍很多,但是完整 ...
- REST API设计指导——译自Microsoft REST API Guidelines(三)
前面我们说了,如果API的设计更规范更合理,在很大程度上能够提高联调的效率,降低沟通成本.那么什么是好的API设计?这里我们不得不提到REST API. 关于REST API的书籍很多,但是完整完善实 ...
随机推荐
- 使用jmeter 进行接口的性能测试
1.启动jmeter:在bin下以管理员身份运行jmeter.bat,启动jmeter 2. 创建测试计划: 默认启动jmeter时会加载一个测试技术模板,保存测试计划:修改名称为Apitest,点击 ...
- 二十一、Hadoop学记笔记————kafka的初识
这些场景的共同点就是数据由上层框架产生,需要由下层框架计算,其中间层就需要有一个消息队列传输系统 Apache flume系统,用于日志收集 Apache storm系统,用于实时数据处理 Spark ...
- WireShark基本抓包数据分析
WireShark抓包数据分析: 1.TCP报文格式 • 源端口.目的端口:16位长.标识出远端和本地的端口号. • 顺序号:32位长.表明了发送的数据报的顺序. • 确认号:32位长.希望收到 ...
- C3垂直居中均分
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- tkinter中布局pack、place和grid(八)
tkinter中布局pack.place和grid pack布局 import tkinter wuya = tkinter.Tk() wuya.title("wuya") wuy ...
- 系列博文-Three.js入门指南(张雯莉)-静态demo和three.js功能概览
一:一个最简单的静态DEMO //body加载完后触发init() //WebGL的渲染是需要HTML5 Canvas元素的,你可以手动在HTML的<body>部分中定义Canvas元素, ...
- node.js面向对象实现(二)继承
http://blog.sina.com.cn/s/blog_b5a53f2e0101nrdi.html 继承是面向对象中非常重要的一个概念,那么在Node.js中如何实现继承呢? node.js在u ...
- python如何优雅的打飞机
这是一个打飞机的游戏,结构如下: 其中images中包含的素材为 命名为alien.png 命名为ship.png 游戏效果运行是这样的: 敌军,也就是体型稍微大点的,在上方左 ...
- [TJOI2015] 棋盘
Description 为了提高智商,ZJY去新世界旅游了.可是旅游过后的ZJY杯具的发现要打开通往原来世界的门,必须要解开门上面画的谜题.谜题是这样的:有个\(n\)行\(m\)列的棋盘,棋盘上可以 ...
- linux相关命令及配置(四)
Linux第四章课堂笔记一.RPM包管理命令 1.RPM包是本地文件,存在于本地文件中 2.使用RPM命令管理.rpm包 3.挂载光驱 # mount /dev/cdrom /media/ 查看:rp ...