|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.AbstractMapWritable
@InterfaceAudience.Public @InterfaceStability.Stable public abstract class AbstractMapWritable
Abstract base class for MapWritable and SortedMapWritable Unlike org.apache.nutch.crawl.MapWritable, this class allows creation of MapWritable<Writable, MapWritable> so the CLASS_TO_ID and ID_TO_CLASS maps travel with the class instead of being static. Class ids range from 1 to 127 so there can be at most 127 distinct classes in any specific map instance.
| Constructor Summary | |
|---|---|
protected |
AbstractMapWritable()
constructor. |
| Method Summary | |
|---|---|
protected void |
addToMap(Class<?> clazz)
Add a Class to the maps if it is not already present. |
protected void |
copy(Writable other)
Used by child copy constructors. |
protected Class<?> |
getClass(byte id)
|
Configuration |
getConf()
Return the configuration used by this object. |
protected byte |
getId(Class<?> clazz)
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
void |
setConf(Configuration conf)
Set the configuration to be used by this object. |
void |
write(DataOutput out)
Serialize the fields of this object to out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractMapWritable()
| Method Detail |
|---|
protected void addToMap(Class<?> clazz)
protected Class<?> getClass(byte id)
protected byte getId(Class<?> clazz)
protected void copy(Writable other)
public Configuration getConf()
Configurable
getConf in interface Configurablepublic void setConf(Configuration conf)
Configurable
setConf in interface Configurableconf - the conf to set
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writableout - DataOuput to serialize this object into.
IOException
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||