- 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
Common puppet library for Hadoop and its addons. It manages alternatives as used in BigTop-based Hadoop distributions and provides necessary environment variables.
- 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
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)
hadoop_lib::env
: Sets environment for Hadoop
(none)
hadoop_lib::postinstall
: Post-installation stepshadoop_lib::jdbc
: Link JDBC jar file from standard location
#####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).
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
#####db
Database type. Default: undef.
Values:
- mysql, mariadb: MySQL/MariaDB,
- postgresql: PostgreSQL
array_search
: Search a value in array
Searches a value in the array and returns the index starting from 1.
#####array
#####value
- 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 <[email protected]>