[ 
https://issues.apache.org/jira/browse/IMPALA-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jim Apple resolved IMPALA-6301.
-------------------------------
    Resolution: Fixed

Resolved in https://gerrit.cloudera.org/#/c/8807/. Thanks, Quanlong!

> Tests failed when user name or group name contains dots
> -------------------------------------------------------
>
>                 Key: IMPALA-6301
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6301
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>              Labels: broken-build
>
> I encountered the following errors when I compiled and ran tests of Impala.
> {code}
>  ERROR at setup of TestGrantRevoke.test_role_update[exec_option: 
> {'batch_size': 0, 'num_nodes': 0, 'disable_codegen_rows_threshold': 0, 
> 'disable_codegen': False, 'abort_on_error': 1, 
> 'exec_single_node_rows_threshold': 0} | table_format: t
> ext/none] 
> authorization/test_grant_revoke.py:47: in setup_method
>     self.__test_cleanup()
> authorization/test_grant_revoke.py:72: in __test_cleanup
>     self.client.execute("grant role grant_revoke_test_admin to group %s" % 
> group_name)
> common/impala_connection.py:160: in execute
>     return self.__beeswax_client.execute(sql_stmt, user=user)
> beeswax/impala_beeswax.py:173: in execute
>     handle = self.__execute_query(query_string.strip(), user=user)
> beeswax/impala_beeswax.py:339: in __execute_query
>     handle = self.execute_query_async(query_string, user=user)
> beeswax/impala_beeswax.py:335: in execute_query_async
>     return self.__do_rpc(lambda: self.imp_service.query(query,))
> beeswax/impala_beeswax.py:460: in __do_rpc
>     raise ImpalaBeeswaxException(self.__build_error_message(b), b)
> E   ImpalaBeeswaxException: ImpalaBeeswaxException:
> E    INNER EXCEPTION: <class 'beeswaxd.ttypes.BeeswaxException'>
> E    MESSAGE: AnalysisException: Syntax error in line 1:
> E   grant role grant_revoke_test_admin to group quanlong.huang
> E                                                       ^
> E   Encountered: .
> E   Expected
> E   
> E   CAUSED BY: Exception: Syntax error
> {code}
> The problem is that my group name is 'quanlong.huang' which contains a dot in 
> it and cause a syntax error. We need to quote the group name in all the 
> "GRANT ROLL xxx TO GROUP yyy" queries.
> Another problem is about the user name:
> {code}
> _________________________________________ 
> TestAdmissionController.test_set_request_pool 
> ___________________________________________
> tests/hs2/hs2_test_suite.py:48: in add_session
>     fn(self)
> tests/custom_cluster/test_admission_controller.py:260: in 
> test_set_request_pool
>     self.__check_pool_rejected(client, pool, expected_error)
> tests/custom_cluster/test_admission_controller.py:192: in 
> __check_pool_rejected
>     assert re.search(expected_error_re, str(e))
> E   assert None
> E    +  where None = <function search at 0x7f2972d21aa0>("No mapping found 
> for request from user '\\w+' with requested pool ''", 
> "ImpalaBeeswaxException:\n INNER EXCEPTION: <class 
> 'beeswaxd.ttypes.BeeswaxException'>\n MESSAGE: No mapping 
> found for request from user 'quanlong.huang' with requested pool ''\n")
> E    +    where <function search at 0x7f2972d21aa0> = re.search
> E    +    and   "ImpalaBeeswaxException:\n INNER EXCEPTION: <class 
> 'beeswaxd.ttypes.BeeswaxException'>\n MESSAGE: No mapping found for request 
> from user 'quanlong.huang' with requested pool ''\n" = 
> str(ImpalaBeeswaxException())
> {code}
> My user name quanlong.huang does not match the regex expression '\w+'. We 
> should use '\S+' instead. '\S' means all non whitespace characters.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to