@Override
        protected void execute(UnifiedLog log) throws InterruptedException {
            // In the first run after completing altering logDir within broker, we should make sure the state is reset. (KAFKA-16711)
            if (!log.parentDir().equals(logDirectory.orElse(null))) {
                copiedOffsetOption = Optional.empty();
                isLogStartOffsetUpdated = false;
                logDirectory = Optional.of(log.parentDir());
            }

            copyLogSegmentsToRemote(log);
        }
Returns the leader epoch entries within the range of the given start[exclusive] and end[inclusive] offset.
<p>
Visible for testing.

@param log         The actual log from where to take the leader-epoch checkpoint
@param startOffset The start offset of the epoch entries (inclusive).
                   If start offset is 6, then it will retain an entry at offset 6.
@param endOffset   The end offset of the epoch entries (exclusive)
                   If end offset is 100, then it will remove the entries greater than or equal to 100.
@return the leader epoch entries
core/src/main/java/kafka/log/remote/RemoteLogManager.java