Cosmos hadoop 0.9.0

apply some patches.