Skip to content
Open
Changes from 2 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 @@ -17,6 +17,7 @@

package org.apache.hadoop.hdds.utils.io;

import java.io.Closeable;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
Expand All @@ -29,7 +30,7 @@
import org.slf4j.LoggerFactory;

/** {@link RandomAccessFile} and its {@link FileChannel}. */
public class RandomAccessFileChannel {
public class RandomAccessFileChannel implements Closeable {
private static final Logger LOG = LoggerFactory.getLogger(RandomAccessFileChannel.class);

private File blockFile;
Expand Down Expand Up @@ -86,6 +87,7 @@ public synchronized boolean read(ByteBuffer buffer) throws IOException {
* In case of exception, this method catches the exception, logs a warning message,
* and then continue closing the remaining resources.
*/
@Override
public synchronized void close() {
if (blockFile == null) {
return;
Expand Down
Loading