class MetadataRocksDBStore extends MetadataStoreBase {

    HgKVStore store;

    PDConfig pdConfig;

    public MetadataRocksDBStore(PDConfig pdConfig) {
        store = MetadataFactory.getStore(pdConfig);
        this.pdConfig = pdConfig;
    }

    public HgKVStore getStore() {
        if (store == null) {
            store = MetadataFactory.getStore(pdConfig);
        }
        return store;
    }

    @Override
    public byte[] getOne(byte[] key) throws PDException {
        try {
            byte[] bytes = store.get(key);
            return bytes;
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_READ_ERROR_VALUE, e);
        }
    }

    @Override
    public <E> E getOne(Parser<E> parser, byte[] key) throws PDException {
        try {
            byte[] bytes = store.get(key);
            if (ArrayUtils.isEmpty(bytes)) {
                return null;
            }
            return parser.parseFrom(bytes);
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_READ_ERROR_VALUE, e);
        }
    }

    @Override
    public void put(byte[] key, byte[] value) throws PDException {
        try {
            getStore().put(key, value);
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_WRITE_ERROR_VALUE, e);
        }
    }

    @Override
    public void putWithTTL(byte[] key, byte[] value, long ttl) throws PDException {
        this.store.putWithTTL(key, value, ttl);
    }

    @Override
    public void putWithTTL(byte[] key, byte[] value, long ttl, TimeUnit timeUnit) throws
                                                                                  PDException {
        this.store.putWithTTL(key, value, ttl, timeUnit);
    }

    @Override
    public byte[] getWithTTL(byte[] key) throws PDException {
        return this.store.getWithTTL(key);
    }

    @Override
    public List getListWithTTL(byte[] key) throws PDException {
        return this.store.getListWithTTL(key);
    }

    @Override
    public void removeWithTTL(byte[] key) throws PDException {
        this.store.removeWithTTL(key);
    }

    @Override
    public List<KV> scanPrefix(byte[] prefix) throws PDException {
        //TODO 使用rocksdb 前缀查询
        try {
            return this.store.scanPrefix(prefix);
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_READ_ERROR_VALUE, e);
        }
    }

    @Override
    public List<KV> scanRange(byte[] start, byte[] end) throws PDException {
        return this.store.scanRange(start, end);
    }

    @Override
    public <E> List<E> scanRange(Parser<E> parser, byte[] start, byte[] end) throws PDException {
        List<E> stores = new LinkedList<>();
        try {
            List<KV> kvs = this.scanRange(start, end);
            for (KV keyValue : kvs) {
                stores.add(parser.parseFrom(keyValue.getValue()));
            }
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_READ_ERROR_VALUE, e);
        }
        return stores;
    }

    @Override
    public <E> List<E> scanPrefix(Parser<E> parser, byte[] prefix) throws PDException {
        List<E> stores = new LinkedList<>();
        try {
            List<KV> kvs = this.scanPrefix(prefix);
            for (KV keyValue : kvs) {
                stores.add(parser.parseFrom(keyValue.getValue()));
            }
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_READ_ERROR_VALUE, e);
        }
        return stores;
    }

    @Override
    public boolean containsKey(byte[] key) throws PDException {
        return !ArrayUtils.isEmpty(store.get(key));
    }

    @Override
    public long remove(byte[] key) throws PDException {<FILL_FUNCTION_BODY>}

    @Override
    public long removeByPrefix(byte[] prefix) throws PDException {
        try {
            return this.store.removeByPrefix(prefix);
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_WRITE_ERROR_VALUE, e);
        }
    }

    @Override
    public void clearAllCache() throws PDException {
        this.store.clear();
    }

    @Override
    public void close() {

    }
}

        try {
            return this.store.remove(key);
        } catch (Exception e) {
            throw new PDException(Pdpb.ErrorType.ROCKSDB_WRITE_ERROR_VALUE, e);
        }
    
<methods>public non-sealed void <init>() ,public abstract void clearAllCache() throws org.apache.hugegraph.pd.common.PDException,public abstract void close() throws java.io.IOException,public abstract boolean containsKey(byte[]) throws org.apache.hugegraph.pd.common.PDException,public List<T> getInstanceListWithTTL(Parser<T>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public T getInstanceWithTTL(Parser<T>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract List#RAW getListWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract byte[] getOne(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract E getOne(Parser<E>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract byte[] getWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract void put(byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract void putWithTTL(byte[], byte[], long) throws org.apache.hugegraph.pd.common.PDException,public abstract void putWithTTL(byte[], byte[], long, java.util.concurrent.TimeUnit) throws org.apache.hugegraph.pd.common.PDException,public abstract long remove(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract long removeByPrefix(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract void removeWithTTL(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract List<org.apache.hugegraph.pd.store.KV> scanPrefix(byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract List<E> scanPrefix(Parser<E>, byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract List<org.apache.hugegraph.pd.store.KV> scanRange(byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException,public abstract List<E> scanRange(Parser<E>, byte[], byte[]) throws org.apache.hugegraph.pd.common.PDException<variables>