You can call this operation to add custom HDFS addresses in Xpack.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddUserHdfsInfo

The operation that you want to perform. Set the value to AddUserHdfsInfo.

ClusterId String Yes hb-bp16o0pd52e3y582s
ExtInfo String Yes {"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"}

You need to set the dfs.nameservices parameter to the nameservices of HDFS and the dfs.ha.namenodes parameter to the DFS node such as nn1, nn2.

You need to set the dfs.namenode.http-address.{dfs.nameservices}.nn1 parameter to the connection address to HDFS nn1 over port 50070.

You need to set the dfs.namenode.http-address.{dfs.nameservices}.nn2 parameter to the connection address to HDFS nn2 over port 50070.

You need to set the dfs.namenode.rpc-address.{dfs.nameservices}.nn1 parameter to the connection address to HDFS nn1 over port 8020.

You need to set the dfs.namenode.rpc-address.{dfs.nameservices}.nn2 parameter to the connection address to HDFS nn2 over port 8020.

Each DFS node has a connection address over port 50070 and a connection address over port 8020.

Response parameters

Parameter Type Example Description
RequestId String FB0B7918-198C-46A8-AB9B-FE15403B1F0A

Examples

Sample requests

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"}
&<Common request parameters>

Sample success responses

JSON format

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

XML format

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

Error codes

For a list of error codes, visit the API Error Center.