Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 278ba963d0
Fetching contributors…

Cannot retrieve contributors at this time

file 19 lines (15 sloc) 0.594 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

thrift = require 'thrift'
transport = require 'thrift/lib/thrift/transport'

#module.exports = class Client
    #

module.exports.createClient = (options = {}) ->
    options.version ?= '0.7.1-cdh3u2'
    options.server ?= '127.0.0.1'
    options.port ?= 10000
    options.timeout ?= 1000
    options.transport ?= transport.TBufferedTransport
    connection = thrift.createConnection options.server, options.port, options
    client = thrift.createClient require("./#{options.version}/ThriftHive"), connection
    client.connection = connection
    client.end = connection.end
    client
    
Something went wrong with that request. Please try again.