Search in sources :

Example 11 with MetaDataAcquireFailedException

use of com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException in project Qualitis by WeBankFinTech.

the class MetaDataClientImpl method getDbsByDataSource.

@Override
public Map getDbsByDataSource(String clusterName, String authUser, Long dataSourceId) throws UnExpectedRequestException, MetaDataAcquireFailedException {
    // Check existence of cluster name
    ClusterInfo clusterInfo = checkClusterNameExists(clusterName);
    // send request to get dbs
    String url = getPath(clusterInfo.getLinkisAddress()).path(linkisConfig.getDatasourceDb()).queryParam("system", "Qualitis").toString().replace("{DATA_SOURCE_ID}", dataSourceId.toString());
    HttpHeaders headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_JSON);
    headers.add("Token-User", authUser);
    headers.add("Token-Code", clusterInfo.getLinkisToken());
    HttpEntity<Object> entity = new HttpEntity<>(headers);
    LOGGER.info("Start to get dbs by data source. url: {}, method: {}, body: {}", url, javax.ws.rs.HttpMethod.GET, entity);
    Map<String, Object> response = restTemplate.exchange(url, HttpMethod.GET, entity, Map.class).getBody();
    LOGGER.info("Finish to get dbs by data source. response: {}", response);
    if (!checkResponse(response)) {
        String message = (String) response.get("message");
        LOGGER.error("Error! Can not get meta data from linkis, message: " + message);
        throw new MetaDataAcquireFailedException("Error! Can not get meta data from linkis, exception: " + message);
    }
    Map data = (Map) response.get(LinkisResponseKeyEnum.DATA.getKey());
    List<Map> dbs = (List<Map>) data.get("dbs");
    if (CollectionUtils.isEmpty(dbs)) {
        LOGGER.info("No dbs with data source to be choosed.");
    }
    return data;
}
Also used : HttpHeaders(org.springframework.http.HttpHeaders) ClusterInfo(com.webank.wedatasphere.qualitis.entity.ClusterInfo) HttpEntity(org.springframework.http.HttpEntity) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) JSONObject(org.json.JSONObject) ArrayList(java.util.ArrayList) List(java.util.List) Map(java.util.Map)

Example 12 with MetaDataAcquireFailedException

use of com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException in project Qualitis by WeBankFinTech.

the class MetaDataClientImpl method getColumnsByDataSource.

@Override
public DataInfo<ColumnInfoDetail> getColumnsByDataSource(String clusterName, String authUser, Long dataSourceId, String dbName, String tableName) throws UnExpectedRequestException, MetaDataAcquireFailedException {
    // Check existence of cluster name
    ClusterInfo clusterInfo = checkClusterNameExists(clusterName);
    // send request to get dbs
    String url = getPath(clusterInfo.getLinkisAddress()).path(linkisConfig.getDatasourceColumn()).queryParam("system", "Qualitis").toString().replace("{DATA_SOURCE_ID}", dataSourceId.toString()).replace("{DATA_SOURCE_DB}", dbName).replace("{DATA_SOURCE_TABLE}", tableName);
    HttpHeaders headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_JSON);
    headers.add("Token-User", authUser);
    headers.add("Token-Code", clusterInfo.getLinkisToken());
    HttpEntity<Object> entity = new HttpEntity<>(headers);
    LOGGER.info("Start to get columns by data source. url: {}, method: {}, body: {}", url, javax.ws.rs.HttpMethod.GET, entity);
    Map<String, Object> response = restTemplate.exchange(url, HttpMethod.GET, entity, Map.class).getBody();
    LOGGER.info("Finish to get columns by data source. response: {}", response);
    if (!checkResponse(response)) {
        String message = (String) response.get("message");
        LOGGER.error("Error! Can not get meta data from linkis, message: " + message);
        throw new MetaDataAcquireFailedException("Error! Can not get meta data from linkis, exception: " + message);
    }
    Map data = (Map) response.get(LinkisResponseKeyEnum.DATA.getKey());
    DataInfo<ColumnInfoDetail> result = new DataInfo<>();
    List<Map> tables = (List<Map>) data.get("columns");
    if (CollectionUtils.isEmpty(tables)) {
        LOGGER.info("No columns with data source to be choosed.");
    } else {
        List<ColumnInfoDetail> columnInfoDetailList = new ArrayList<>(tables.size());
        for (Map map : tables) {
            ColumnInfoDetail columnInfoDetail = new ColumnInfoDetail();
            columnInfoDetail.setFieldName((String) map.get("name"));
            columnInfoDetail.setDataType((String) map.get("type"));
            columnInfoDetailList.add(columnInfoDetail);
        }
        result.setTotalCount(columnInfoDetailList.size());
        result.setContent(columnInfoDetailList);
    }
    return result;
}
Also used : DataInfo(com.webank.wedatasphere.qualitis.metadata.response.DataInfo) HttpHeaders(org.springframework.http.HttpHeaders) HttpEntity(org.springframework.http.HttpEntity) ArrayList(java.util.ArrayList) ColumnInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.column.ColumnInfoDetail) ClusterInfo(com.webank.wedatasphere.qualitis.entity.ClusterInfo) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) JSONObject(org.json.JSONObject) ArrayList(java.util.ArrayList) List(java.util.List) Map(java.util.Map)

