elasticsearch-hadoop

org.elasticsearch.hadoop.mr
Class LinkedMapWritable

java.lang.Object
  extended by org.apache.hadoop.io.AbstractMapWritable
      extended by org.apache.hadoop.io.MapWritable
          extended by org.elasticsearch.hadoop.mr.LinkedMapWritable
All Implemented Interfaces:
Map<Writable,Writable>, Configurable, Writable

public class LinkedMapWritable
extends MapWritable

Similar to MapWritable expect that it uses a LinkedHashMap underneath to preserve insertion order (and thus its structure). Extends MapWritable for compatibility reasons.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
LinkedMapWritable()
          Default constructor.
LinkedMapWritable(MapWritable other)
          Copy constructor.
 
Method Summary
 void clear()
          
 boolean containsKey(Object key)
          
 boolean containsValue(Object value)
          
 Set<Map.Entry<Writable,Writable>> entrySet()
          
 boolean equals(Object o)
           
 Writable get(Object key)
          
 int hashCode()
           
 boolean isEmpty()
          
 Set<Writable> keySet()
          
 Writable put(Writable key, Writable value)
          
 void putAll(Map<? extends Writable,? extends Writable> t)
          
 void readFields(DataInput in)
          
 Writable remove(Object key)
          
 int size()
          
 String toString()
           
 Collection<Writable> values()
          
 void write(DataOutput out)
          
 
Methods inherited from class org.apache.hadoop.io.AbstractMapWritable
addToMap, copy, getClass, getConf, getId, setConf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkedMapWritable

public LinkedMapWritable()
Default constructor.


LinkedMapWritable

public LinkedMapWritable(MapWritable other)
Copy constructor.

Parameters:
other - the map to copy from
Method Detail

clear

public void clear()

Specified by:
clear in interface Map<Writable,Writable>
Overrides:
clear in class MapWritable

containsKey

public boolean containsKey(Object key)

Specified by:
containsKey in interface Map<Writable,Writable>
Overrides:
containsKey in class MapWritable

containsValue

public boolean containsValue(Object value)

Specified by:
containsValue in interface Map<Writable,Writable>
Overrides:
containsValue in class MapWritable

entrySet

public Set<Map.Entry<Writable,Writable>> entrySet()

Specified by:
entrySet in interface Map<Writable,Writable>
Overrides:
entrySet in class MapWritable

get

public Writable get(Object key)

Specified by:
get in interface Map<Writable,Writable>
Overrides:
get in class MapWritable

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface Map<Writable,Writable>
Overrides:
isEmpty in class MapWritable

keySet

public Set<Writable> keySet()

Specified by:
keySet in interface Map<Writable,Writable>
Overrides:
keySet in class MapWritable

put

public Writable put(Writable key,
                    Writable value)

Specified by:
put in interface Map<Writable,Writable>
Overrides:
put in class MapWritable

putAll

public void putAll(Map<? extends Writable,? extends Writable> t)

Specified by:
putAll in interface Map<Writable,Writable>
Overrides:
putAll in class MapWritable

remove

public Writable remove(Object key)

Specified by:
remove in interface Map<Writable,Writable>
Overrides:
remove in class MapWritable

size

public int size()

Specified by:
size in interface Map<Writable,Writable>
Overrides:
size in class MapWritable

values

public Collection<Writable> values()

Specified by:
values in interface Map<Writable,Writable>
Overrides:
values in class MapWritable

write

public void write(DataOutput out)
           throws IOException

Specified by:
write in interface Writable
Overrides:
write in class MapWritable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException

Specified by:
readFields in interface Writable
Overrides:
readFields in class MapWritable
Throws:
IOException

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<Writable,Writable>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<Writable,Writable>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

elasticsearch-hadoop