Skip to content

Commit

Permalink
KAFKA-17513 Move LogSegmentsTest to storage module (apache#17173)
Browse files Browse the repository at this point in the history
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
  • Loading branch information
xijiu authored Sep 14, 2024
1 parent 61a8d65 commit 7a321f2
Show file tree
Hide file tree
Showing 4 changed files with 318 additions and 280 deletions.
279 changes: 0 additions & 279 deletions core/src/test/scala/unit/kafka/log/LogSegmentsTest.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.apache.kafka.common.TopicPartition;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
Expand All @@ -34,7 +35,7 @@
* This class encapsulates a thread-safe navigable map of LogSegment instances and provides the
* required read and write behavior on the map.
*/
public class LogSegments {
public class LogSegments implements Closeable {

private final TopicPartition topicPartition;
/* the segments of the log with key being LogSegment base offset and value being a LogSegment */
Expand Down Expand Up @@ -102,6 +103,7 @@ public void clear() {
/**
* Close all segments.
*/
@Override
public void close() throws IOException {
for (LogSegment s : values())
s.close();
Expand Down
Loading

0 comments on commit 7a321f2

Please sign in to comment.