Member since 
    
	
		
		
		08-20-2022
	
	
	
	
	
	
	
	
	
	
	
	
	
	
			
      
                1
            
            
                Post
            
        
                0
            
            
                Kudos Received
            
        
                0
            
            
                Solutions
            
        
			
    
	
		
		
		08-20-2022
	
		
		01:00 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 Hi All,  I'm not able to access BDF (HIVE/IMPALA) tables from my local machine. I'm using below query. Could you please suggest.     from impala.dbapi import connect  conn = connect(host='xxxximpala.rxcorp.com', port=21000,user='xxxxxx', password='xxxxx',auth_mechanism='PLAIN')  cursor = conn.cursor()  cursor.execute('SELECT COUNT(1) FROM my_table LIMIT 100')  results = cursor.fetchall()     TTransportException                       Traceback (most recent call last)
<ipython-input-199-b13e7182755e> in <module>
      1 from impala.dbapi import connect
----> 2 conn = connect(host='xxxmpala.rxcorp.com', port=21000,user='xxxx', password='xxxx',auth_mechanism='PLAIN')
      3 cursor = conn.cursor()
      4 cursor.execute('SELECT COUNT(1) FROM my_table LIMIT 100')
      5 #print cursor.description  # prints the result set's schema
~\AppData\Local\Continuum\anaconda3\lib\site-packages\impala\dbapi.py in connect(host, port, database, timeout, use_ssl, ca_cert, auth_mechanism, user, password, kerberos_service_name, use_ldap, ldap_user, ldap_password, use_kerberos, protocol, krb_host, use_http_transport, http_path, auth_cookie_names, http_cookie_names, retries, jwt)
    199                           http_cookie_names=http_cookie_names,
    200                           retries=retries,
--> 201                           jwt=jwt)    202     return hs2.HiveServer2Connection(service, default_db=database)
    203 
~\AppData\Local\Continuum\anaconda3\lib\site-packages\impala\hiveserver2.py in connect(host, port, timeout, use_ssl, ca_cert, user, password, kerberos_service_name, auth_mechanism, krb_host, use_http_transport, http_path, http_cookie_names, retries, jwt)
    861                                 auth_mechanism, user, password)
    862 
--> 863     transport.open()
    864     protocol = TBinaryProtocolAccelerated(transport)
    865     service = ThriftClient(protocol)
~\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift_sasl\__init__.py in open(self)
     91     # SASL negotiation loop
     92     while True:
---> 93       status, payload = self._recv_sasl_message()
     94       if status not in (self.OK, self.COMPLETE):
     95         raise TTransportException(type=TTransportException.NOT_OPEN,
~\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift_sasl\__init__.py in _recv_sasl_message(self)
    110 
    111   def _recv_sasl_message(self):
--> 112     header = self._trans_read_all(5)
    113     status, length = struct.unpack(">BI", header)
    114     if length > 0:
~\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift_sasl\__init__.py in _trans_read_all(self, sz)
    196     except AttributeError:
    197       read_all = self._trans.read # thriftpy
--> 198     return read_all(sz)
    199 
    200   def close(self):
~\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift\transport\TTransport.py in readAll(self, sz)
     58         have = 0
     59         while (have < sz):
---> 60             chunk = self.read(sz - have)
     61             chunkLen = len(chunk)
     62             have += chunkLen
~\AppData\Local\Continuum\anaconda3\lib\site-packages\thrift\transport\TSocket.py in read(self, sz)
    130         if len(buff) == 0:
    131             raise TTransportException(type=TTransportException.END_OF_FILE,
--> 132                                       message='TSocket read 0 bytes')    133         return buff
    134 
TTransportException: TSocket read 0 bytes    
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
		
			
				
						
							Labels:
						
						
		
			
	
					
			
		
	
	
	
	
				
		
	
	
- Labels:
- 
						
							
		
			Apache Hive
- 
						
							
		
			Apache Impala
 
        