Example 13 with MetaDataAcquireFailedException

use of com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException in project Qualitis by WeBankFinTech.

the class MetaDataClientImpl method createDataSource.

@Override
public GeneralResponse<Map> createDataSource(String clusterName, String authUser, String jsonRequest) throws UnExpectedRequestException, MetaDataAcquireFailedException {
    // Check existence of cluster name
    ClusterInfo clusterInfo = checkClusterNameExists(clusterName);
    // send request to get dbs
    String url = getPath(clusterInfo.getLinkisAddress()).path(linkisConfig.getDatasourceCreate()).toString();
    HttpHeaders headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_JSON);
    headers.add("Token-User", authUser);
    headers.add("Token-Code", clusterInfo.getLinkisToken());
    HttpEntity<Object> entity = new HttpEntity<>(jsonRequest, headers);
    LOGGER.info("Start to create data source by user and cluster by linkis. url: {}, method: {}, body: {}", url, javax.ws.rs.HttpMethod.POST, entity);
    Map<String, Object> response = restTemplate.exchange(url, HttpMethod.POST, entity, Map.class).getBody();
    LOGGER.info("Finish to create data source by user and cluster by linkis. response: {}", response);
    if (!checkResponse(response)) {
        String message = (String) response.get("message");
        LOGGER.error("Error! Can not get meta data from linkis, message: " + message);
        throw new MetaDataAcquireFailedException("Error! Can not get meta data from linkis, exception: " + message);
    }
    Map data = (Map) response.get(LinkisResponseKeyEnum.DATA.getKey());
    return new GeneralResponse<>("200", "Success to create datasource", data);
}
Also used : GeneralResponse(com.webank.wedatasphere.qualitis.response.GeneralResponse) HttpHeaders(org.springframework.http.HttpHeaders) ClusterInfo(com.webank.wedatasphere.qualitis.entity.ClusterInfo) HttpEntity(org.springframework.http.HttpEntity) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) JSONObject(org.json.JSONObject) Map(java.util.Map)

Example 14 with MetaDataAcquireFailedException

use of com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException in project Qualitis by WeBankFinTech.

the class MetaDataClientImpl method getDataSourceInfoPage.

