public class S3ACachingBlockManager
extends org.apache.hadoop.fs.impl.prefetch.CachingBlockManager
Constructor and Description |
---|
S3ACachingBlockManager(org.apache.hadoop.fs.impl.prefetch.BlockManagerParameters blockManagerParameters,
S3ARemoteObjectReader reader)
Constructs an instance of a
S3ACachingBlockManager . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected S3ARemoteObjectReader |
getReader() |
int |
read(ByteBuffer buffer,
long startOffset,
int size)
Reads into the given
buffer size bytes from the underlying file
starting at startOffset . |
public S3ACachingBlockManager(@Nonnull org.apache.hadoop.fs.impl.prefetch.BlockManagerParameters blockManagerParameters, S3ARemoteObjectReader reader)
S3ACachingBlockManager
.blockManagerParameters
- params for block manager.reader
- reader that reads from S3 file.IllegalArgumentException
- if reader is null.protected S3ARemoteObjectReader getReader()
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.CachingBlockManager
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.