Ambari client
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.9.2-01</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.4.3-01</version>
</dependenc>
java代码如下,我是尝试访问了一下yarn的schedule属性(资源池)。
AmbariClient aClient = new AmbariClient("10.1.108.45", "8080", "admin", "admin");
String typeName = "capacity-scheduler";
String propertieName = "yarn.scheduler.capacity.root.unfunded.capacity";
Map<String, Map<String, String>> map = aClient.getServiceConfigMap(typeName);
for (String key : map.keySet()) {
System.out.println("key: " + key + ";");
Map<String, String> kvs = map.get(key);
for (String name : kvs.keySet()) {
if (name.equals(propertieName)) {
System.out.println("name: " + name + "; value: " + kvs.get(name));
}
}
}
Map<String, String> mapUpdate = new HashMap<String, String>();
mapUpdate.put(propertieName, "55");
aClient.modifyConfiguration(typeName, mapUpdate);
Ambari client的更多相关文章
- Ubuntu16.04安装Ambari 2.7.3
概念了解 Ambair介绍 Apache Ambari是一个用于支持大数据软件供应 管理与监控软件.它也是一个分布式软件,分为Ambair-Server与Ambari-Client两个部分.在生产环境 ...
- 通过API访问Ambari的配置
HttpClient client = new HttpClient(); Base64.Encoder encoder = Base64.getEncoder(); HttpMethod metho ...
- ubuntu14.04下编译安装ambari-2.4.2.0
ubuntu14.04下编译安装ambari-2.4.2.0 编译前的准备工作 准备工作有: 系统参数 系统依赖(编译环境) 离线安装包 java环境 maven环境 Nodejs环境 git环境 a ...
- 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 ...
- Java 技术栈
JAVA是一个面向对象的编程语言,由SUN公司的程序员所开发.它不仅吸收了C++的各种优点,而且还撇弃了C++中难以理解的概念,如多继承.指针等:因此JAVA语言具有功能强大且简单易用两个特征, JA ...
- Ambari——大数据平台的搭建利器
转载自http://www.ibm.com/developerworks/cn/opensource/os-cn-bigdata-ambari/ 扩展 Ambari 管理一个自定义的 Service ...
- Hadoop - Ambari集群管理剖析
1.Overview Ambari是Apache推出的一个集中管理Hadoop的集群的一个平台,可以快速帮助搭建Hadoop及相关以来组件的平台,管理集群方便.这篇博客记录Ambari的相关问题和注意 ...
- 使用ambari搭建Hadoop平台
1.操作系统 CentoOS Server with GUI(有GUI,有浏览器*ambari基于浏览器*推荐latest stable version)2.分区 默认 + /hadoop3.网络设置 ...
- apache ambari web页面无法访问解决办法
ambari-server启动成功,但是页面无法访问 作者:Bo liang链接:http://www.zhihu.com/question/34405898/answer/115001510来源:知 ...
随机推荐
- Apache HTTP Server——官网下载
Windows版 Apache 2.4.x OpenSSL 1.0.2 VC14 ——Apache 2.4.34 x64(注:x64就是64位,x86就是32位) https://www.apach ...
- AppWidget源码分析---updateAppWidget过程分析
转[原文] 前面一篇文章,分析了AppWidgetProvider和RemoteView的源码,从中我们可以知道它们的实现原理,AppWidgetProvider是一个BroadcastReceive ...
- yii2:Url::toRoute 和 ActiveForm::begin action在二级目录生成地址错误
yii2:Url::toRoute 和 ActiveForm::begin action在二级目录下生成地址错误. 正确地址: /www/super/web/wxreplay/edit-text?id ...
- 一 web爬虫,requests请求
requests请求,就是用python的requests模块模拟浏览器请求,返回html源码 模拟浏览器请求有两种,一种是不需要用户登录或者验证的请求,一种是需要用户登录或者验证的请求 一.不需要用 ...
- 51nod 1639 递推
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1639 1639 绑鞋带 基准时间限制:1 秒 空间限制:131072 K ...
- ZOJ 3203 Light Bulb(数学对勾函数)
Light Bulb Time Limit: 1 Second Memory Limit: 32768 KB Compared to wildleopard's wealthiness, h ...
- 条款24:如果所有的参数都需要类型转换,那么请为此采用non-member函数
首先还是下面这个class; class Rational{ public: Rational(, ); int numurator() const; int denominator() const; ...
- js 取任意两个数之间的随机整数
function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Mat ...
- HDU - 6241 :Color a Tree(不错的二分)
Bob intends to color the nodes of a tree with a pen. The tree consists of NN nodes. These nodes are ...
- 深入了解ZooKeeper(一)
在上篇博客ZooKeeper初探之安装和配置中已经对Zookeeper这个“服务协调者”有了初步的认识和了解,一个字“美”,接下来开始深入的交往,开始了解其内心世界! 1. 内容思维导图 2. 分布式 ...