Module: Impaler
- Defined in:
- lib/impaler.rb,
lib/impaler/manager.rb,
lib/impaler/version.rb
Defined Under Namespace
Classes: ConnectionError, ImpalerDefaultLogger, ImpalerError, Manager, QueryError
Constant Summary collapse
- DEFAULT_LOGGER =
ImpalerDefaultLogger.new()
- IMPALA_THEN_HIVE =
1- HIVE_ONLY =
2- IMPALA_ONLY =
3- VERSION =
"0.0.1"
Class Method Summary collapse
-
.connect(impala_servers, hivethrift_servers, logger = Impaler::DEFAULT_LOGGER) {|conn| ... } ⇒ Connection
Connect to the servers and optionally execute a block of code with the servers.
Class Method Details
.connect(impala_servers, hivethrift_servers, logger = Impaler::DEFAULT_LOGGER) {|conn| ... } ⇒ Connection
Connect to the servers and optionally execute a block of code with the servers.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/impaler.rb', line 27 def self.connect(impala_servers, hivethrift_servers, logger=Impaler::DEFAULT_LOGGER) manager = Manager.new(impala_servers, hivethrift_servers, logger=logger) if block_given? begin ret = yield manager ensure manager.close end else ret = manager end ret end |