Distributions

Get information about available Hadoop platform distributions, e.g. Hortonworks Data Platform

All stacks are based on a distribution, which defines the available services, their versions, and their components.

For example:

>>> lava.distros.list()
[Distro(id='HDP2.2', name='HortonWorks Data Platform', version)]

>>> lava.distros.list()[0].to_dict()
{'id': u'HDP2.2', 'name': u'HortonWorks Data Platform', 'version': u'2.2'}

>>> hdp22 = lava.distro.get('HDP2.2')
>>> hdp22
DistroDetail(id='HDP2.2', name='HortonWorks Data Platform', services, version)

>>> [service.name for service in hdp22.services]
[u'HDFS', u'YARN', u'MapReduce', u'Hive', u'Pig', u'Sqoop', u'Oozie',
 u'Flume', u'Storm', u'Kafka', u'Zookeeper', u'Falcon', u'Spark']

>>> hdp22.services[0].to_dict()
{'components': [
    {u'name': u'Namenode'},
    {u'mode': u'Secondary', u'name': u'SecondaryNamenode'},
    {u'name': u'Datanode'}],
 'description': u'Hadoop Distributed File System (HDFS) is a scalable, fault-tolerant, distributed file system that provides scalable and reliable data storage designed to span large clusters of commodity servers.',
 'name': u'HDFS',
 'version': u'2.6.0'}

API Reference

class lavaclient.api.distros.Resource

Distros API methods

get(distro_id)

Get a specific distro

Parameters:distro_id – Distribution ID
Returns:DistroDetail
list()

List all distros

Returns:list of Distro objects
class lavaclient.api.response.Distro

Only returned by list(). Has the same methods/attributes as DistroDetail except for services

class lavaclient.api.response.DistroDetail
describe()

Return a pretty-formatted string that describes the format of the data

to_dict()

Convert the config to a plain python dictionary

id
name
services

See: DistroService

version
class lavaclient.api.response.DistroService
describe()

Return a pretty-formatted string that describes the format of the data

to_dict()

Convert the config to a plain python dictionary

components
description
name
version