charmhelpers.contrib.bigdata.relations

charmhelpers.contrib.bigdata.relations.DataNode Relation which communicates DataNode info back to NameNodes.
charmhelpers.contrib.bigdata.relations.FlumeAgent
charmhelpers.contrib.bigdata.relations.HadoopClient
charmhelpers.contrib.bigdata.relations.Hive
charmhelpers.contrib.bigdata.relations.MySQL
charmhelpers.contrib.bigdata.relations.NameNode Relation which communicates the NameNode (HDFS) connection & status info.
charmhelpers.contrib.bigdata.relations.NameNodeMaster Alternate NameNode relation for DataNodes.
charmhelpers.contrib.bigdata.relations.NodeManager Relation which communicates NodeManager info back to ResourceManagers.
charmhelpers.contrib.bigdata.relations.ResourceManager Relation which communicates the ResourceManager (YARN) connection & status info.
charmhelpers.contrib.bigdata.relations.ResourceManagerMaster Alternate ResourceManager relation for NodeManagers.
charmhelpers.contrib.bigdata.relations.SpecMatchingRelation Relation base class that validates that a version and environment between two related charms match, to prevent interoperability issues.
class charmhelpers.contrib.bigdata.relations.DataNode(**kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

Relation which communicates DataNode info back to NameNodes.

relation_name = 'datanode'
required_keys = ['private-address']
class charmhelpers.contrib.bigdata.relations.FlumeAgent(**kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

provide(remote_service, all_ready)
relation_name = 'flume-agent'
required_keys = ['private-address', 'port']
class charmhelpers.contrib.bigdata.relations.HadoopClient(*args, **kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

provide(remote_service, all_ready)
relation_name = 'hadoop-client'
required_keys = ['hdfs-ready']
class charmhelpers.contrib.bigdata.relations.Hive(port=None)

Bases: charmhelpers.core.charmframework.helpers.Relation

provide(remote_service, all_ready)
relation_name = 'hive'
required_keys = ['private-address', 'port', 'ready']
class charmhelpers.contrib.bigdata.relations.MySQL(**kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

relation_name = 'db'
required_keys = ['host', 'database', 'user', 'password']
class charmhelpers.contrib.bigdata.relations.NameNode(spec=None, port=None)

Bases: charmhelpers.contrib.bigdata.relations.SpecMatchingRelation

Relation which communicates the NameNode (HDFS) connection & status info.

This is the relation that clients should use.

provide(remote_service, all_ready)
relation_name = 'namenode'
required_keys = ['private-address', 'port', 'ready']
class charmhelpers.contrib.bigdata.relations.NameNodeMaster(spec=None, port=None)

Bases: charmhelpers.contrib.bigdata.relations.NameNode

Alternate NameNode relation for DataNodes.

provide(remote_service, all_ready)
relation_name = 'datanode'
class charmhelpers.contrib.bigdata.relations.NodeManager(**kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

Relation which communicates NodeManager info back to ResourceManagers.

relation_name = 'nodemanager'
required_keys = ['private-address']
class charmhelpers.contrib.bigdata.relations.ResourceManager(spec=None, port=None)

Bases: charmhelpers.contrib.bigdata.relations.SpecMatchingRelation

Relation which communicates the ResourceManager (YARN) connection & status info.

This is the relation that clients should use.

provide(remote_service, all_ready)
relation_name = 'resourcemanager'
required_keys = ['private-address', 'port', 'ready']
class charmhelpers.contrib.bigdata.relations.ResourceManagerMaster(spec=None, port=None)

Bases: charmhelpers.contrib.bigdata.relations.ResourceManager

Alternate ResourceManager relation for NodeManagers.

get_ssh_key()
install_ssh_keys()
provide(remote_service, all_ready)
relation_name = 'nodemanager'
required_keys = ['private-address', 'ssh-key', 'ready']
class charmhelpers.contrib.bigdata.relations.SpecMatchingRelation(spec=None, *args, **kwargs)

Bases: charmhelpers.core.charmframework.helpers.Relation

Relation base class that validates that a version and environment between two related charms match, to prevent interoperability issues.

This class adds a spec key to the required_keys and populates it in provide(). The spec value must be passed in to __init__().

The spec should be a mapping (or a callback that returns a mapping) which describes all aspects of the charm’s environment or configuration that might affect its interoperability with the remote charm. The charm on the requires side of the relation will verify that all of the keys in its spec are present and exactly equal on the provides side of the relation. This does mean that the requires side can be a subset of the provides side, but not the other way around.

An example spec string might be:

{
    'arch': 'x86_64',
    'vendor': 'apache',
    'version': '2.4',
}
is_ready()

Validate the spec data from the connected units to ensure that it matches the local spec.

provide(remote_service, all_ready)

Provide the spec data to the remote service.

Subclasses must either delegate to this method (e.g., via super()) or include 'spec': json.dumps(self.spec) in the provided data themselves.

spec