Puppet Class: profile::hadoop::balancer

Defined in:
modules/profile/manifests/hadoop/balancer.pp

Overview

SPDX-License-Identifier: Apache-2.0

Class profile::hadoop::balancer

Runs hdfs balancer periodically to keep data balanced across all DataNodes

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: lookup('profile::hadoop::balancer::ensure', { 'default_value' => 'present' }))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/profile/manifests/hadoop/balancer.pp', line 6

class profile::hadoop::balancer(
    Wmflib::Ensure $ensure  = lookup('profile::hadoop::balancer::ensure', { 'default_value' => 'present' }),
) {
    require ::profile::hadoop::common

    file { '/usr/local/bin/hdfs-balancer':
        source => 'puppet:///modules/profile/hadoop/hdfs-balancer',
        mode   => '0754',
        owner  => 'hdfs',
        group  => 'hdfs',
    }

    kerberos::systemd_timer { 'hdfs-balancer':
        ensure            => $ensure,
        description       => 'Run the HDFS balancer script to keep HDFS blocks replicated in the most redundant and efficient way.',
        command           => '/usr/local/bin/hdfs-balancer',
        interval          => '*-*-* 06:00:00',
        logfile_name      => 'balancer.log',
        logfile_basedir   => '/var/log/hadoop-hdfs',
        syslog_identifier => 'hdfs-balancer',
        require           => File['/usr/local/bin/hdfs-balancer'],
        user              => 'hdfs',
    }
}