Puppet Class: spark::frontend::config

Defined in:
manifests/frontend/config.pp

Overview

Class spark::frontend::config

This class is called from spark::frontend.



5
6
7
8
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
# File 'manifests/frontend/config.pp', line 5

class spark::frontend::config {
  include ::spark::common::config
  if $spark::hive_enable {
    file { "${spark::confdir}/hive-site.xml":
      ensure => link,
      target => $::spark::hive_configfile,
    }
  }
  if $spark::yarn_enable {
    include ::hadoop::common::yarn::config
  }

  if $spark::hdfs_hostname or $spark::yarn_enable {
    $hadoop_confdir = $hadoop::confdir
    file {'/etc/profile.d/hadoop-spark.sh':
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      content => template('spark/profile.sh.erb'),
    }
    file {'/etc/profile.d/hadoop-spark.csh':
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      content => template('spark/profile.csh.erb'),
    }
  } else {
    file {'/etc/profile.d/hadoop-spark.sh':
      ensure => 'removed',
    }
    file {'/etc/profile.d/hadoop-spark.csh':
      ensure => 'removed',
    }
  }
}