Module: HadoopConfiguration
- Defined in:
- lib/mandy/configuration/hadoop_configuration.rb
Instance Method Summary collapse
Instance Method Details
#check_home ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/mandy/configuration/hadoop_configuration.rb', line 2 def check_home hadoop_home = `echo $HADOOP_HOME`.chomp if hadoop_home== '' puts "You need to set the HADOOP_HOME environment variable to point to your hadoop install :(" puts "Try setting 'export HADOOP_HOME=/my/hadoop/path' in your ~/.profile maybe?" exit(1) end hadoop_home end |
#check_home_and_version ⇒ Object
24 25 26 27 |
# File 'lib/mandy/configuration/hadoop_configuration.rb', line 24 def check_home_and_version check_home check_version end |
#check_version ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mandy/configuration/hadoop_configuration.rb', line 12 def check_version hadoop_version = `$HADOOP_HOME/bin/hadoop version 2>&1` if hadoop_version =~ /No such file or directory/ puts("Mandy failed to find Hadoop in #{check_home} :(") puts puts hadoop_version exit(1) end hadoop_version end |