2017 © Pedro Peláez
 

library zf2-webhdfs

image

mrferos/zf2-webhdfs

  • Friday, October 31, 2014
  • by mrferos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MrfWebHDFS

Installation

composer require mrferos/zf2-webhdfs:dev-master

Description

A simple ZF2 module providing an Abstract Factory to create instances of php-WebHDFS, (*1)

Usage

Copy the provided example config file into config/autoload, (*2)

cp vendor/zf2-webhdfs/config/mrfwebhdfs.global.config.php.dist config/autoload/mrfwebhdfs.global.config.php

And edit the file with your settings:, (*3)

<?php
return array(
    'WebHDFSExample' => array(
        'username' => 'mrferos',
        'host' => 'localhost',
        'port' => 50070
    )
);

Calling "WebHDFSExample" from the service manager will return an instance of the WebHDFS class with your provided configurations., (*4)

$webhdfs = $serviceManager->get('WebHDFSExample');

If you have multiple WebHDFS enpoints, you can define each like so:, (*5)

<?php
return array(
    'WebHDFSExample1' => array(
        'username' => 'mrferos',
        'host' => 'localhost',
        'port' => 50070
    ),
    'WebHDFSExample2' => array(
            'username' => 'mrferos',
            'host' => 'localhost',
            'port' => 50070
        )
    'WebHDFSExample3' => array(
            'username' => 'mrferos',
            'host' => 'localhost',
            'port' => 50070
        )
);

And call them in the same way,, (*6)

$webhdfs1 = $serviceManager->get('WebHDFSExample1');
$webhdfs2 = $serviceManager->get('WebHDFSExample2');
$webhdfs3 = $serviceManager->get('WebHDFSExample3');

The Versions

31/10 2014

dev-master

9999999-dev https://github.com/mrferos/MrfWebHDFS

  Sources   Download

MIT

The Requires

 

by Andres Galindo