Sha256: 1f36d41551b02204addeea27e7cd7a70175add2b045c1e867bc8cd816de6df29

Contents?: true

Size: 709 Bytes

Versions: 15

Compression:

Stored size: 709 Bytes

Contents

module HadoopConfiguration
  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
  
  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
  
  def check_home_and_version
    check_home
    check_version
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mandy-0.5.28 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.27 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.26 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.25 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.24 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.23 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.22 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.21 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.20 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.19 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.17 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.14 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.13 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.11 lib/mandy/configuration/hadoop_configuration.rb
mandy-0.5.10 lib/mandy/configuration/hadoop_configuration.rb