def test_admission_status(self): """Test whether the admission status gets printed if a query gets queued when either live_summary or live_progress is set to true""" expected_admission_status = "Query queued. Latest queuing reason: " \ "number of running queries 1 is at or over limit 1" # Start a long running query so that the next one gets queued. sleep_query_handle = self.client.execute_async("select sleep(10000)") self.client.wait_for_admission_control(sleep_query_handle) # Iterate over test vector within test function to avoid restarting cluster. for vector in [ ImpalaTestVector([value]) for value in create_beeswax_hs2_dimension() ]: cmd = get_shell_cmd(vector) proc = pexpect.spawn(cmd[0], cmd[1:]) # Check with only live_summary set to true. proc.expect("{0}] default>".format(get_impalad_port(vector))) proc.sendline("set live_summary=true;") proc.sendline("select 1;") proc.expect(expected_admission_status) proc.sendcontrol('c') proc.expect("Cancelling Query") # Check with only live_progress set to true. proc.sendline("set live_summary=false;") proc.sendline("set live_progress=true;") proc.sendline("select 1;") proc.expect(expected_admission_status)
def add_test_dimensions(cls): super(TestStringQueries, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_dimension( create_exec_option_dimension(disable_codegen_options=[False, True])) cls.ImpalaTestMatrix.add_constraint(lambda v:\ v.get_value('table_format').file_format in ['text'] and v.get_value('table_format').compression_codec in ['none']) # Run these queries through both beeswax and HS2 to get coverage of CHAR/VARCHAR # returned via both protocols. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_text_constraint)
def add_test_dimensions(cls): super(TestStringQueries, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_dimension( create_exec_option_dimension( disable_codegen_options=[False, True])) cls.ImpalaTestMatrix.add_constraint(lambda v:\ v.get_value('table_format').file_format in ['text'] and v.get_value('table_format').compression_codec in ['none']) # Run these queries through both beeswax and HS2 to get coverage of CHAR/VARCHAR # returned via both protocols. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_text_constraint)
def add_test_dimensions(cls): super(TestQueries, cls).add_test_dimensions() if cls.exploration_strategy() == 'core': cls.ImpalaTestMatrix.add_constraint(lambda v:\ v.get_value('table_format').file_format == 'parquet') # Run these queries through both beeswax and HS2 to get coverage of both protocols. # Don't run all combinations of table format and protocol - the dimensions should # be orthogonal. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_parquet_constraint) # Adding a test dimension here to test the small query opt in exhaustive. if cls.exploration_strategy() == 'exhaustive': extend_exec_option_dimension(cls, "exec_single_node_rows_threshold", "100")
def add_test_dimensions(cls): super(TestQueries, cls).add_test_dimensions() if cls.exploration_strategy() == 'core': cls.ImpalaTestMatrix.add_constraint(lambda v:\ v.get_value('table_format').file_format == 'parquet') # Run these queries through both beeswax and HS2 to get coverage of both protocols. # Don't run all combinations of table format and protocol - the dimensions should # be orthogonal. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_parquet_constraint) # Adding a test dimension here to test the small query opt in exhaustive. if cls.exploration_strategy() == 'exhaustive': extend_exec_option_dimension(cls, "exec_single_node_rows_threshold", "100")
def add_test_dimensions(cls): super(TestDateQueries, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_dimension( create_exec_option_dimension_from_dict({ 'batch_size': [0, 1], 'disable_codegen': ['false', 'true'], 'disable_codegen_rows_threshold': [0]})) # DATE type is only supported for text fileformat on HDFS and HBASE. cls.ImpalaTestMatrix.add_constraint(lambda v: v.get_value('table_format').file_format in ('text', 'hbase')) # Run these queries through both beeswax and HS2 to get coverage of date returned # via both protocols. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_parquet_constraint)
def add_test_dimensions(cls): super(TestDecimalQueries, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_dimension( create_exec_option_dimension_from_dict({ 'decimal_v2' : ['false', 'true'], 'batch_size' : [0, 1], 'disable_codegen' : ['false', 'true'], 'disable_codegen_rows_threshold' : [0]})) # Hive < 0.11 does not support decimal so we can't run these tests against the other # file formats. # TODO: Enable them on Hive >= 0.11. cls.ImpalaTestMatrix.add_constraint(lambda v:\ (v.get_value('table_format').file_format == 'text' and v.get_value('table_format').compression_codec == 'none') or v.get_value('table_format').file_format in ['parquet', 'orc', 'kudu']) # Run these queries through both beeswax and HS2 to get coverage of decimals returned # via both protocols. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension()) cls.ImpalaTestMatrix.add_constraint(hs2_parquet_constraint)
def add_test_dimensions(cls): super(TestCastWithFormat, cls).add_test_dimensions() cls.ImpalaTestMatrix.add_constraint( lambda v: v.get_value('table_format').file_format == 'parquet') cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension())
def add_test_dimensions(cls): # Run with both beeswax and HS2 to ensure that behaviour is the same. cls.ImpalaTestMatrix.add_dimension(create_beeswax_hs2_dimension())