public Checkpoint deserializeFrom()

in src/main/java/com/aliyun/dts/subscribe/clients/metastore/LocalFileMetaStore.java [99:120]


    public Checkpoint deserializeFrom(TopicPartition topicPartition, String groupID) {
        Map<TopicPartition, Checkpoint> tpAndCheckpointMap = inMemStore.get(groupID);
        if (null != tpAndCheckpointMap) {
            Checkpoint ret = tpAndCheckpointMap.get(topicPartition);
            if (null != ret) {
                return ret;

            }
        }
        List<String> storedCheckpoint = fileStore.getContent();
        for (String checkpoint : storedCheckpoint) {
            StoreElement storeElement = fromString(checkpoint);
            // add to cache
            if (!inMemStore.containsKey(storeElement.groupName)) {
                inMemStore.put(storeElement.groupName, storeElement.streamCheckpoint);
            }
            if (StringUtils.equals(storeElement.groupName, groupID)) {
                return storeElement.streamCheckpoint.get(topicPartition);
            }
        }
        return null;
    }