class DiscoveryMetaStore extends MetadataRocksDBStore {

    /**
     * appName --> address --> registryInfo
     */
    private static final String PREFIX = "REGIS-";
    private static final String SPLITTER = "-";

    public DiscoveryMetaStore(PDConfig pdConfig) {
        super(pdConfig);
    }

    public void register(NodeInfo nodeInfo, int outTimes) throws PDException {
        putWithTTL(toKey(nodeInfo.getAppName(), nodeInfo.getVersion(), nodeInfo.getAddress()),
                   nodeInfo.toByteArray(), (nodeInfo.getInterval() / 1000) * outTimes);
    }

    byte[] toKey(String appName, String version, String address) {
        StringBuilder builder = getPrefixBuilder(appName, version);
        builder.append(SPLITTER);
        builder.append(address);
        return builder.toString().getBytes();
    }

    private StringBuilder getPrefixBuilder(String appName, String version) {
        StringBuilder builder = new StringBuilder();
        builder.append(PREFIX);
        if (!StringUtils.isEmpty(appName)) {
            builder.append(appName);
            builder.append(SPLITTER);
        }
        if (!StringUtils.isEmpty(version)) {
            builder.append(version);
        }
        return builder;
    }

    public NodeInfos getNodes(Query query) {<FILL_FUNCTION_BODY>}

    private boolean labelMatch(NodeInfo node, Query query) {
        Map<String, String> labelsMap = node.getLabelsMap();
        for (Map.Entry<String, String> entry : query.getLabelsMap().entrySet()) {
            if (!entry.getValue().equals(labelsMap.get(entry.getKey()))) {
                return false;
            }
        }
        return true;
    }
}

        List<NodeInfo> nodeInfos = null;
        try {
            StringBuilder builder = getPrefixBuilder(query.getAppName(),
                                                     query.getVersion());
            nodeInfos = getInstanceListWithTTL(
                    NodeInfo.parser(),
                    builder.toString().getBytes());
            builder.setLength(0);
        } catch (PDException e) {
            log.error("An error occurred getting data from the store,{}", e);
        }
        if (query.getLabelsMap() != null && !query.getLabelsMap().isEmpty()) {
            List result = new LinkedList<NodeInfo>();
            for (NodeInfo node : nodeInfos) {
                if (labelMatch(node, query)) {
                    result.add(node);
                }
            }
            return NodeInfos.newBuilder().addAllInfo(result).build();
        }
        return NodeInfos.newBuilder().addAllInfo(nodeInfos).build();

    
<methods>public void <init>(org.apache.hugegraph.pd.config.PDConfig) ,public void clearAllCache() throws org.apache.hugegraph.pd.common.PDException,public void close() ,public boolean containsKey(byte[]) throws org.apache.hugegraph.pd.common.PDException,public List#RAW getListWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public byte[] getOne(byte[]) throws org.apache.hugegraph.pd.common.PDException,public E getOne(Parser<E>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public org.apache.hugegraph.pd.store.HgKVStore getStore() ,public byte[] getWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public void put(byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException,public void putWithTTL(byte[], byte[], long) throws org.apache.hugegraph.pd.common.PDException,public void putWithTTL(byte[], byte[], long, java.util.concurrent.TimeUnit) throws org.apache.hugegraph.pd.common.PDException,public long remove(byte[]) throws org.apache.hugegraph.pd.common.PDException,public long removeByPrefix(byte[]) throws org.apache.hugegraph.pd.common.PDException,public void removeWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public List<org.apache.hugegraph.pd.store.KV> scanPrefix(byte[]) throws org.apache.hugegraph.pd.common.PDException,public List<E> scanPrefix(Parser<E>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public List<org.apache.hugegraph.pd.store.KV> scanRange(byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException,public List<E> scanRange(Parser<E>, byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException<variables>org.apache.hugegraph.pd.config.PDConfig pdConfig,org.apache.hugegraph.pd.store.HgKVStore store