org.apache.pig.data
Class DataMap
java.lang.Object
org.apache.pig.data.Datum
org.apache.pig.data.DataMap
- All Implemented Interfaces:
- Comparable
public class DataMap
- extends Datum
DataMap
public DataMap()
equals
public boolean equals(Object other)
- Specified by:
equals
in class Datum
compareTo
public int compareTo(Object other)
cardinality
public int cardinality()
- Returns:
- the cardinality of the data map
put
public void put(String key,
Datum value)
- Adds the key value pair to the map
- Parameters:
key
- value
-
put
public void put(String key,
String value)
- Adds the value as a data atom mapped to the given key
- Parameters:
key
- value
-
put
public void put(String key,
int value)
- Adds the value as a data atom mapped to the given key
- Parameters:
key
- value
-
get
public Datum get(String key)
- Fetch the value corresponding to a given key
- Parameters:
key
-
- Returns:
toString
public String toString()
- Overrides:
toString
in class Object
read
public static DataMap read(DataInput in)
throws IOException
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in class Datum
- Throws:
IOException
remove
public Datum remove(String key)
keySet
public Set<String> keySet()
content
public Map<String,Datum> content()
getMemorySize
public long getMemorySize()
- Specified by:
getMemorySize
in class Datum
Copyright © ${year} The Apache Software Foundation