Version information
This version is compatible with:
- Fedora, , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'cesnet-hadoop_lib', '0.5.0'
Learn more about managing modules with a PuppetfileDocumentation
Hadoop Puppet Helper Library
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with hadoop_lib
- Usage - Beginning, configuration options, and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Module Description
Common puppet library for Hadoop and its addons. It manages alternatives as used in BigTop-based Hadoop distributions and provides necessary environment variables.
Setup
What hadoop_lib affects
- Files created (env class):
- /etc/profile.d/hadoop.sh
- /etc/profile.d/hadoop.csh
- Links created (jdbc resource type)
- Alternatives (postinstall resource type):
- /etc/<NAME>/conf: it can be switched to the new alternative, so original configuration is kept intact
Usage
Example: alternatives
Package['hive']
->
::hadoop_lib::postinstall { 'hive':
alternatives => 'cluster',
}
Example: environment
::hadoop_lib::env
Example: MySQL JDBC jar
class { 'mysql::bindings':
java_enable => true,
}
->
::hadoop_lib::jdbc { '/usr/lib/hive/lib':
db => 'mysql',
}
Example: array search function
$_myid = array_search($hostnames, $::fqdn)
Reference
###Classes
hadoop_lib::env
: Sets environment for Hadoop
hadoop_lib::env
Parameters
(none)
###Resources
hadoop_lib::postinstall
: Post-installation stepshadoop_lib::jdbc
: Link JDBC jar file from standard location
hadoop_lib::postinstall
Parameters
#####alternatives
Switches the alternatives used for the configuration. Default: 'cluster' (Debian) or undef.
It can be used only when supported (for example with Cloudera distribution).
hadoop_lib::jdbc
Link JDBC jar file from standard location. Jar files must be installed.
Example of using puppetlabs modules for jar files installation:
- puppetlabs-mysql: mysql::bindings class with java_enable parameter set
- puppetlabs-postgresql: postgresql::lib::java class
Parameters
#####db
Database type. Default: undef.
Values:
- mysql, mariadb: MySQL/MariaDB,
- postgresql: PostgreSQL
###Functions
array_search
: Search a value in array
array_search
Searches a value in the array and returns the index starting from 1.
Parameters
#####array
#####value
##Development
- Repository: https://github.com/MetaCenterCloudPuppet/cesnet-hadoop_lib
- Tests:
- basic: see .travis.yml
- vagrant: https://github.com/MetaCenterCloudPuppet/hadoop-tests
- Email: František Dvořák <valtri@civ.zcu.cz>
Dependencies
- puppetlabs/stdlib (>=1.0.0 <7.0.0)
- puppet/alternatives (<4.0.0)
The MIT License (MIT) Copyright (c) 2015-2020 CESNET Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.