Module: Mortar::PigVersion

Defined in:
lib/mortar/pigversion.rb

Defined Under Namespace

Classes: Pig012Hadoop273

Constant Summary collapse

PIG_0_12_HADOOP_2_TGZ_NAME =
"pig-0.12-Hadoop-2.7.3.tar.gz"
PIG_0_12_HADOOP_2_TGZ_DEFAULT_URL_PATH =
"resource/pig_0_12_hadoop_2"

Class Method Summary collapse

Class Method Details

.from_string(pig_version_str) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/mortar/pigversion.rb', line 22

def PigVersion.from_string(pig_version_str)
    if pig_version_str == '0.12'
        raise ArgumentError, "Our Hadoop 1 clusters are no longer supported by EMR.  Please use the default version of Pig: 0.12-Hadoop-2.7.3.  If you're unsure of why you're seeing this error please ensure that the project.properties file is not setting pigversion to an unsupported value."
    elsif pig_version_str == '0.12-Hadoop-2'
        raise ArgumentError, "EMR 3 is no longer supported. Please use the default version of Pig: 0.12-Hadoop-2.7.3.  If you're unsure of why you're seeing this error please ensure that the project.properties file is not setting pigversion to an unsupported value."
    elsif pig_version_str == '0.12-Hadoop-2.7.3'
        return Pig012Hadoop273.new
    else
        raise ArgumentError, "Unsupported pig version: #{pig_version_str}.  Options are: ['0.12-Hadoop-2.7.3']."
    end
end