@Override
public GeneralResponse<Map> getDataSourceInfoPage(String clusterName, String authUser, int page, int size, String searchName, Long typeId) throws UnExpectedRequestException, MetaDataAcquireFailedException, UnsupportedEncodingException {
    // Check existence of cluster name
    ClusterInfo clusterInfo = checkClusterNameExists(clusterName);
    // send request to get dbs
    UriBuilder uriBuilder = getPath(clusterInfo.getLinkisAddress()).path(linkisConfig.getDatasourceInfo()).queryParam("currentPage", page).queryParam("pageSize", size);
    if (StringUtils.isNotBlank(searchName)) {
        uriBuilder.queryParam("name", searchName);
    }
    if (typeId != null) {
        uriBuilder.queryParam("typeId", typeId);
    }
    String url = uriBuilder.toString();
    url = URLDecoder.decode(url, "UTF-8");
    HttpHeaders headers = new HttpHeaders();
    headers.setContentType(MediaType.APPLICATION_JSON);
    headers.add("Token-User", authUser);
    headers.add("Token-Code", clusterInfo.getLinkisToken());
    HttpEntity<Object> entity = new HttpEntity<>(headers);
    LOGGER.info("Start to get data source info by user and cluster by linkis. url: {}, method: {}, body: {}", url, javax.ws.rs.HttpMethod.GET, entity);
    Map<String, Object> response = restTemplate.exchange(url, HttpMethod.GET, entity, Map.class).getBody();
    LOGGER.info("Finish to get data source info by user and cluster by linkis. response: {}", response);
    if (!checkResponse(response)) {
        String message = (String) response.get("message");
        LOGGER.error("Error! Can not get meta data from linkis, message: " + message);
        throw new MetaDataAcquireFailedException("Error! Can not get meta data from linkis, exception: " + message);
    }
    Map data = (Map) response.get(LinkisResponseKeyEnum.DATA.getKey());
    List<Map> types = (List<Map>) data.get("query_list");
    return new GeneralResponse<>("200", "Success to get datasource info", data);
}
Also used : HttpHeaders(org.springframework.http.HttpHeaders) HttpEntity(org.springframework.http.HttpEntity) GeneralResponse(com.webank.wedatasphere.qualitis.response.GeneralResponse) ClusterInfo(com.webank.wedatasphere.qualitis.entity.ClusterInfo) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) JSONObject(org.json.JSONObject) ArrayList(java.util.ArrayList) List(java.util.List) UriBuilder(javax.ws.rs.core.UriBuilder) Map(java.util.Map)

Example 15 with MetaDataAcquireFailedException

use of com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException in project Qualitis by WeBankFinTech.

the class MetaDataServiceImpl method addMultiDbRules.

