private Map parseTopicSchemaPath()

in src/main/java/org/apache/doris/kafka/connector/decode/avro/DorisAvroConverter.java [112:138]


    private Map<String, String> parseTopicSchemaPath(String topicSchemaPath) {
        Map<String, String> topic2SchemaPathMap = new HashMap<>();
        boolean isInvalid = false;
        for (String s : topicSchemaPath.split(",")) {
            String[] split = s.split(":file://");
            if (split.length != 2 || split[0].trim().isEmpty() || split[1].trim().isEmpty()) {
                LOG.error(
                        "Invalid {} config format: {}",
                        AVRO_TOPIC_SCHEMA_FILEPATH,
                        topicSchemaPath);
                isInvalid = true;
            }

            String topic = split[0].trim();
            String schemaPath = split[1].trim();

            if (topic2SchemaPathMap.containsKey(topic)) {
                LOG.error("topic name {} is duplicated.", topic);
                isInvalid = true;
            }
            topic2SchemaPathMap.put(topic, schemaPath);
        }
        if (isInvalid) {
            throw new DataDecodeException("Failed to parse " + AVRO_TOPIC_SCHEMA_FILEPATH + " map");
        }
        return topic2SchemaPathMap;
    }