MapReduce服务 MRS-导出用户列表:代码样例

时间:2023-11-01 16:19:45

代码样例

以下代码片段是导出用户列表的示例,在rest.ExportUsers类的main方法中。

    String operationName = "ExportUsers";    String exportOperationUrl = webUrl + EXPORT_URL;    HttpManager httpManager = new HttpManager();    //调用导出接口    String responseLineContent = httpManager        .sendHttpPostRequestWithString(httpClient, exportOperationUrl, StringUtils.EMPTY, operationName);    //调用下载接口    operationName = "DownloadUsers";    JSONObject jsonObj = JSON.parseObject(responseLineContent);    String downloadOperationUrl = webUrl + DOWNLOAD_URL + jsonObj.getString("fileName");    httpManager.sendHttpGetRequest(httpClient, downloadOperationUrl, operationName);
support.huaweicloud.com/devg3-mrs/mrs_07_440017.html