-
-
Save pwasiewi/ad16c727ff3b9adebe4584225cda848f to your computer and use it in GitHub Desktop.
Scala program to print all properties of a hadoop config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.hadoop.conf.Configured | |
import org.apache.hadoop.util.Tool | |
import org.apache.hadoop.util.ToolRunner | |
import scala.collection.JavaConversions._ | |
object Config extends Configured with Tool { | |
def run(args: Array[String]) : Int = { | |
getConf.map(x => (x.getKey, x.getValue)).toList.sorted.foreach(println) | |
return 0 | |
} | |
def main(args: Array[String]) { ToolRunner.run(Config, args) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment