@Private
@Evolving
public class LocatedBlocks
extends java.lang.Object
| Constructor | Description |
|---|---|
LocatedBlocks() |
|
LocatedBlocks(long flength,
boolean isUnderConstuction,
java.util.List<LocatedBlock> blks,
LocatedBlock lastBlock,
boolean isLastBlockCompleted,
org.apache.hadoop.fs.FileEncryptionInfo feInfo,
ErasureCodingPolicy ecPolicy) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
findBlock(long offset) |
Find block containing specified offset.
|
LocatedBlock |
get(int index) |
Get located block.
|
ErasureCodingPolicy |
getErasureCodingPolicy() |
|
org.apache.hadoop.fs.FileEncryptionInfo |
getFileEncryptionInfo() |
|
long |
getFileLength() |
|
static int |
getInsertIndex(int binSearchResult) |
|
LocatedBlock |
getLastLocatedBlock() |
Get the last located block.
|
java.util.List<LocatedBlock> |
getLocatedBlocks() |
Get located blocks.
|
void |
insertRange(int blockIdx,
java.util.List<LocatedBlock> newBlocks) |
|
boolean |
isLastBlockComplete() |
Is the last block completed?
|
boolean |
isUnderConstruction() |
Return true if file was under construction when this LocatedBlocks was
constructed, false otherwise.
|
int |
locatedBlockCount() |
Get number of located blocks.
|
java.lang.String |
toString() |
public LocatedBlocks()
public LocatedBlocks(long flength,
boolean isUnderConstuction,
java.util.List<LocatedBlock> blks,
LocatedBlock lastBlock,
boolean isLastBlockCompleted,
org.apache.hadoop.fs.FileEncryptionInfo feInfo,
ErasureCodingPolicy ecPolicy)
public java.util.List<LocatedBlock> getLocatedBlocks()
public LocatedBlock getLastLocatedBlock()
public boolean isLastBlockComplete()
public LocatedBlock get(int index)
public int locatedBlockCount()
public long getFileLength()
public boolean isUnderConstruction()
public org.apache.hadoop.fs.FileEncryptionInfo getFileEncryptionInfo()
public ErasureCodingPolicy getErasureCodingPolicy()
public int findBlock(long offset)
public void insertRange(int blockIdx,
java.util.List<LocatedBlock> newBlocks)
public static int getInsertIndex(int binSearchResult)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.