Puppet Class: profile::hive::site_hdfs

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

Overview

SPDX-License-Identifier: Apache-2.0

Class profile::hive::site_hdfs

Ensures latest /etc/hive/conf/hive-site.xml is in hdfs

TODO: it would be much better if we had a nicer define or puppet function that would allow us to manage files in HDFS like we do in the regular filesystem. If we figure that out, we can replace this class and also the analytics_cluster::mysql_password class.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'modules/profile/manifests/hive/site_hdfs.pp', line 11

class profile::hive::site_hdfs {
    Class['bigtop::hive'] -> Class['profile::hive::site_hdfs']

    $hdfs_path = '/user/hive/hive-site.xml'
    # Put /etc/hive/conf/hive-site.xml in HDFS whenever puppet
    # notices that it has changed.
    kerberos::exec { 'put-hive-site-in-hdfs':
        command     => "/bin/bash -c '/usr/bin/hdfs dfs -put -f ${bigtop::hive::config_directory}/hive-site.xml ${hdfs_path} && /usr/bin/hdfs dfs -chmod 664 ${hdfs_path} && /usr/bin/hdfs dfs -chown hive:analytics ${hdfs_path}'",
        user        => 'hdfs',
        refreshonly => true,
        subscribe   => File["${bigtop::hive::config_directory}/hive-site.xml"],
    }
}