Пример #1
0
    def setup_class(cls):
        """Setup section that runs before each test suite"""
        cls.hive_client, cls.client = [None, None]
        # Create a Hive Metastore Client (used for executing some test SETUP steps
        metastore_host, metastore_port = pytest.config.option.metastore_server.split(
            ':')
        trans_type = 'buffered'
        if pytest.config.option.use_kerberos:
            trans_type = 'kerberos'
        cls.hive_transport = create_transport(
            host=metastore_host,
            port=metastore_port,
            service=pytest.config.option.hive_service_name,
            transport_type=trans_type)
        protocol = TBinaryProtocol.TBinaryProtocol(cls.hive_transport)
        cls.hive_client = ThriftHiveMetastore.Client(protocol)
        cls.hive_transport.open()

        # Create a connection to Impala.
        cls.client = cls.create_impala_client(IMPALAD)

        cls.impalad_test_service = ImpaladService(IMPALAD.split(':')[0])
        if pytest.config.option.namenode_http_address is None:
            cls.hdfs_client = get_hdfs_client_from_conf(HDFS_CONF)
        else:
            host, port = pytest.config.option.namenode_http_address.split(":")
            cls.hdfs_client = get_hdfs_client()
Пример #2
0
 def setup_class(cls):
   if pytest.config.option.namenode_http_address is None:
     hdfs_conf = HdfsConfig(pytest.config.option.minicluster_xml_conf)
     cls.hdfs_client = get_hdfs_client_from_conf(hdfs_conf)
   else:
     host, port = pytest.config.option.namenode_http_address.split(":")
     cls.hdfs_client = get_hdfs_client()
Пример #3
0
 def create_hdfs_client(cls):
   if pytest.config.option.namenode_http_address is None:
     hdfs_client = get_hdfs_client_from_conf(HDFS_CONF)
   else:
     host, port = pytest.config.option.namenode_http_address.split(":")
     hdfs_client = get_hdfs_client(host, port)
   return hdfs_client
Пример #4
0
 def create_hdfs_client(cls):
     if pytest.config.option.namenode_http_address is None:
         hdfs_client = get_hdfs_client_from_conf(HDFS_CONF)
     else:
         host, port = pytest.config.option.namenode_http_address.split(":")
         hdfs_client = get_hdfs_client(host, port)
     return hdfs_client
Пример #5
0
 def setup_class(cls):
     if pytest.config.option.namenode_http_address is None:
         hdfs_conf = HdfsConfig(pytest.config.option.minicluster_xml_conf)
         cls.hdfs_client = get_hdfs_client_from_conf(hdfs_conf)
     else:
         host, port = pytest.config.option.namenode_http_address.split(":")
         cls.hdfs_client = get_hdfs_client(host, port)
Пример #6
0
    def setup_class(cls):
        """Setup section that runs before each test suite"""
        cls.hive_client, cls.client = [None, None]
        # Create a Hive Metastore Client (used for executing some test SETUP steps
        metastore_host, metastore_port = pytest.config.option.metastore_server.split(":")
        trans_type = "buffered"
        if pytest.config.option.use_kerberos:
            trans_type = "kerberos"
        cls.hive_transport = create_transport(
            host=metastore_host,
            port=metastore_port,
            service=pytest.config.option.hive_service_name,
            transport_type=trans_type,
        )
        protocol = TBinaryProtocol.TBinaryProtocol(cls.hive_transport)
        cls.hive_client = ThriftHiveMetastore.Client(protocol)
        cls.hive_transport.open()

        # Create a connection to Impala.
        cls.client = cls.create_impala_client(IMPALAD)

        cls.impalad_test_service = ImpaladService(IMPALAD.split(":")[0])
        if pytest.config.option.namenode_http_address is None:
            cls.hdfs_client = get_hdfs_client_from_conf(HDFS_CONF)
        else:
            host, port = pytest.config.option.namenode_http_address.split(":")
            cls.hdfs_client = get_hdfs_client()
 def setup_class(cls):
     super(TestInsertBehaviourCustomCluster, cls).setup_class()
     if pytest.config.option.namenode_http_address is None:
         hdfs_conf = HdfsConfig(pytest.config.option.minicluster_xml_conf)
         cls.hdfs_client = get_hdfs_client_from_conf(hdfs_conf)
     else:
         host, port = pytest.config.option.namenode_http_address.split(":")
         cls.hdfs_client = get_hdfs_client(host, port)
 def setup_class(cls):
   super(TestInsertBehaviourCustomCluster, cls).setup_class()
   if pytest.config.option.namenode_http_address is None:
     hdfs_conf = HdfsConfig(pytest.config.option.minicluster_xml_conf)
     cls.hdfs_client = get_hdfs_client_from_conf(hdfs_conf)
   else:
     host, port = pytest.config.option.namenode_http_address.split(":")
     cls.hdfs_client = get_hdfs_client(host, port)