Package org.apache.hadoop.io
Class MapWritable
java.lang.Object
org.apache.hadoop.io.AbstractMapWritable
org.apache.hadoop.io.MapWritable
- All Implemented Interfaces:
Map<Writable,,Writable> Configurable,Writable
@Public
@Stable
public class MapWritable
extends AbstractMapWritable
implements Map<Writable,Writable>
A Writable Map.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleaninthashCode()booleanisEmpty()keySet()voidvoidreadFields(DataInput in) Deserialize the fields of this object fromin.intsize()toString()values()voidwrite(DataOutput out) Serialize the fields of this object toout.Methods inherited from class org.apache.hadoop.io.AbstractMapWritable
addToMap, copy, getClass, getConf, getId, setConfMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
MapWritable
public MapWritable()Default constructor. -
MapWritable
Copy constructor.- Parameters:
other- the map to copy from
-
-
Method Details
-
clear
public void clear() -
containsKey
- Specified by:
containsKeyin interfaceMap<Writable,Writable>
-
containsValue
- Specified by:
containsValuein interfaceMap<Writable,Writable>
-
entrySet
-
equals
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
write
Description copied from interface:WritableSerialize the fields of this object toout.- Specified by:
writein interfaceWritable- Overrides:
writein classAbstractMapWritable- Parameters:
out-DataOuputto serialize this object into.- Throws:
IOException- any other problem for write.
-
readFields
Description copied from interface:WritableDeserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFieldsin interfaceWritable- Overrides:
readFieldsin classAbstractMapWritable- Parameters:
in-DataInputto deseriablize this object from.- Throws:
IOException- any other problem for readFields.
-
toString
-