lib/impala/connection.rb
# Open the connection if it's currently closed.
Open the connection if it's currently closed.
Open the connection if it ' s currently closed .
def open
      return if @connected
      socket = Thrift::Socket.new(@host, @port)
      @transport = Thrift::BufferedTransport.new(socket)
      @transport.open
      proto = Thrift::BinaryProtocol.new(@transport)
      @service = Protocol::ImpalaService::Client.new(proto)
      @connected = true
    end
def open return if @connected socket = Thrift :: Socket . new ( @host , @port ) @transport = Thrift :: BufferedTransport . new ( socket ) @transport . open proto = Thrift :: BinaryProtocol . new ( @transport ) @service = Protocol :: ImpalaService :: Client . new ( proto ) @connected = true end
Open the connection if it's currently closed.
Open the connection if it ' s currently closed .