Puppet Class: cdh::spark::worker

Defined in:
modules/cdh/manifests/spark/worker.pp

Overview

Class cdh::spark::worker



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'modules/cdh/manifests/spark/worker.pp', line 3

class cdh::spark::worker {
    Class['cdh::spark'] -> Class['cdh::spark::worker']

    # Fail if not running spark in standalone mode
    if !$cdh::spark::standalone_enabled {
        fail('Do not include cdh::spark::worker unless $cdh::spark::master_host is set and you intend to run Spark in standalone mode (not YARN).')
    }

    package { 'spark-worker':
        ensure => 'installed',
    }

    service { 'spark-worker':
        ensure     => 'running',
        enable     => true,
        hasstatus  => true,
        hasrestart => true,
        require    => Package['spark-worker'],
    }
}