public void run() {
            if (isCancelled())
                return;

            try {
                Optional<UnifiedLog> unifiedLogOptional = fetchLog.apply(topicIdPartition.topicPartition());

                if (!unifiedLogOptional.isPresent()) {
                    return;
                }

                execute(unifiedLogOptional.get());
            } catch (InterruptedException ex) {
                if (!isCancelled()) {
                    logger.warn("Current thread for topic-partition-id {} is interrupted", topicIdPartition, ex);
                }
            } catch (RetriableException ex) {
                logger.debug("Encountered a retryable error while executing current task for topic-partition {}", topicIdPartition, ex);
            } catch (Exception ex) {
                if (!isCancelled()) {
                    logger.warn("Current task for topic-partition {} received error but it will be scheduled", topicIdPartition, ex);
                }
            }
        }
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