Here's a priliminary hadoop formula, based on the vanilla one.

An option allows the user to select between mr1 and mr2, which do not play well with each other.  Only mr1 (the default) is currently implemented.

Steps from http://borrelli.org/2012/04/29/installing-hadoop-on-osx-lion/ have also been incorporated.  In particular we check if loopback via passwordless ssh works, format the name node and make some basic HDFS directory structure if needed.

If it appears that HDFS is already initialzed, we do not touch it.  It lives outside (in var/hadoop) in order to survive reinstalls.

We also (lightly) check if local reverse dns resolution works, a la http://stackoverflow.com/q/4730148/580412