@Override
@Transactional(rollbackFor = { Exception.class, UnExpectedRequestException.class })
public String addMultiDbRules(MulDbRequest request) throws UnExpectedRequestException, MetaDataAcquireFailedException {
    MulDbRequest.checkRequst(request);
    String loginUser = HttpUtils.getUserName(httpServletRequest);
    LOGGER.info("Start to get all tables with source database and target database.");
    List<String> sourceTableName = new ArrayList<>();
    List<String> targetTableName = new ArrayList<>();
    if (request.getSourceLinkisDataSourceId() == null) {
        GetUserTableByDbIdRequest sourceRequest = new GetUserTableByDbIdRequest(0, Integer.MAX_VALUE, request.getClusterName(), request.getSourceDb());
        sourceRequest.setProxyUser(request.getProxyUser());
        GeneralResponse<GetAllResponse<TableInfoDetail>> sourceTableInfos = getUserTableByDbId(sourceRequest);
        if (sourceTableInfos.getData().getTotal() <= 0) {
            throw new UnExpectedRequestException("Source database has no tables.");
        }
        sourceTableName.addAll(sourceTableInfos.getData().getData().stream().map(TableInfoDetail::getTableName).collect(Collectors.toList()));
    } else {
        Map response = getTablesByDataSource(request.getClusterName(), request.getProxyUser(), request.getSourceLinkisDataSourceId(), request.getSourceDb());
        List<String> tables = (List<String>) response.get("tables");
        for (String table : tables) {
            sourceTableName.add(table);
        }
    }
    if (request.getTargetLinkisDataSourceId() == null) {
        GetUserTableByDbIdRequest targetRequest = new GetUserTableByDbIdRequest(0, Integer.MAX_VALUE, request.getClusterName(), request.getTargetDb());
        targetRequest.setProxyUser(request.getProxyUser());
        GeneralResponse<GetAllResponse<TableInfoDetail>> targetTableInfos = getUserTableByDbId(targetRequest);
        if (targetTableInfos.getData().getTotal() <= 0) {
            throw new UnExpectedRequestException("Target database has no tables.");
        }
        targetTableName.addAll(targetTableInfos.getData().getData().stream().map(TableInfoDetail::getTableName).collect(Collectors.toList()));
    } else {
        Map response = getTablesByDataSource(request.getClusterName(), request.getProxyUser(), request.getTargetLinkisDataSourceId(), request.getTargetDb());
        List<String> tables = (List<String>) response.get("tables");
        for (String table : tables) {
            targetTableName.add(table);
        }
    }
    // Collect the table with the same name that exists in the source database and the target database.
    sourceTableName.retainAll(targetTableName);
    Set<String> ruleFailedTable = new HashSet<>();
    Long projectId = request.getProjectId();
    List<String> ruleTables = new ArrayList<>(ruleDataSourceDao.findByProjectId(projectId).stream().map(RuleDataSource::getTableName).distinct().collect(Collectors.toList()));
    // Filter tables for which rules have been created.
    sourceTableName = sourceTableName.stream().filter(tableName -> !ruleTables.contains(tableName)).collect(Collectors.toList());
    // Rule name index starts with the last created rule.
    int ruleIndex = ruleDao.findByProject(projectDao.findById(projectId)).size();
    // Filter tables with black list.
    sourceTableName = filterTablesWithBlackList(request.getBlackList(), sourceTableName);
    // White list.
    List<String> whiteList = request.getWhiteList();
    // Filter special table to compare with accuracy template.
    List<FilterRequest> filterRequests = request.getFilterRequests();
    List<FilterRequest> sameTableFilterRequests = filterRequests.stream().filter(filterRequest -> filterRequest.getSourceTable().equals(filterRequest.getTargetTable())).collect(Collectors.toList());
    List<String> filterSameTableName = sameTableFilterRequests.stream().map(FilterRequest::getSourceTable).collect(Collectors.toList());
    sourceTableName.removeAll(filterSameTableName);
    filterRequests.removeAll(sameTableFilterRequests);
    List<String> filterDiffTableName = filterRequests.stream().map(filterRequest -> filterRequest.getSourceTable() + SpecCharEnum.COLON.getValue() + filterRequest.getTargetTable()).collect(Collectors.toList());
    whiteList.removeAll(filterDiffTableName);
    filterRequests.addAll(sameTableFilterRequests);
    // Check flag: create rules in a loop, and only do permission verification for the first time.
    boolean check = true;
    int sourceTableSize = sourceTableName.size();
    int filterRequestsSize = filterRequests.size();
    int total = ruleIndex + sourceTableSize + whiteList.size() + filterRequestsSize;
    int i = ruleIndex;
    for (; i < ruleIndex + sourceTableSize; i++) {
        String currentSameTable = sourceTableName.get(i - ruleIndex);
        try {
            AddMultiSourceRuleRequest addMultiSourceRuleRequest = constructRequest(request, null, currentSameTable, currentSameTable, i, total, loginUser);
            LOGGER.info("Start to add {}th multi source rule.", i);
            if (i > 0) {
                check = false;
            }
            multiSourceRuleService.addMultiSourceRule(addMultiSourceRuleRequest, check);
        } catch (Exception e) {
            LOGGER.error("One of rule failed to add, rule index:[{}], table name: [{}], exception:{}", i, currentSameTable, e.getMessage());
            ruleFailedTable.add(currentSameTable);
        }
        LOGGER.info("Finish to add {}th multi source rule.", i);
    }
    // With white list.
    withWhiteListAndFilterRequest(i, ruleIndex, sourceTableSize, total, whiteList, filterRequests, request, loginUser, check);
    // Record the table that failed to create a rule.
    saveRuleFailedTableInLabel(ruleFailedTable, projectId);
    // projectEventService.record(projectId, loginUser, "create multi-source rule with dbs", "Success: " + (total - ruleFailedTable.size()) + "; Failed: " + ruleFailedTable.size(), EventTypeEnum.MODIFY_PROJECT.getCode());
    return request.getSourceDb() + " vs " + request.getSourceDb() + ": " + "{&CONTINUE_CREATE_RULES}";
}
Also used : GetUserTableByDbIdRequest(com.webank.wedatasphere.qualitis.request.GetUserTableByDbIdRequest) Arrays(java.util.Arrays) StringUtils(org.apache.commons.lang.StringUtils) LoggerFactory(org.slf4j.LoggerFactory) GetUserColumnByCsRequest(com.webank.wedatasphere.qualitis.metadata.request.GetUserColumnByCsRequest) Autowired(org.springframework.beans.factory.annotation.Autowired) RuleDataSource(com.webank.wedatasphere.qualitis.rule.entity.RuleDataSource) GeneralResponse(com.webank.wedatasphere.qualitis.response.GeneralResponse) ClusterInfoDao(com.webank.wedatasphere.qualitis.dao.ClusterInfoDao) HttpUtils(com.webank.wedatasphere.qualitis.util.HttpUtils) Map(java.util.Map) MultiDataSourceConfigRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceConfigRequest) GetClusterByUserRequest(com.webank.wedatasphere.qualitis.metadata.request.GetClusterByUserRequest) ProjectService(com.webank.wedatasphere.qualitis.project.service.ProjectService) GetAllResponse(com.webank.wedatasphere.qualitis.response.GetAllResponse) AlarmConfigRequest(com.webank.wedatasphere.qualitis.rule.request.AlarmConfigRequest) ProjectEventService(com.webank.wedatasphere.qualitis.project.service.ProjectEventService) GetUserDbByClusterRequest(com.webank.wedatasphere.qualitis.request.GetUserDbByClusterRequest) GetAllClusterResponse(com.webank.wedatasphere.qualitis.response.GetAllClusterResponse) DataSourceModifyRequest(com.webank.wedatasphere.qualitis.request.DataSourceModifyRequest) AddMultiSourceRuleRequest(com.webank.wedatasphere.qualitis.rule.request.multi.AddMultiSourceRuleRequest) MappingOperationEnum(com.webank.wedatasphere.qualitis.rule.constant.MappingOperationEnum) Context(javax.ws.rs.core.Context) TableInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.table.TableInfoDetail) Set(java.util.Set) Collectors(java.util.stream.Collectors) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) GetDbByUserAndClusterRequest(com.webank.wedatasphere.qualitis.metadata.request.GetDbByUserAndClusterRequest) List(java.util.List) ClusterInfo(com.webank.wedatasphere.qualitis.entity.ClusterInfo) MetaDataClient(com.webank.wedatasphere.qualitis.metadata.client.MetaDataClient) Pattern(java.util.regex.Pattern) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) DataSourceConnectRequest(com.webank.wedatasphere.qualitis.request.DataSourceConnectRequest) GetUserClusterRequest(com.webank.wedatasphere.qualitis.request.GetUserClusterRequest) UnsupportedEncodingException(java.io.UnsupportedEncodingException) BlackListFilterTypeEnum(com.webank.wedatasphere.qualitis.constant.BlackListFilterTypeEnum) ClusterInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.cluster.ClusterInfoDetail) GetTableByUserAndDbRequest(com.webank.wedatasphere.qualitis.metadata.request.GetTableByUserAndDbRequest) Project(com.webank.wedatasphere.qualitis.project.entity.Project) RuleLimitationService(com.webank.wedatasphere.qualitis.rule.service.RuleLimitationService) SpecCharEnum(com.webank.wedatasphere.qualitis.constant.SpecCharEnum) MulDbRequest(com.webank.wedatasphere.qualitis.request.MulDbRequest) RuleDataSourceDao(com.webank.wedatasphere.qualitis.rule.dao.RuleDataSourceDao) ProjectDao(com.webank.wedatasphere.qualitis.project.dao.ProjectDao) DataSourceParamModifyRequest(com.webank.wedatasphere.qualitis.request.DataSourceParamModifyRequest) FilterRequest(com.webank.wedatasphere.qualitis.request.FilterRequest) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) HttpServletRequest(javax.servlet.http.HttpServletRequest) CheckTemplateEnum(com.webank.wedatasphere.qualitis.rule.constant.CheckTemplateEnum) CollectionUtils(org.apache.commons.collections.CollectionUtils) Service(org.springframework.stereotype.Service) GetUserTableByCsIdRequest(com.webank.wedatasphere.qualitis.metadata.request.GetUserTableByCsIdRequest) CompareTypeEnum(com.webank.wedatasphere.qualitis.rule.constant.CompareTypeEnum) MetaDataService(com.webank.wedatasphere.qualitis.service.MetaDataService) MultiDataSourceJoinColumnRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceJoinColumnRequest) CsTableInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.table.CsTableInfoDetail) Logger(org.slf4j.Logger) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) GetColumnByUserAndTableRequest(com.webank.wedatasphere.qualitis.metadata.request.GetColumnByUserAndTableRequest) GetUserColumnByTableIdRequest(com.webank.wedatasphere.qualitis.request.GetUserColumnByTableIdRequest) ColumnInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.column.ColumnInfoDetail) DbInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.db.DbInfoDetail) DataInfo(com.webank.wedatasphere.qualitis.metadata.response.DataInfo) MultiSourceRuleService(com.webank.wedatasphere.qualitis.rule.service.MultiSourceRuleService) RuleDao(com.webank.wedatasphere.qualitis.rule.dao.RuleDao) MultiDataSourceJoinConfigRequest(com.webank.wedatasphere.qualitis.rule.request.multi.MultiDataSourceJoinConfigRequest) GetUserTableByDbIdRequest(com.webank.wedatasphere.qualitis.request.GetUserTableByDbIdRequest) Comparator(java.util.Comparator) Collections(java.util.Collections) Transactional(org.springframework.transaction.annotation.Transactional) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) ArrayList(java.util.ArrayList) MetaDataAcquireFailedException(com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException) UnExpectedRequestException(com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) FilterRequest(com.webank.wedatasphere.qualitis.request.FilterRequest) List(java.util.List) ArrayList(java.util.ArrayList) GetAllResponse(com.webank.wedatasphere.qualitis.response.GetAllResponse) TableInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.table.TableInfoDetail) CsTableInfoDetail(com.webank.wedatasphere.qualitis.metadata.response.table.CsTableInfoDetail) Map(java.util.Map) HashSet(java.util.HashSet) AddMultiSourceRuleRequest(com.webank.wedatasphere.qualitis.rule.request.multi.AddMultiSourceRuleRequest) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

