@Deprecated public class MapWritable extends Object implements org.apache.hadoop.io.Writable
java.util.HashMap
.
In addition to the size of key and value writable tuple two additional bytes
are stored to identify the Writable classes. This means that a maximum of
255 different class types can be used for key and value objects.
A binary-id to class mapping is defined in a static block of this class.
However it is possible to use custom implementations of Writable.
For these custom Writables we write the byte id - utf class name tuple
into the header of each MapWritable that uses these types.Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG
Deprecated.
|
Constructor and Description |
---|
MapWritable()
Deprecated.
|
MapWritable(MapWritable map)
Deprecated.
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
|
boolean |
containsKey(org.apache.hadoop.io.Writable key)
Deprecated.
|
boolean |
containsValue(org.apache.hadoop.io.Writable value)
Deprecated.
|
boolean |
equals(Object obj)
Deprecated.
|
org.apache.hadoop.io.Writable |
get(org.apache.hadoop.io.Writable key)
Deprecated.
|
int |
hashCode()
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
Set<org.apache.hadoop.io.Writable> |
keySet()
Deprecated.
|
org.apache.hadoop.io.Writable |
put(org.apache.hadoop.io.Writable key,
org.apache.hadoop.io.Writable value)
Deprecated.
|
void |
putAll(MapWritable map)
Deprecated.
|
void |
readFields(DataInput in)
Deprecated.
|
org.apache.hadoop.io.Writable |
remove(org.apache.hadoop.io.Writable key)
Deprecated.
|
int |
size()
Deprecated.
|
String |
toString()
Deprecated.
|
Collection<org.apache.hadoop.io.Writable> |
values()
Deprecated.
|
void |
write(DataOutput out)
Deprecated.
|
public MapWritable()
public MapWritable(MapWritable map)
map
- map to copy frompublic void clear()
public boolean containsKey(org.apache.hadoop.io.Writable key)
public boolean containsValue(org.apache.hadoop.io.Writable value)
public org.apache.hadoop.io.Writable get(org.apache.hadoop.io.Writable key)
public boolean isEmpty()
public Set<org.apache.hadoop.io.Writable> keySet()
public org.apache.hadoop.io.Writable put(org.apache.hadoop.io.Writable key, org.apache.hadoop.io.Writable value)
public void putAll(MapWritable map)
public org.apache.hadoop.io.Writable remove(org.apache.hadoop.io.Writable key)
public int size()
public Collection<org.apache.hadoop.io.Writable> values()
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
Copyright © 2014 The Apache Software Foundation