public class S3ABlockManager
extends org.apache.hadoop.fs.impl.prefetch.BlockManager
BlockManager
that provides no prefetching or caching.
Useful baseline for comparing performance difference against S3ACachingBlockManager
.Constructor and Description |
---|
S3ABlockManager(S3ARemoteObjectReader reader,
org.apache.hadoop.fs.impl.prefetch.BlockData blockData)
Constructs an instance of
S3ABlockManager . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read(ByteBuffer buffer,
long startOffset,
int size)
Reads into the given
buffer size bytes from the underlying file
starting at startOffset . |
public S3ABlockManager(S3ARemoteObjectReader reader, org.apache.hadoop.fs.impl.prefetch.BlockData blockData)
S3ABlockManager
.reader
- a reader that reads from S3 file.blockData
- information about each block of the S3 file.IllegalArgumentException
- if reader is null.IllegalArgumentException
- if blockData is null.public int read(ByteBuffer buffer, long startOffset, int size) throws IOException
buffer
size
bytes from the underlying file
starting at startOffset
.read
in class org.apache.hadoop.fs.impl.prefetch.BlockManager
buffer
- the buffer to read data in to.startOffset
- the offset at which reading starts.size
- the number bytes to read.IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.hadoop.fs.impl.prefetch.BlockManager
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.