示例#1
0
def con(request):
    ImpalaE2E.setUpClass()

    try:
        yield ImpalaE2E.con
    finally:
        ImpalaE2E.tearDownClass()
示例#2
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls, ENV)

        cls.temp_tables = []

        cls.kclient = kudu.connect(cls.env.master_host, cls.env.master_port)

        cls.con.kudu.connect(cls.env.master_host, cls.env.master_port)
示例#3
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls, ENV)

        cls.temp_tables = []

        cls.kclient = kudu.connect(cls.env.master_host, cls.env.master_port)

        cls.con.kudu.connect(cls.env.master_host, cls.env.master_port)
示例#4
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls, ENV)

        df = pd.DataFrame({'year': [2009, 2009, 2009, 2010, 2010, 2010],
                           'month': ['1', '2', '3', '1', '2', '3'],
                           'value': [1, 2, 3, 4, 5, 6]})
        df = pd.concat([df] * 10, ignore_index=True)
        df['id'] = df.index.values

        cls.df = df
        cls.db = cls.con.database(cls.tmp_db)
        cls.pd_name = _tmp_name()
        cls.db.create_table(cls.pd_name, df)
示例#5
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls)

        df = pd.DataFrame({'year': [2009, 2009, 2009, 2010, 2010, 2010],
                           'month': [1, 2, 3, 1, 2, 3],
                           'value': [1, 2, 3, 4, 5, 6]})
        df = pd.concat([df] * 10, ignore_index=True)
        df['id'] = df.index.values

        cls.df = df
        cls.db = cls.con.database(cls.tmp_db)
        cls.pd_name = _tmp_name()
        cls.db.create_table(cls.pd_name, df)
示例#6
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls, ENV)

        cls.path_uuid = 'change-location-{0}'.format(util.guid())
        fake_path = pjoin(cls.tmp_dir, cls.path_uuid)

        cls.table_name = 'table_{0}'.format(util.guid())

        schema = ibis.schema([('foo', 'string'), ('bar', 'int64')])

        cls.con.create_table(cls.table_name,
                             database=cls.tmp_db,
                             schema=schema,
                             format='parquet',
                             external=True,
                             location=fake_path)
        cls.table = cls.con.table(cls.table_name, database=cls.tmp_db)
示例#7
0
    def setUpClass(cls):
        ImpalaE2E.setup_e2e(cls)

        cls.path_uuid = 'change-location-{0}'.format(util.guid())
        fake_path = pjoin(cls.tmp_dir, cls.path_uuid)

        cls.table_name = 'table_{0}'.format(util.guid())

        schema = ibis.schema([('foo', 'string'), ('bar', 'int64')])

        cls.con.create_table(cls.table_name,
                             database=cls.tmp_db,
                             schema=schema,
                             format='parquet',
                             external=True,
                             location=fake_path)
        cls.table = cls.con.table(cls.table_name, database=cls.tmp_db)
示例#8
0
 def tearDownClass(cls):
     cls.con.drop_table(cls.table_name, database=cls.tmp_db)
     ImpalaE2E.teardown_e2e(cls)
示例#9
0
 def tearDownClass(cls):
     cls.con.drop_table(cls.table_name, database=cls.tmp_db)
     ImpalaE2E.teardown_e2e(cls)
示例#10
0
 def tearDown(self):
     ImpalaE2E.tearDown(self)
     gc.collect()
示例#11
0
 def setUp(self):
     ImpalaE2E.setUp(self)
示例#12
0
 def tearDown(self):
     ImpalaE2E.tearDown(self)
     gc.collect()
示例#13
0
 def setUp(self):
     ImpalaE2E.setUp(self)