org.apache.hadoop.util.IntrusiveCollection.Element, org.apache.hadoop.util.LightWeightGSet.LinkedElement@LimitedPrivate("HDFS")
public final class CachedBlock
extends java.lang.Object
implements org.apache.hadoop.util.IntrusiveCollection.Element, org.apache.hadoop.util.LightWeightGSet.LinkedElement
| Constructor | Description |
|---|---|
CachedBlock(long blockId,
short replication,
boolean mark) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
long |
getBlockId() |
|
java.util.List<DatanodeDescriptor> |
getDatanodes(DatanodeDescriptor.CachedBlocksList.Type type) |
Get a list of the datanodes which this block is cached,
planned to be cached, or planned to be uncached on.
|
boolean |
getMark() |
|
org.apache.hadoop.util.LightWeightGSet.LinkedElement |
getNext() |
|
org.apache.hadoop.util.IntrusiveCollection.Element |
getNext(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list) |
|
org.apache.hadoop.util.IntrusiveCollection.Element |
getPrev(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list) |
|
short |
getReplication() |
|
int |
hashCode() |
|
void |
insertInternal(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element prev,
org.apache.hadoop.util.IntrusiveCollection.Element next) |
|
boolean |
isInList(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list) |
|
boolean |
isPresent(DatanodeDescriptor.CachedBlocksList cachedBlocksList) |
Return true if this CachedBlock is present on the given list.
|
void |
removeInternal(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list) |
|
void |
setNext(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element next) |
|
void |
setNext(org.apache.hadoop.util.LightWeightGSet.LinkedElement next) |
|
void |
setPrev(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element prev) |
|
void |
setReplicationAndMark(short replication,
boolean mark) |
|
java.lang.String |
toString() |
public long getBlockId()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void setReplicationAndMark(short replication,
boolean mark)
public boolean getMark()
public short getReplication()
public boolean isPresent(DatanodeDescriptor.CachedBlocksList cachedBlocksList)
public java.util.List<DatanodeDescriptor> getDatanodes(DatanodeDescriptor.CachedBlocksList.Type type)
type - If null, this parameter is ignored.
If it is non-null, we match only datanodes which
have it on this list.
See DatanodeDescriptor.CachedBlocksList.Type
for a description of all the lists.public void insertInternal(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element prev,
org.apache.hadoop.util.IntrusiveCollection.Element next)
insertInternal in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic void setPrev(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element prev)
setPrev in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic void setNext(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list,
org.apache.hadoop.util.IntrusiveCollection.Element next)
setNext in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic void removeInternal(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list)
removeInternal in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic org.apache.hadoop.util.IntrusiveCollection.Element getPrev(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list)
getPrev in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic org.apache.hadoop.util.IntrusiveCollection.Element getNext(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list)
getNext in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic boolean isInList(org.apache.hadoop.util.IntrusiveCollection<? extends org.apache.hadoop.util.IntrusiveCollection.Element> list)
isInList in interface org.apache.hadoop.util.IntrusiveCollection.Elementpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setNext(org.apache.hadoop.util.LightWeightGSet.LinkedElement next)
setNext in interface org.apache.hadoop.util.LightWeightGSet.LinkedElementpublic org.apache.hadoop.util.LightWeightGSet.LinkedElement getNext()
getNext in interface org.apache.hadoop.util.LightWeightGSet.LinkedElementCopyright © 2008–2025 Apache Software Foundation. All rights reserved.