charmhelpers.contrib.bigdata.handlers¶
charmhelpers.contrib.bigdata.handlers.apache.HDFS | |
charmhelpers.contrib.bigdata.handlers.apache.HadoopBase | |
charmhelpers.contrib.bigdata.handlers.apache.YARN |
- class charmhelpers.contrib.bigdata.handlers.apache.HDFS(hadoop_base)¶
Bases: object
- configure_client()¶
- configure_datanode()¶
- configure_hdfs_base(host, port)¶
- configure_namenode()¶
- configure_secondarynamenode()¶
Configure the Secondary Namenode when the apache-hadoop-hdfs-secondary charm is deployed and related to apache-hadoop-hdfs-master.
The only purpose of the secondary namenode is to perform periodic checkpoints. The secondary name-node periodically downloads current namenode image and edits log files, joins them into new image and uploads the new image back to the (primary and the only) namenode.
- create_hdfs_dirs()¶
- format_namenode()¶
- register_slaves()¶
- start_datanode()¶
- start_namenode()¶
- start_secondarynamenode()¶
- stop_datanode()¶
- stop_namenode()¶
- stop_secondarynamenode()¶
- class charmhelpers.contrib.bigdata.handlers.apache.HadoopBase(dist_config)¶
Bases: object
- configure_hadoop()¶
- configure_hosts_file()¶
Add the unit’s private-address to /etc/hosts to ensure that Java can resolve the hostname of the server to its real IP address.
- install(force=False)¶
- install_base_packages()¶
- install_hadoop()¶
- install_java()¶
Run the java-installer resource to install Java and determine the JAVA_HOME and Java version.
The java-installer must be idempotent and its only output (on stdout) should be two lines: the JAVA_HOME path, and the Java version, respectively.
If there is an error installing Java, the installer should exit with a non-zero exit code.
- is_installed()¶
- run(user, command, *args, **kwargs)¶
Run a Hadoop command as the hdfs user.
Parameters: - command (str) – Command to run, prefixed with bin/ or sbin/
- args (list) – Additional args to pass to the command
- setup_hadoop_config()¶
- spec()¶
Generate the full spec for keeping charms in sync.
NB: This has to be a callback instead of a plain property because it is passed to the relations during construction of the Manager but needs to properly reflect the Java version in the same hook invocation that installs Java.
- class charmhelpers.contrib.bigdata.handlers.apache.YARN(hadoop_base)¶
Bases: object
- configure_client()¶
- configure_jobhistory()¶
- configure_nodemanager()¶
- configure_resourcemanager()¶
- configure_yarn_base(host, port)¶
- install_demo()¶
- start_jobhistory()¶
- start_nodemanager()¶
- start_resourcemanager()¶
- stop_jobhistory()¶
- stop_nodemanager()¶
- stop_resourcemanager()¶