node-sqoop

Node.js module used as a client to send rest requests to sqoop server

npm install node-sqoop
9 downloads in the last month

A NodeJS Client for Sqoop2 REST API

Apache Sqoop (TM) is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases.

Sqoop successfully graduated from the Incubator in March of 2012 and is now a Top-Level Apache project: More information

Latest stable release is 1.4.2. Latest cut of Sqoop2 is 1.99.1.

The latest version of Sqoop which is still in development supports a rest api which makes it easier for developers to access Sqoop in any language. The node-sqoop module facilitates the Sqoop2 rest api integration.

Installation

npm install node-sqoop

Usage

Configuration

 var config = {
        "url": "[HOST]",
        "port": "[PORT]",
        "webapp": "[SQOOP WEBAPP]",
        "version": "[SQOOP VERSION]"
    };
var Sqoop = require('node-sqoop');  
var sqoop = Sqoop.createClient({ config: config });

Methods

GET

sqoop.get(url, function(error, response){ ... });

POST

sqoop.post(url, data, function(error, response){ ... });

PUT

sqoop.put(url, data, function(error, response){ ... });

DELETE

sqoop.del(url, function(error, response){ ... });

Example

Request

sqoop.get('version', function(error, response) {
      console.log(response);
});

Response

{
     revision: "Unknown",
     protocols: [
        "1"
     ],
     date: "Fri Dec 21 12:09:07 PST 2012",
     user: "jarcec",
     url: "file:///home/jarcec/apache/repos/sqoop_1.99.1/common",
     version: "1.99.1"
}
npm loves you