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