调用AddUserHdfsInfo在Xpack里增加用户自建的hdfs地址

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String AddUserHdfsInfo

系统规定参数。取值:AddUserHdfsInfo。

ClusterId String hb-bp16o0pd52e3y582s
ExtInfo String {"dfs.nameservices":"hdfs_test","dfs.ha.namenodes":"nn1,nn2","dfs.namenode.http-address.hdfs_test.nn1":"TEST-xxx1.com:50070","dfs.namenode.http-address.hdfs_test.nn2":"TEST-xxx2.com:50070","dfs.namenode.rpc-address.hdfs_test.nn1":"TEST-xxx1.com:8020","dfs.namenode.rpc-address.hdfs_test.nn2":"TEST-xxx2.com:8020"}

dfs.nameservices为hdfs的nameservices名称,dfs.ha.namenodes为dfs节点,如nn1,nn2,

dfs.namenode.http-address.{dfs.nameservices}.nn1 为hdfs nn1的50070链接

dfs.namenode.http-address.{dfs.nameservices}.nn2 为hdfs nn2的50070链接

dfs.namenode.rpc-address.{dfs.nameservices}.nn1 为hdfs nn1的8020链接

dfs.namenode.rpc-address.{dfs.nameservices}.nn2 为hdfs nn2的8020链接

50070端口链接和8020端口链接在dfs各个节点都有,也就是说dfs有几个节点,下面就有几对50070和8020端口的链接

返回数据

名称 类型 示例值 描述
RequestId String FB0B7918-198C-46A8-AB9B-FE15403B1F0A

示例

请求示例

http(s)://[Endpoint]/?Action=AddUserHdfsInfo
&ClusterId=hb-bp16o0pd52e3y582s
&ExtInfo={"dfs.nameservices":"hdfs_test","dfs.ha.namenodes":"nn1,nn2","dfs.namenode.http-address.hdfs_test.nn1":"TEST-xxx1.com:50070","dfs.namenode.http-address.hdfs_test.nn2":"TEST-xxx2.com:50070","dfs.namenode.rpc-address.hdfs_test.nn1":"TEST-xxx1.com:8020","dfs.namenode.rpc-address.hdfs_test.nn2":"TEST-xxx2.com:8020"}
&<公共请求参数>

正常返回示例

JSON 格式

{"RequestId":"FB0B7918-198C-46A8-AB9B-FE15403B1F0A"}

XML 格式

<RequestId>FB0B7918-198C-46A8-AB9B-FE15403B1F0A</RequestId>

错误码

访问错误中心查看更多错误码。