#NEWLINE# @ classmethod #NEWLINE# def setup_class( cls ) : #NEWLINE# #INDENT# cls . finish = [ ] #NEWLINE# if ( not is_live_cluster ( ) ) : #NEWLINE# #INDENT# raise SkipTest #NEWLINE# #UNINDENT# cls . client = make_logged_in_client ( ) #NEWLINE# cls . user = User . objects . get ( username = 'test' ) #NEWLINE# add_to_group ( 'test' ) #NEWLINE# cls . db = dbms . get ( cls . user , get_query_server_config ( name = 'impala' ) ) #NEWLINE# cls . DATABASE = get_db_prefix ( name = 'impala' ) #NEWLINE# hql = ( '\n      USE default;\n      DROP TABLE IF EXISTS %(db)s.tweets;\n      DROP DATABASE IF EXISTS %(db)s CASCADE;\n      CREATE DATABASE %(db)s;\n\n      USE %(db)s;\n    ' % { #NEWLINE# #INDENT# 'db' : cls . DATABASE , #NEWLINE# #UNINDENT# } ) #NEWLINE# resp = _make_query ( cls . client , hql , database = 'default' , local = False , server_name = 'impala' ) #NEWLINE# resp = wait_for_query_to_finish ( cls . client , resp , max = 180.0 ) #NEWLINE# content = json . loads ( resp . content ) #NEWLINE# assert_true ( ( content [ 'status' ] == 0 ) , resp . content ) #NEWLINE# hql = '\n      CREATE TABLE tweets (row_num INTEGER, id_str STRING, text STRING) STORED AS PARQUET;\n\n      INSERT INTO TABLE tweets VALUES (1, "531091827395682000", "My dad looks younger than costa");\n      INSERT INTO TABLE tweets VALUES (2, "531091827781550000", "There is a thin line between your partner being vengeful and you reaping the consequences of your bad actions towards your partner.");\n      INSERT INTO TABLE tweets VALUES (3, "531091827768979000", "@Mustang_Sally83 and they need to get into you :))))");\n      INSERT INTO TABLE tweets VALUES (4, "531091827114668000", "@RachelZJohnson thank you rach!xxx");\n      INSERT INTO TABLE tweets VALUES (5, "531091827949309000", "i think @WWERollins was robbed of the IC title match this week on RAW also i wonder if he will get a rematch i hope so @WWE");\n    ' #NEWLINE# resp = _make_query ( cls . client , hql , database = cls . DATABASE , local = False , server_name = 'impala' ) #NEWLINE# resp = wait_for_query_to_finish ( cls . client , resp , max = 180.0 ) #NEWLINE# content = json . loads ( resp . content ) #NEWLINE# assert_true ( ( content [ 'status' ] == 0 ) , resp . content )