private Endpoint getLeaderByRegionEngine(final long regionId) {
        final RegionEngine regionEngine = getRegionEngine(regionId);
        if (regionEngine != null) {
            final PeerId leader = regionEngine.getLeaderId();
            if (leader != null) {
                final String raftGroupId = JRaftHelper.getJRaftGroupId(this.pdClient.getClusterName(), regionId);
                RouteTable.getInstance().updateLeader(raftGroupId, leader);
                return leader.getEndpoint();
            }
        }
        return null;
    }
Returns a heap-allocated iterator over the contents of the
database.
<p>
Caller should close the iterator when it is no longer needed.
The returned iterator should be closed before this db is closed.
<p>
<pre>
    KVIterator it = unsafeLocalIterator();
    try {
        // do something
    } finally {
        it.close();
    }
<pre/>
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java