@InterfaceAudience.Private @InterfaceStability.Evolving public class LocatedBlocks extends Object
Constructor and Description |
---|
LocatedBlocks() |
LocatedBlocks(long flength,
boolean isUnderConstuction,
List<LocatedBlock> blks,
LocatedBlock lastBlock,
boolean isLastBlockCompleted)
public Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
findBlock(long offset)
Find block containing specified offset.
|
LocatedBlock |
get(int index)
Get located block.
|
long |
getFileLength() |
static int |
getInsertIndex(int binSearchResult) |
LocatedBlock |
getLastLocatedBlock()
Get the last located block.
|
List<LocatedBlock> |
getLocatedBlocks()
Get located blocks.
|
void |
insertRange(int blockIdx,
List<LocatedBlock> newBlocks) |
boolean |
isLastBlockComplete()
Is the last block completed?
|
boolean |
isUnderConstruction()
Return ture if file was under construction when
this LocatedBlocks was constructed, false otherwise.
|
int |
locatedBlockCount()
Get number of located blocks.
|
String |
toString() |
public LocatedBlocks()
public LocatedBlocks(long flength, boolean isUnderConstuction, List<LocatedBlock> blks, LocatedBlock lastBlock, boolean isLastBlockCompleted)
public List<LocatedBlock> getLocatedBlocks()
public LocatedBlock getLastLocatedBlock()
public boolean isLastBlockComplete()
public LocatedBlock get(int index)
public int locatedBlockCount()
public long getFileLength()
public boolean isUnderConstruction()
public int findBlock(long offset)
public void insertRange(int blockIdx, List<LocatedBlock> newBlocks)
public static int getInsertIndex(int binSearchResult)
Copyright © 2013 Apache Software Foundation. All rights reserved.