@InterfaceAudience.Private public class ReaderContextBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.fs.Path |
filePath |
private long |
fileSize |
private FSDataInputStreamWrapper |
fsdis |
private HFileSystem |
hfs |
private boolean |
primaryReplicaReader |
private ReaderContext.ReaderType |
type |
| Constructor and Description |
|---|
ReaderContextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ReaderContext |
build() |
private void |
validateFields() |
ReaderContextBuilder |
withFilePath(org.apache.hadoop.fs.Path filePath) |
ReaderContextBuilder |
withFileSize(long fileSize) |
ReaderContextBuilder |
withFileSystem(org.apache.hadoop.fs.FileSystem fs) |
ReaderContextBuilder |
withFileSystem(HFileSystem hfs) |
ReaderContextBuilder |
withFileSystemAndPath(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path filePath) |
ReaderContextBuilder |
withInputStreamWrapper(FSDataInputStreamWrapper fsdis) |
ReaderContextBuilder |
withPrimaryReplicaReader(boolean primaryReplicaReader) |
ReaderContextBuilder |
withReaderType(ReaderContext.ReaderType type) |
private org.apache.hadoop.fs.Path filePath
private FSDataInputStreamWrapper fsdis
private long fileSize
private HFileSystem hfs
private boolean primaryReplicaReader
private ReaderContext.ReaderType type
public ReaderContextBuilder()
public ReaderContextBuilder withFilePath(org.apache.hadoop.fs.Path filePath)
public ReaderContextBuilder withFileSize(long fileSize)
public ReaderContextBuilder withInputStreamWrapper(FSDataInputStreamWrapper fsdis)
public ReaderContextBuilder withFileSystem(HFileSystem hfs)
public ReaderContextBuilder withFileSystem(org.apache.hadoop.fs.FileSystem fs)
public ReaderContextBuilder withPrimaryReplicaReader(boolean primaryReplicaReader)
public ReaderContextBuilder withReaderType(ReaderContext.ReaderType type)
public ReaderContextBuilder withFileSystemAndPath(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path filePath) throws IOException
IOExceptionpublic ReaderContext build()
private void validateFields() throws IllegalArgumentException
IllegalArgumentExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.