Sha256: a331cdbbfe3c7c9ab07f06875d6b1c799933bce007edbf49d527a7189fdc6198
Contents?: true
Size: 825 Bytes
Versions: 2
Compression:
Stored size: 825 Bytes
Contents
# the generated ruby files use a relative require, so we need to add the # generated directory to $LOAD_PATH this_dir = File.expand_path(File.dirname(__FILE__)) gen_dir = File.join(this_dir, 'impala/protocol') $LOAD_PATH.push(gen_dir) unless $LOAD_PATH.include?(gen_dir) require 'impala/version' require 'thrift' require 'impala/protocol' require 'impala/cursor' require 'impala/connection' module Impala KNOWN_COMMANDS = ['select', 'show', 'describe', 'use'] class InvalidQueryError < StandardError; end class ConnectionError < StandardError; end class CursorError < StandardError; end def self.connect(host='localhost', port=21000) connection = Connection.new(host, port) if block_given? ret = yield connection connection.close else ret = connection end ret end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
impala-0.1.1 | lib/impala.rb |
impala-0.1.0 | lib/impala.rb |