hadoop: depends_on "openjdk@11"
hadoop: depends_on "openjdk@11"

According to https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions, hadoop only supports java runtime 11 at most.
- Switched dependency from "openjdk" to "openjdk@11" for flume, hadoop and mahout
- Added a test case to check if resource manager server can start successfully with the JDK
- Appended HADOOP_LOG_DIR to env scripts
- Minor refactoring

Co-authored-by: Carlo Cabrera <3ffc397d0e4bded29cb84b56167de54c01e3a55b@users.noreply.github.com>

nandub/homebrew-core,chrisfinazzo/homebrew-core,nbari/homebrew-core,lemzwerg/homebrew-core,chrisfinazzo/homebrew-core,stgraber/homebrew-core,filcab/homebrew-core,makigumo/homebrew-core,nandub/homebrew-core,Homebrew/homebrew-core,stgraber/homebrew-core,Homebrew/homebrew-core,sjackman/homebrew-core,sjackman/homebrew-core,nbari/homebrew-core,adam-moss/homebrew-core,makigumo/homebrew-core,lemzwerg/homebrew-core,filcab/homebrew-core,adam-moss/homebrew-core