Here's a cloudera 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

Snappy integration is optional, and can be brought in from hadoop-snappy.
Here's a cloudera hbase formula.

It depends on our own (cloudera) hadoop.

lib/slf4j-log4j12-1.6.1.jar has been removed, since it duplicates the same jar in hadoop, which SLF4J warns about.

In conf/hbase-env.sh:
    $JAVA_HOME has been set to be the output of /usr/libexec/java_home
    "-Djava.security.krb5.realm= -Djava.security.krb.kdc=" has been added to
    $HBASE_OPTS. See http://stackoverflow.com/q/7134723/580412

In conf/hbase-site.xml:
    hbase.zookeeper.quorum has been set to localhost
    hbase.rootdir has been set to hdfs://localhost:8020/hbase
    hbase.cluster.distributed has been set to true
    dfs.support.append has been set to true
    dfs.client.read.shortcircuit has been set to true

In conf/log4j.properties:
    The level of util.NativeCodeLoader has been set to error.  This merely suppresses an annoying (and unfixable) warning on every run.

In lib:
    Several jars common to hadoop have been removed, allowing hadoop to
    specify their appearance order in the CLASSPATH.  They are:
    hadoop-annotations-2.0.0-cdh4.3.0.jar
    hadoop-auth-2.0.0-cdh4.3.0.jar
    hadoop-common-2.0.0-cdh4.3.0-tests.jar
    hadoop-common-2.0.0-cdh4.3.0.jar
    hadoop-hdfs-2.0.0-cdh4.3.0-tests.jar
    hadoop-hdfs-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-app-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-common-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-core-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-hs-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-jobclient-2.0.0-cdh4.3.0-tests.jar
    hadoop-mapreduce-client-jobclient-2.0.0-cdh4.3.0.jar
    hadoop-mapreduce-client-shuffle-2.0.0-cdh4.3.0.jar
    hadoop-yarn-api-2.0.0-cdh4.3.0.jar
    hadoop-yarn-client-2.0.0-cdh4.3.0.jar
    hadoop-yarn-common-2.0.0-cdh4.3.0.jar
    hadoop-yarn-server-common-2.0.0-cdh4.3.0.jar
    hadoop-yarn-server-nodemanager-2.0.0-cdh4.3.0.jar
    hadoop-yarn-server-resourcemanager-2.0.0-cdh4.3.0.jar
    hadoop-yarn-server-tests-2.0.0-cdh4.3.0-tests.jar
    hadoop-yarn-server-web-proxy-2.0.0-cdh4.3.0.jar

launchd scripts have been added for the master, regionserver and zookeeper processes.  These scripts arrange that PATH should see the hadoop script, necessary for the hbase scripts to get a complete classpath (now that we removed several jars from lib.)

Snappy integration can be optionally brought via hadoop-snappy.