@NotThreadSafe
public final class InStreamOptions
extends java.lang.Object
OpenFilePOptions as well as the URIStatus being read. In addition to
providing access to the fields, it provides convenience functions for various nested
fields and creating Protocol.ReadRequests.| Constructor and Description |
|---|
InStreamOptions(URIStatus status,
AlluxioConfiguration alluxioConf)
Creates with the default
OpenFilePOptions. |
InStreamOptions(URIStatus status,
AlluxioConfiguration alluxioConf,
FileSystemContext context)
Creates with the default
OpenFilePOptions. |
InStreamOptions(URIStatus status,
OpenFilePOptions options,
AlluxioConfiguration alluxioConf,
FileSystemContext context)
Creates with given
OpenFilePOptions instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
BlockInfo |
getBlockInfo(long blockId) |
Protocol.OpenUfsBlockOptions |
getOpenUfsBlockOptions(long blockId) |
OpenFilePOptions |
getOptions() |
boolean |
getPositionShort() |
URIStatus |
getStatus() |
BlockLocationPolicy |
getUfsReadLocationPolicy() |
int |
hashCode() |
void |
setPositionShort(boolean positionShort)
Sets whether the operation is positioned read to a small buffer.
|
void |
setUfsReadLocationPolicy(BlockLocationPolicy ufsReadLocationPolicy)
Sets block read location policy.
|
java.lang.String |
toString() |
public InStreamOptions(URIStatus status, @Nonnull AlluxioConfiguration alluxioConf)
OpenFilePOptions.status - the file to create the options foralluxioConf - Alluxio configurationpublic InStreamOptions(URIStatus status, @Nonnull AlluxioConfiguration alluxioConf, @Nonnull FileSystemContext context)
OpenFilePOptions.status - the file to create the options foralluxioConf - Alluxio configurationcontext - the file system contextpublic InStreamOptions(URIStatus status, @Nonnull OpenFilePOptions options, @Nonnull AlluxioConfiguration alluxioConf, @Nonnull FileSystemContext context)
OpenFilePOptions instance.status - URI statusoptions - OpenFile optionsalluxioConf - Alluxio configurationcontext - the file system contextpublic OpenFilePOptions getOptions()
OpenFilePOptions associated with the instreampublic void setUfsReadLocationPolicy(BlockLocationPolicy ufsReadLocationPolicy)
ufsReadLocationPolicy - block location policy implementationpublic void setPositionShort(boolean positionShort)
positionShort - whether the operation is positioned read to a small bufferpublic BlockLocationPolicy getUfsReadLocationPolicy()
BlockLocationPolicy associated with the instreampublic boolean getPositionShort()
public BlockInfo getBlockInfo(long blockId)
blockId - id of the blockpublic Protocol.OpenUfsBlockOptions getOpenUfsBlockOptions(long blockId)
blockId - id of the blockProtocol.OpenUfsBlockOptions based on the block id and optionspublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2022. All Rights Reserved.