Puppet Class: profile::hadoop::balancer

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

Overview

Class profile::hadoop::balancer

Runs hdfs balancer periodically to keep data balanced across all DataNodes

Parameters:

  • use_kerberos (Any) (defaults to: hiera('profile::hadoop::balancer::use_kerberos', false))


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

class profile::hadoop::balancer(
    $use_kerberos       = hiera('profile::hadoop::balancer::use_kerberos', false),
) {
    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':
        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',
        require         => File['/usr/local/bin/hdfs-balancer'],
        user            => 'hdfs',
        use_kerberos    => $use_kerberos,
    }
}