예제 #1
0
 def connect(self, db_name=None, impalad=None):
   if not impalad:
     impalad = choice(self.impalads)
   conn = ImpalaConnection(host_name=impalad.host_name, port=impalad.hs2_port,
       user_name=self.cluster.hadoop_user_name, db_name=db_name,
       use_kerberos=self.cluster.is_kerberized)
   conn.cluster = self.cluster
   return conn
예제 #2
0
파일: cluster.py 프로젝트: nghiaxlee/impala
 def connect(self, db_name=None, impalad=None):
     if not impalad:
         impalad = choice(self.impalads)
     conn = ImpalaConnection(host_name=impalad.host_name,
                             port=impalad.hs2_port,
                             user_name=self.cluster.hadoop_user_name,
                             db_name=db_name,
                             use_kerberos=self.cluster.is_kerberized)
     conn.cluster = self.cluster
     return conn