use of com.webank.wedatasphere.qualitis.response.LinkisConfigurationResponse in project Qualitis by WeBankFinTech.
the class LinkisConfigurationController method getFullTree.
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public GeneralResponse<?> getFullTree(@QueryParam("cluster_name") String clusterName) throws UnExpectedRequestException {
String userName = HttpUtils.getUserName(httpServletRequest);
try {
Map<String, Map> reponse = linkisConfiguration.getFullTree(clusterName, userName);
LinkisConfigurationResponse linkisConfigurationResponse = new LinkisConfigurationResponse();
linkisConfigurationResponse.setQueueName(reponse.get("full_tree_queue_name"));
linkisConfigurationResponse.setQueue(reponse.get("full_tree"));
return new GeneralResponse<>("200", "{&SUCCESS_TO_GET_STARTUP_PATAM}", reponse);
} catch (UnExpectedRequestException e) {
throw new UnExpectedRequestException(e.getMessage());
} catch (Exception e) {
LOGGER.error("Failed to , caused by: {}", e.getMessage(), e);
return new GeneralResponse<>("500", "{&FAILED_TO_GET_STARTUP_PATAM}", null);
}
}
Aggregations