MetaDataAcquireFailedException (com.webank.wedatasphere.qualitis.metadata.exception.MetaDataAcquireFailedException)33 Map (java.util.Map)31 ClusterInfo (com.webank.wedatasphere.qualitis.entity.ClusterInfo)28 JSONObject (org.json.JSONObject)26 HttpEntity (org.springframework.http.HttpEntity)26 HttpHeaders (org.springframework.http.HttpHeaders)26 GeneralResponse (com.webank.wedatasphere.qualitis.response.GeneralResponse)21 ArrayList (java.util.ArrayList)18 List (java.util.List)16 UnExpectedRequestException (com.webank.wedatasphere.qualitis.exception.UnExpectedRequestException)11 ColumnInfoDetail (com.webank.wedatasphere.qualitis.metadata.response.column.ColumnInfoDetail)8 DataInfo (com.webank.wedatasphere.qualitis.metadata.response.DataInfo)7 ResourceAccessException (org.springframework.web.client.ResourceAccessException)7 CsTableInfoDetail (com.webank.wedatasphere.qualitis.metadata.response.table.CsTableInfoDetail)6 UriBuilder (javax.ws.rs.core.UriBuilder)6 SpecCharEnum (com.webank.wedatasphere.qualitis.constant.SpecCharEnum)4 ClusterInfoDao (com.webank.wedatasphere.qualitis.dao.ClusterInfoDao)4 MetaDataClient (com.webank.wedatasphere.qualitis.metadata.client.MetaDataClient)4 PartitionStatisticsInfo (com.webank.wedatasphere.qualitis.metadata.response.table.PartitionStatisticsInfo)4 TableInfoDetail (com.webank.wedatasphere.qualitis.metadata.response.table.TableInfoDetail)4