Cloudera Manager API v14
端口:主节点 ip:cm 端口
注:橙色方法为收费版可用
/api/v14/audits
个人理解:此方法会返回 登陆者的时间,操作的服务,登陆的用户名,登陆者的 ip 地址,操
作详情,以及操作是否成功。
官方翻译:
get
从 Cloudera Manager(CM)和 CM 管理服务(如 HDFS,HBase,Impala,Hive 和
Sentry)读取审计事件。
默认情况下,此调用将根据提供的结束时间(默认为当前 CM 服务器时间)提取
对应于 1 天窗口的前 100 个审核事件(从最近到最旧排序)。 startTime 和
endTime 参数可用于控制正在查询的窗口。
仅当 Cloudera Navigator 服务器正在运行时,才会检索 CM 管理服务的审核事件。
描述
返回的最大数量
查询开始时间(默认为 1 天前的相对时间)日期和时间之间用
参数名
maxResults
resultOffset 返回偏移量
startTime
T 隔开 Z 代表 utc 时间和北京差 8 小时
endTime
ipAddress
Allowed
结束时间,默认为当前时间
来访人的 ip 地址
是否允许 teue 或 false
/api/v14/audits/stream //无介绍
个人理解:与上个相似。
/api/v14/batch
Post
在一个数据库事务中执行一批 API 请求。 如果任何请求失败,则执行停止并且
事务回滚。
/api/v14/clusters
get
列出所有已知的集群
/api/v14/clusters/{clusterName}
Get
列出指定集群的信息 默认是 get 操作
有以下操作
Put 更新现有的集群
要更新 CDH 版本,请在“fullVersion”属性中提供新值。 设置与实际安装的软
件匹配的正确版本将确保正确的版本特定功能,如服务,角色,命令和配置。 不
需要对使用安装包的群集手动设置。 一般来说,只有在手动更新 CDH 软件包之
后,才需要执行此操作。 请注意,如果降级可能会导致现有服务或角色不可用,
则可能会拒绝降级。 对于主要升级,应使用“upgradeService”集群命令。
要重命名集群,请在 API> = 6 的“displayName”属性中或在 API <= 5 的“name”
属性中提供新名称。
DELETE 删除集群
参数:
clusterName 要删除的群集的名称。
Get 读取集群的信息
参数: clusterName 要查找的群集的名称。
/api/v14/clusters/{clusterName}/autoAssignRoles
Put
自动分配给主机的角色,并为集群中的所有服务创建角色。
/api/v14/clusters/{clusterName}/autoConfigure
Put
自动配置集群中的角色和服务。
( Automatically configures roles and services in a cluster.)
/api/v14/clusters/{clusterName}/clientConfig
Get
下载客户端配置的压缩压缩包,一个特定的集群。
(Download a zip-compressed archive of the client configuration, of a specific cluster.)
目前,这只包括 Kerberos 客户端配置(krb5 conf)。为服务的客户端配置,使用服务资源
clientconfig 端点。此资源不需要任何身份验证。
/api/v14/clusters/{clusterName}/commands
Get
一个活动的群集命令列表。(List active cluster commands. )
其他参数
View 数据的视图展现 View=summary 或者 View=full
/api/v14/clusters/{clusterName}/commands/configureForKerberos
Kerberos 的简介:
简单来说,没有做 kerberos 认证的 Hadoop,只要有 client 端就能够连接上。而且,通过一个有
root 的权限的内网机器,通过创建对应的 Linux 用户,就能够得到 Hadoop 集群上对应的权限。
而实行 Kerberos 后,任意机器的任意用户都必须现在 Kerberos 的 KDC 中有记录,才允许和集群
中其它的模块进行通信。
post
配置集群以使用 Kerberos 进行身份验证的命令。 此命令将配置集群上的所有相
关服务以使用 Kerberos。 此命令将触发 GenerateCredentials 命令为集群中的
所有角色创建 Kerberos 密钥表。
/api/v14/clusters/{clusterName}/commands/deployClientConfig
Post
部署群集范围的客户端配置。
对于集群中的每个服务,将服务的客户端配置部署到服务运行的所有主机上。
自 API v2 起可用。
/api/v14/clusters/{clusterName}/commands/deployClusterClientConfig
post
部署群集的 Kerberos 客户端配置。
将 krb5.conf 部署到集群中的主机。 不部署到已停用的主机或具有活动进程的
主机。
自 API v7 起可用。
/api/v14/clusters/{clusterName}/commands/enterMaintenanceMode
post
把集群设为维护模式,这是一个同步命令
/api/v14/clusters/{clusterName}/commands/exitMaintenanceMode
post
采取维护模式的集群,这是一个同步命令
/api/v14/clusters/{clusterName}/commands/firstRun
post
准备和在集群启动服务。
(Prepare and start services in a cluster.)
执行在集群中准备每个服务所需的所有步骤,并按顺序启动服务。
自 API v7 起可用。
/api/v14/clusters/{clusterName}/commands/inspectHosts
post
在指定集群中配置的主机上运行主机检查器。
(Runs the host inspector on the configured hosts in the specified cluste)
可用自 V8。
/api/v14/clusters/{clusterName}/commands/poolsRefresh
post
使用动态资源池更新服务的所有可刷新配置文件。
(Updates all refreshable configuration files for services with Dynamic Resource
Pools.)
自 API v6 起可用。
/api/v14/clusters/{clusterName}/commands/refresh
Post
在集群更新所有可更新的配置文件。
(Updates all refreshable configuration files in the cluster.)
不会重新启动任何角色。
/api/v14/clusters/{clusterName}/commands/restart
post
重新启动集群中的所有服务。
服务被停止,然后开始在适当的顺序给他们的依赖关系。命令可以启动只有陈旧
的服务和它们的依赖以及重新部署客户端配置在群集的所有服务。
/api/v14/clusters/{clusterName}/commands/rollingRestart
Post
命令做一个“best-effort”滚动重新启动的给定的集群,即它不简单的重新启动服
务,不能滚动重新启动,然后先滚动重新启动 主节点,然后滚动重新启动服务
的 从节点角色,可以滚动重新启动。The slave restarts are done
host-by-host.
/api/v14/clusters/{clusterName}/commands/rollingUpgrade
Post
滚动升级集群
/api/v14/clusters/{clusterName}/commands/start
Post
在集群中启动所有服务。
服务是在给定的依赖关系中开始的适当的顺序开始的。
/api/v14/clusters/{clusterName}/commands/stop
Post
停止集群中的所有服务。
服务被停止在适当的顺序给他们的依赖关系
/api/v14/clusters/{clusterName}/commands/upgradeCdh
Post
执行 CDH 升级到指定的版本。
/api/v14/clusters/{clusterName}/commands/upgradeServices
该操作已经被取消
/api/v14/clusters/{clusterName}/dfsServices
Get
列表可以提供分布式文件系统服务(DFS)在这个集群能力( capabilities )。
/api/v14/clusters/{clusterName}/export
Get
导出给定的群集的群集模板。如果集群没有主机模板定义,它将基于角色分配导
出主机模板。
/api/v14/clusters/{clusterName}/hosts
支持以下操作
Get
查看与群集关联的主机
Post
新加入的主机到群集。如果主机已经是一个成员,它将被排除在列表之外
Delete
所有的主机都与集群无关
/api/v14/clusters/{clusterName}/hosts/{hostId}
Delete
删除指定节点的主机与集群的关联
/api/v14/clusters/{clusterName}/hostTemplates
有以下操作
Post
创建新的主机模板。
主机模板名称必须是唯一的
Get
列出集群中的所有主机模板。
/api/v14/clusters/{clusterName}/hostTemplates/{hostTemplateName}
有以下操作
Get
检索关于主机模板的信息
Put
更新现有主机模板。
可以用来更新主机模板中的角色配置组或重命名它。
Delete
删除主机模板
/api/v14/clusters/{clusterName}/hostTemplates/{hostTemplateName}/comm
ands/applyHostTemplate
Post
将主机模板应用到主机的集合。
Applies a host template to a collection of hosts. This will create a role for each role
config group on each of the hosts.
The provided hosts must not have any existing roles on them and if the cluster is not
using parcels, the hosts must have a CDH version matching that of the cluster
version.
/api/v14/clusters/{clusterName}/parcels
Get
列出群集已访问的所有安装包
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}
Get
检查安装包的详细信息
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/activate
Post
激活群集上的安装包的同步命令。
由于它是同步的,返回时立即知道结果。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/cancelDistribution
Post
取消安装包分发的同步命令。
由于它是同步的,返回时立即知道结果。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/cancelDownload
Post
取消安装包下载的同步命令。
由于它是同步的,返回时立即知道结果。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/deactivate
Post
同步命令,用于禁用群集上的安装包。
由于它是同步的,返回时立即知道结果。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/removeDownload
Post
同步命令,用于删除下载的安装包。
由于它是同步的,返回时立即知道结果。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/startDistribution
Post
启动将安装包分发到群集的同步命令。
由于它是同步的,返回时立即知道结果。 为了查看分发的进度,需要调用
ParcelResource#readParcel()。
/a
pi/v14/clusters/{clusterName}/parcels/products/{product}/versions/{ve
rsion}/commands/startDownload
Post
启动安装包下载的同步命令。
由于它是同步的,返回时立即知道结果。 为了看到下载的进度,需要调用
ParcelResource#readParcel()。
/api/v14/clusters/{clusterName}/parcels/products/{product}/versions/{
version}/commands/startRemovalOfDistribution
Post
同步命令,用于从群集中的主机中删除分发。
由于它是同步的,返回时立即知道结果。 为了看到删除的进度,需要调用
ParcelResource#readParcel()。
/api/v14/clusters/{clusterName}/parcels/usage
Get
检索群集的安装包使用信息。 这描述了哪些进程,角色和主机正在使用哪些安
装包。
/api/v14/clusters/{clusterName}/services
Get
列出在群集中注册的所有服务。
Post
创建服务列表。
通常有两种服务创建策略:
调用者可以选择设置新的服务片段,首先创建服务本身(没有任何角
色或配置),然后创建角色,然后指定配置。
或者,调用者可以通过完全指定
com.cloudera.api.model.ApiService 对象中的字段来打包一次调用中的所有
信息,服务配置和角色类型配置,和角色到主机分配。
/api/v14/clusters/{clusterName}/services/{serviceName}
Get
检索有关服务的详细信息。
Put
更新服务信息。
此方法将仅更新服务信息的可写字段。 目前只包括服务显示名称
Delete
从系统中删除服务。
/api/v14/clusters/{clusterName}/services/{serviceName}/activities
Get
读取系统中的所有活动(Read all activities in the system)
/api/v14/clusters/{clusterName}/services/{serviceName}/activities/{ac
tivityId}
Get
返回系统中的特定活动
/api/v14/clusters/{clusterName}/services/{serviceName}/activities/{ac
tivityId}/children
Get
返回子活动
/api/v14/clusters/{clusterName}/services/{serviceName}/activities/{ac
tivityId}/metrics