Puppet Class: cdh::hadoop::httpfs

Defined in:
modules/cdh/manifests/hadoop/httpfs.pp

Overview

Class cdh::hadoop::httpfs

Installs hadoop-httpfs and starts up an httpfs server. Make sure the httpfs_enabled parameter is true when you include cdh::hadoop if you want to include this class.

Parameters

$signature_secret - secret to sign HttpFS hadoop-auth cookie $heapsize - -Xmx in MB to configure Catalina with. Default: undef

Parameters:

  • signature_secret (Any) (defaults to: 'hadoop httpfs secret')
  • heapsize (Any) (defaults to: undef)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'modules/cdh/manifests/hadoop/httpfs.pp', line 9

class cdh::hadoop::httpfs(
        $signature_secret = 'hadoop httpfs secret',
        $heapsize         = undef,
)
{
    Class['cdh::hadoop'] -> Class['cdh::hadoop::httpfs']

    package { 'hadoop-httpfs':
        ensure => 'installed',
    }

    $config_directory = "/etc/hadoop-httpfs/conf.${cdh::hadoop::cluster_name}"
    # Create the $cluster_name based $config_directory.
    file { $config_directory:
        ensure  => 'directory',
        require => Package['hadoop-httpfs'],
    }
    cdh::alternative { 'hadoop-httpfs-conf':
        link => '/etc/hadoop-httpfs/conf',
        path => $config_directory,
    }

    file { "${config_directory}/httpfs-site.xml":
        content => template('cdh/hadoop/httpfs-site.xml.erb'),
        require => Package['hadoop-httpfs'],
    }
    file { "${config_directory}/httpfs-log4j.properties":
        content => template('cdh/hadoop/httpfs-log4j.properties.erb'),
        require => Package['hadoop-httpfs'],
    }
    file { "${config_directory}/httpfs-signature.secret":
        content => $signature_secret,
        owner   => 'httpfs',
        group   => 'httpfs',
        mode    => '0440',
        require => Package['hadoop-httpfs'],
    }

    service { 'hadoop-httpfs':
        ensure     => 'running',
        enable     => true,
        hasrestart => true,
        hasstatus  => true,
        subscribe  => [
            File["${config_directory}/httpfs-site.xml"],
            File["${config_directory}/httpfs-log4j.properties"],
            File["${config_directory}/httpfs-signature.secret"],
        ],
        require    => Package['hadoop-httpfs'],
    }
}