org.apache.nutch.crawl
Class MapWritable

java.lang.Object
  extended by org.apache.nutch.crawl.MapWritable
All Implemented Interfaces:
Writable

Deprecated. Use org.apache.hadoop.io.MapWritable instead.

public class MapWritable
extends Object
implements Writable

A writable map, with a similar behavior as 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.

Author:
Stefan Groschupf

Field Summary
static org.slf4j.Logger LOG
          Deprecated.  
 
Constructor Summary
MapWritable()
          Deprecated.  
MapWritable(MapWritable map)
          Deprecated. Copy constructor.
 
Method Summary
 void clear()
          Deprecated.  
 boolean containsKey(Writable key)
          Deprecated.  
 boolean containsValue(Writable value)
          Deprecated.  
 boolean equals(Object obj)
          Deprecated.  
 Writable get(Writable key)
          Deprecated.  
 int hashCode()
          Deprecated.  
 boolean isEmpty()
          Deprecated.  
 Set<Writable> keySet()
          Deprecated.  
 Writable put(Writable key, Writable value)
          Deprecated.  
 void putAll(MapWritable map)
          Deprecated.  
 void readFields(DataInput in)
          Deprecated.  
 Writable remove(Writable key)
          Deprecated.  
 int size()
          Deprecated.  
 String toString()
          Deprecated.  
 Collection<Writable> values()
          Deprecated.  
 void write(DataOutput out)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

public static final org.slf4j.Logger LOG
Deprecated. 
Constructor Detail

MapWritable

public MapWritable()
Deprecated. 

MapWritable

public MapWritable(MapWritable map)
Deprecated. 
Copy constructor. This constructor makes a deep copy, using serialization / deserialization to break any possible references to contained objects.

Parameters:
map - map to copy from
Method Detail

clear

public void clear()
Deprecated. 

containsKey

public boolean containsKey(Writable key)
Deprecated. 

containsValue

public boolean containsValue(Writable value)
Deprecated. 

get

public Writable get(Writable key)
Deprecated. 

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class Object

isEmpty

public boolean isEmpty()
Deprecated. 

keySet

public Set<Writable> keySet()
Deprecated. 

put

public Writable put(Writable key,
                    Writable value)
Deprecated. 

putAll

public void putAll(MapWritable map)
Deprecated. 

remove

public Writable remove(Writable key)
Deprecated. 

size

public int size()
Deprecated. 

values

public Collection<Writable> values()
Deprecated. 

equals

public boolean equals(Object obj)
Deprecated. 
Overrides:
equals in class Object

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

write

public void write(DataOutput out)
           throws IOException
Deprecated. 
Specified by:
write in interface Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Deprecated. 
Specified by:
readFields in interface Writable
Throws:
IOException


Copyright © 2011 The Apache Software Foundation