Giter VIP home page Giter VIP logo

interface-dfs's Introduction

Overview

This interface layer handles the communication with HDFS via the dfs interface protocol. It is intended for internal use within the Hadoop cluster charms. For typical usage, [interface-hadoop-plugin][] should be used instead.

Usage

Requires

Charms requiring this interface can be clients, DataNodes, or SecondaryNameNodes. Clients simply depend on HDFS to serve as a distributed file system to them, while DataNodes and SecondaryNameNodes register to provide additional services back.

This interface layer will set the following states, as appropriate:

  • {relation_name}.joined The relation is established, but HDFS may not yet have provided any connection or service information.

  • {relation_name}.ready HDFS has provided its connection and service information, and is ready to serve as a distributed file system. The provided information can be accessed via the following methods:

    • hosts_map()
    • port()
    • webhdfs_port()

For example, a typical client would respond to {relation_name}.ready:

@when('flume.installed', 'hdfs.ready')
def hdfs_ready(hdfs):
    flume.configure(hdfs)
    flume.start()

Provides

A charm providing this interface is providing the HDFS service.

This interface layer will set the following states, as appropriate:

  • {relation_name}.clients One or more clients of any type have been related. The charm should call the following methods to provide the appropriate information to the clients:
    • send_spec(spec)
    • send_hosts_map(hosts)
    • send_ports(port, webhdfs_port)
    • send_ready(ready)

Example:

@when('namenode.clients')
@when('hdfs.ready')
def serve_client(client):
    client.send_spec(utils.build_spec())
    client.send_ports(dist_config.get('port'), dist_config.get('webhdfs_port'))
    client.send_ready(True)

@when('namenode.clients')
@when_not('hdfs.ready')
def check_ready(client):
    client.send_ready(False)

Contact Information

Hadoop

interface-dfs's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.