|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hdfs.protocol.LocatedBlocks
@InterfaceAudience.Private @InterfaceStability.Evolving public class LocatedBlocks
Collection of blocks with their locations and the file length.
Constructor Summary | |
---|---|
LocatedBlocks(long flength,
boolean isUnderConstuction,
List<LocatedBlock> blks,
LocatedBlock lastBlock,
boolean isLastBlockCompleted)
public Constructor |
Method Summary | |
---|---|
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. |
void |
readFields(DataInput in)
|
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocatedBlocks(long flength, boolean isUnderConstuction, List<LocatedBlock> blks, LocatedBlock lastBlock, boolean isLastBlockCompleted)
Method Detail |
---|
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)
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |