Converts from groovy to java

This is a rebase against master of the pull request from @dralves at https://github.com/ahgittin/brooklyn-mapr/pull/1