Key/value pairs
Since Chapter 1, What It's All About, we have been talking about operations that process and provide the output in terms of key/value pairs without explaining why. It is time to address that.
What it mean
Firstly, we will clarify just what we mean by key/value pairs by highlighting similar concepts in the Java standard library. The java.util.Map
interface is the parent of commonly used classes such as HashMap
and (through some library backward reengineering) even the original Hashtable
.
For any Java Map
object, its contents are a set of mappings from a given key of a specified type to a related value of a potentially different type. A HashMap
object could, for example, contain mappings from a person's name (String
) to his or her birthday (Date
).
In the context of Hadoop, we are referring to data that also comprises keys that relate to associated values. This data is stored in such a way that the various values in the data set can be sorted and rearranged across a set of keys...