Puppet Class: profile::hive::server

Defined in:
modules/profile/manifests/hive/server.pp

Overview

Class profile::hive::server

Sets up Hive Server2 (no metastore, needs another profile).

Parameters:

  • monitoring_enabled (Any) (defaults to: hiera('profile::hive::server::monitoring_enabled', false))
  • ferm_srange (Any) (defaults to: hiera('profile::hive::server::ferm_srange', '$DOMAIN_NETWORKS'))
  • use_kerberos (Any) (defaults to: hiera('profile::hive::server::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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'modules/profile/manifests/hive/server.pp', line 5

class profile::hive::server(
    $monitoring_enabled  = hiera('profile::hive::server::monitoring_enabled', false),
    $ferm_srange         = hiera('profile::hive::server::ferm_srange', '$DOMAIN_NETWORKS'),
    $use_kerberos        = hiera('profile::hive::server::use_kerberos', false),
) {
    include ::profile::hive::client

    # Setup hive-server
    class { '::cdh::hive::server':
        use_kerberos => $use_kerberos,
    }

    ferm::service{ 'hive_server':
        proto  => 'tcp',
        port   => '10000',
        srange => $ferm_srange,
    }

    include ::profile::hive::monitoring::server

    # Include icinga alerts if production realm.
    if $monitoring_enabled {

        nrpe::monitor_service { 'hive-server2':
            description   => 'Hive Server',
            nrpe_command  => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C java -a "org.apache.hive.service.server.HiveServer2"',
            contact_group => 'admins,analytics',
            require       => Class['cdh::hive::server'],
            notes_url     => 'https://wikitech.wikimedia.org/wiki/Analytics/Systems/Cluster/Hive',
        }

        monitoring::check_prometheus { 'hive-server-heap-usage':
            description     => 'Hive Server JVM Heap usage',
            dashboard_links => ['https://grafana.wikimedia.org/d/000000379/hive?panelId=7&fullscreen&orgId=1'],
            query           => "scalar(avg_over_time(jvm_memory_bytes_used{instance=\"${::hostname}:10100\",area=\"heap\"}[60m])/avg_over_time(jvm_memory_bytes_max{instance=\"${::hostname}:10100\",area=\"heap\"}[60m]))",
            warning         => 0.8,
            critical        => 0.9,
            contact_group   => 'analytics',
            prometheus_url  => "http://prometheus.svc.${::site}.wmnet/analytics",
        }
    }
}