Exemplo n.º 1
0
 def setup(self):
     host, port = IMPALAD_HS2_HOST_PORT.split(":")
     self.socket = TSocket(host, port)
     self.transport = TBufferedTransport(self.socket)
     self.transport.open()
     self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
     self.hs2_client = TCLIService.Client(self.protocol)
Exemplo n.º 2
0
 def setup(self):
   host, port = IMPALAD_HS2_HOST_PORT.split(":")
   self.socket = TSocket(host, port)
   self.transport = TBufferedTransport(self.socket)
   self.transport.open()
   self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
   self.hs2_client = TCLIService.Client(self.protocol)
Exemplo n.º 3
0
 def setup(self):
     self.cleanup_db(self.TEST_DB)
     host, port = IMPALAD_HS2_HOST_PORT.split(":")
     self.socket = TSocket(host, port)
     self.transport = TBufferedTransport(self.socket)
     self.transport.open()
     self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
     self.hs2_client = ImpalaHiveServer2Service.Client(self.protocol)
Exemplo n.º 4
0
 def setup(self):
   self.cleanup_db(self.TEST_DB)
   host, port = IMPALAD_HS2_HOST_PORT.split(":")
   self.socket = TSocket(host, port)
   self.transport = TBufferedTransport(self.socket)
   self.transport.open()
   self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
   self.hs2_client = ImpalaHiveServer2Service.Client(self.protocol)
Exemplo n.º 5
0
 def setup(self):
   self.cleanup_db(self.TEST_DB)
   host, port = IMPALAD_HS2_HOST_PORT.split(":")
   self.socket = TSocket(host, port)
   self.transport = TBufferedTransport(self.socket)
   self.transport.open()
   self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)
   self.hs2_client = TCLIService.Client(self.protocol)
   self.client.execute("create database %s" % self.TEST_DB)
Exemplo n.º 6
0
 def _open_hs2_connection():
     """Opens a HS2 connection, returning the socket and the thrift client."""
     host, port = IMPALAD_HS2_HOST_PORT.split(":")
     socket = TSocket(host, port)
     transport = TBufferedTransport(socket)
     transport.open()
     protocol = TBinaryProtocol.TBinaryProtocol(transport)
     hs2_client = ImpalaHiveServer2Service.Client(protocol)
     return socket, hs2_client
Exemplo n.º 7
0
 def test_default_port(self, vector):
   """Ensure that we can run when -i does not specify a port."""
   args = ['-q', DEFAULT_QUERY, '-i', IMPALAD_HS2_HOST_PORT.split(":")[0]]
   run_impala_shell_cmd(vector, args)
 def test_default_port(self, vector):
   """Ensure that we can run when -i does not specify a port."""
   args = ['-q', DEFAULT_QUERY, '-i', IMPALAD_HS2_HOST_PORT.split(":")[0]]
   run_impala_shell_cmd(vector, args)