Modifier and Type | Method and Description |
---|---|
static List<BlockInfo> |
computeBlocks(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.FileStatus status)
Returns a list of
BlockInfo for the target file. |
static BlockMap |
create(String path,
long fileSize,
Collection<BlockInfo> blockList,
boolean combineBlocks)
Create
BlockMap . |
DirectInputFragment |
get(long start,
long end)
Returns
DirectInputFragment for the range. |
List<BlockInfo> |
getBlocks()
Returns the file blocks in this map.
|
long |
getFileSize()
Returns the file size.
|
public long getFileSize()
public List<BlockInfo> getBlocks()
public static List<BlockInfo> computeBlocks(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.FileStatus status) throws IOException
BlockInfo
for the target file.fs
- the target filestatus
- the target file statusIOException
- if failed to compute informationpublic static BlockMap create(String path, long fileSize, Collection<BlockInfo> blockList, boolean combineBlocks)
BlockMap
.path
- the target file pathfileSize
- the target file sizeblockList
- the original block listcombineBlocks
- true
to combine consecutive blocks with same ownerspublic DirectInputFragment get(long start, long end)
DirectInputFragment
for the range.start
- the start offset (inclusive)end
- the end offset (exclusive)Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.