Giter VIP home page Giter VIP logo

webhdfsclientbundle's Introduction

webHDFSClientBundle

Description

webHDFSClientBundle provides a Symfony2 wrapper to the SimpleEnergy/php-WebHDFS code for interacting with HDFS from PHP. php-WebHDFS is a PHP client for WebHDFS.

Dependencies

Installation

Using composer

To install webHDFSClientBundle with Composer add the following to your composer.json file:

// composer.json
{
    // ...
    require: {
        // ...
        "jimbglenn/webHDFSClientBundle": "dev-master"
    }
}

Then, you can install with Composer's update command from your project root:

composer update jimbglenn/webHDFSClientBundle

Composer will download all the required files, and install them. Now you update AppKernel.php file and register the new bundle:

<?php
// in AppKernel::registerBundles()
    $bundles = array(
        // ...
        new jimbglenn\webHDFSClientBundle\webHDFSClientBundle(),
        // ...
        );

Setup config for your instance of Hadoop's WebHDFS api. In app/config/config.yml add the following section and fill in with your values:

# web hdfs client configuration for hadoop:
web_hdfs_client:
    webHDFS:
        serverName: devhadoop.localdomain
        port: 50070
        user: hadoop

Example:

From within a controller, you should be able to do get access to the web_hdfs_client:

$hdfs = $this->get('web_hdfs_cilent');

Usage

File and Directory Operations

Create and Write to a File

$hdfs = $this->get('web_hdfs_client');
$hdfs->create('user/hadoop-username/new-file.txt', 'local-file.txt');

webhdfsclientbundle's People

Contributors

jimbglenn avatar jacobko avatar

Stargazers

Rokas Šleinius avatar

Watchers

 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.