Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ class HDFSMetadataLog[T <: AnyRef : ClassTag](
}

/** Return the latest batch id without reading the file. */
def getLatestBatchId(): Option[Long] = listBatches.sorted.lastOption
def getLatestBatchId(): Option[Long] = listBatches.maxOption

override def getLatest(): Option[(Long, T)] = {
listBatches.sorted.lastOption.map { batchId =>
listBatches.maxOption.map { batchId =>
logInfo(log"Getting latest batch ${MDC(BATCH_ID, batchId)}")
(batchId, getExistingBatch(batchId))
}
Expand Down