private boolean isValidRecord(Set<String> qryTopicSet, Boolean isInclude,
            TopicStatus topicStatus,
            Map<String, TopicDeployEntity> topicConfEntityMap) {
        if (topicConfEntityMap == null || topicConfEntityMap.isEmpty()) {
            return ((qryTopicSet == null || qryTopicSet.isEmpty())
                    && topicStatus == TopicStatus.STATUS_TOPIC_UNDEFINED);
        }
        // first search topic if match require
        if (qryTopicSet != null && !qryTopicSet.isEmpty()) {
            boolean matched = false;
            Set<String> curTopics = topicConfEntityMap.keySet();
            if (isInclude) {
                for (String topic : qryTopicSet) {
                    if (curTopics.contains(topic)) {
                        matched = true;
                        break;
                    }
                }
            } else {
                matched = true;
                for (String topic : qryTopicSet) {
                    if (curTopics.contains(topic)) {
                        matched = false;
                        break;
                    }
                }
            }
            if (!matched) {
                return false;
            }
        }
        // second check topic status if match
        if (topicStatus != TopicStatus.STATUS_TOPIC_UNDEFINED) {
            for (TopicDeployEntity topicConfEntity : topicConfEntityMap.values()) {
                if (topicConfEntity.getDeployStatus() == topicStatus) {
                    return true;
                }
            }
            return false;
        }
        return true;
    }
Check if the record is valid

@param qryTopicSet
@param topicStatus
@param isInclude
@param topicConfEntityMap
@return
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebBrokerConfHandler.java