Puppet Class: profile::hive::metastore

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

Overview

Class profile::hive::metastore

Sets up Hive Metastore service

Parameters:

  • monitoring_enabled (Any) (defaults to: hiera('profile::hive::metastore::monitoring_enabled', false))
  • ferm_srange (Any) (defaults to: hiera('profile::hive::metastore::ferm_srange', '$DOMAIN_NETWORKS'))


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
# File 'modules/profile/manifests/hive/metastore.pp', line 5

class profile::hive::metastore(
    $monitoring_enabled = hiera('profile::hive::metastore::monitoring_enabled', false),
    $ferm_srange        = hiera('profile::hive::metastore::ferm_srange', '$DOMAIN_NETWORKS'),
) {

    require ::profile::hive::client

    # Setup hive-metastore
    class { '::cdh::hive::metastore': }

    ferm::service{ 'hive_metastore':
        proto  => 'tcp',
        port   => '9083',
        srange => $ferm_srange,
    }

    require ::profile::hive::monitoring::metastore

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

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

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