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的书籍很多,但是完整完善实 ...
随机推荐
- 前端为什么非要动静分离 说一下CDN托管的意义
大型Web应用对速度的追求并没有止步于仅仅利用浏览器缓存,因为浏览器缓存始终只是为了提升二次访问的速度,对于首次访问的加速,我们需要从网络层面进行优化,最常见的手段就是CDN(Content Deli ...
- SSM-MyBatis-03:Mybatis中简单的整合日志
------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥-------------简单的整合日志,首先提供俩种方式,log4j和logback简单的说一下logback,他由log4j的原作者编 ...
- 理解矩阵与线性代数<转>
作者:张帅链接:https://www.zhihu.com/question/21082351/answer/34361293来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出 ...
- 在Linux上使用PGP签名验证文件完整性
文件在下载及存储过程中可能由于传输错误.硬件故障.文件系统错误等网络.硬件和软件方面的原因导致文件损坏,也可能在传输过程中受到攻击(如"中间人攻击")导致下载的文件被篡改或者下载到 ...
- SOA专题---Dropwizard与Spring Boot比较
在这篇文章中我们将讨论的Java轻量级框架Dropwizard和Spring Boot的相似性和差异. 首先,这是一个选择自由和速度需要,无论你在Dropwizard和Spring Boot选择哪个, ...
- tkinter中布局pack、place和grid(八)
tkinter中布局pack.place和grid pack布局 import tkinter wuya = tkinter.Tk() wuya.title("wuya") wuy ...
- QM4_Probability
Basic Concepts Probability concepts Terms Random variable A quantity whose possible values are uncer ...
- Python字符编码与转码
字符编码与转码 注: 该图转自 http://www.cnblogs.com/luotianshuai/p/5735051.html. Python2 解码,编码 #Python2 #-*- codi ...
- 关于top命令的使用
在服务器运维过程中,我们有时需要知道当前状态下的系统运行性能,该如何获取呢?今天,咱们聊一下关于top这个小命令的一些知识. top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资 ...
- java 自定义的注解有什么作用
转自https://zhidao.baidu.com/question/1668622526729638507.html 自定义注解,可以应用到反射中,比如自己写个小框架. 如实现实体类某些属性不自动 ...