Puppet Class: cdh::hive::metastore

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

Overview

Class cdh::hive::metastore

Configures hive-metastore. See: www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_hive_metastore_configure.html

Parameters

$port - Port on which hive-metastore listens. Default: undef

Parameters:

  • port (Any) (defaults to: undef)


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

class cdh::hive::metastore(
    $port             = undef,
)
{
    Class['cdh::hive'] -> Class['cdh::hive::metastore']

    package { 'hive-metastore':
        ensure => 'installed',
    }

    # If the metastore will use MySQL for storage, then
    # we need to make sure the Mysql/Mariadb JDBC .jar is
    # in hive-metastore's classpath before it launches.
    if $::cdh::hive::jdbc_protocol == 'mysql' {
        include cdh::hive::metastore::mysql::jar
        Class['cdh::hive::metastore::mysql::jar'] -> Service['hive-metastore']
    }

    service { 'hive-metastore':
        ensure     => 'running',
        require    => [
            Package['hive-metastore'],
        ],
        hasrestart => true,
        hasstatus  => true,
    }
}