public static Map<String, String> parseLabels(String labels, Map<String, String> labelMap) {
        if (labelMap == null) {
            labelMap = new LinkedHashMap<>();
        }
        if (labels == null || labels.length() == 0) {
            return labelMap;
        }
        String[] labelArray = labels.split(DELIMITER);
        for (String label : labelArray) {
            int index = label.indexOf(KEY_VALUE_DELIMITER);
            if (index < 1 || index == label.length() - 1) {
                throw new IllegalArgumentException("The format of labels must be like 'key1=value1&key2=value2...'");
            }
            labelMap.put(label.substring(0, index), label.substring(index + 1));
        }
        return labelMap;
    }
Parse the labels to label map

@param labels The labels format by 'key1=value1&key2=value2...'
@return The label map of labels
inlong-sort/sort-flink/base/src/main/java/org/apache/inlong/sort/base/util/LabelUtils.java