@Override
    public TubeMQResult deleteOffset(DeleteOffsetReq req) {

        MasterEntry master = masterService.getMasterNode(Long.valueOf(req.getClusterId()));
        if (master == null) {
            return TubeMQResult.errorResult("no such cluster");
        }

        // 1. query the corresponding brokers having given topic
        TubeHttpTopicInfoList topicInfoList = requestTopicConfigInfo(master, req.getTopicName());
        TubeMQResult result = new TubeMQResult();
        CleanOffsetResult cleanOffsetResult = new CleanOffsetResult();
        if (topicInfoList == null) {
            return TubeMQResult.errorResult("no such topic");
        }

        List<TubeHttpTopicInfoList.TopicInfoList.TopicInfo> topicInfos = topicInfoList.getTopicInfo();
        // 2. for each broker, request to delete offset
        for (TubeHttpTopicInfoList.TopicInfoList.TopicInfo topicInfo : topicInfos) {
            String brokerIp = topicInfo.getBrokerIp();
            result = brokerService.deleteOffset(brokerIp, brokerWebPort, req);
            if (result.getErrCode() != TubeConst.SUCCESS_CODE) {
                cleanOffsetResult.getFailBrokers().add(brokerIp);
            } else {
                cleanOffsetResult.getSuccessBrokers().add(brokerIp);
            }
        }
        result.setData(gson.toJson(cleanOffsetResult));
        return result;
    }
Validates if the provided URL string is in a valid URL format.

@param url The URL string to be validated.
@return True if the URL is in a valid format, otherwise false.
inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/service/TopicServiceImpl.java