[ 
https://issues.apache.org/jira/browse/SENTRY-1649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15993500#comment-15993500
 ] 

Na Li commented on SENTRY-1649:
-------------------------------

I look at the log message for succeeded test and failed test. The reason of the 
test failure is
a) TestHDFSIntegrationBase.hiveServer2 is static (protected static 
InternalHiveServer hiveServer2;). 
b) When the test_1 is cleaning up and removing roles, test_2 has started and 
created new hiveServer2, and the roles created are removed by test_1. So test_2 
fails. 

Log messages:

1. For the succeeded test, the clean up messages, such as "Starting command: 
drop role col_role", from TestHDFSIntegrationBase.cleanAfterTest() only appear 
at the end of the log when the test ends.
2017-05-02 10:37:37,309 (HiveServer2-Handler-Pool: Thread-256) [INFO - 
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:185)] 
Parsing command: drop role col_role
2017-05-02 10:37:37,349 (HiveServer2-Background-Pool: Thread-273) [INFO - 
org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1317)] Starting command: 
drop role col_role
2017-05-02 10:37:37,363 (pool-6-thread-3) [INFO - 
org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.drop_sentry_role(SentryPolicyStoreProcessor.java:441)]
 
{"serviceName":"Sentry-Service","userName":"hive","impersonator":"","ipAddress":"/127.0.0.1","operation":"DROP_ROLE","eventTime":"1493739457363","operationText":"DROP
 ROLE 
col_role","allowed":"true","databaseName":null,"tableName":null,"column":null,"resourcePath":null,"objectType":"ROLE"}


2. For failed test, the clean up messages, such as "Starting command: drop role 
col_role", appear at the beginning of the log and the end of log. Inidcating 
cleanAfterTest() was called at the beginning of the test and the end of the 
test. This removes the configuration setup for the test, and causes the test to 
fail.
2017-04-26 10:07:22,986 (HiveServer2-Background-Pool: Thread-1365) [INFO - 
org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1317)] Starting command: 
drop role col_role
2017-04-26 10:07:23,007 (pool-86-thread-3) [INFO - 
org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.drop_sentry_role(SentryPolicyStoreProcessor.java:441)]
 
{"serviceName":"Sentry-Service","userName":"hive","impersonator":"","ipAddress":"/127.0.0.1","operation":"DROP_ROLE","eventTime":"1493201243007","operationText":"DROP
 ROLE 
col_role","allowed":"true","databaseName":null,"tableName":null,"column":null,"resourcePath":null,"objectType":"ROLE"}

2017-04-26 10:06:00,674 (HiveServer2-Handler-Pool: Thread-255) [INFO - 
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:185)] 
Parsing command: drop role 
col_role
2017-04-26 10:06:00,738 (HiveServer2-Background-Pool: Thread-446) [INFO - 
org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1317)] Starting command: 
drop role col_role
2017-04-26 10:06:00,762 (pool-6-thread-3) [INFO - 
org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.drop_sentry_role(SentryPolicyStoreProcessor.java:441)]
 
{"serviceName":"Sentry-Service","userName":"hive","impersonator":"","ipAddress":"/127.0.0.1","operation":"DROP_ROLE","eventTime":"1493201160762","operationText":"DROP
 ROLE 
col_role","allowed":"true","databaseName":null,"tableName":null,"column":null,"resourcePath":null,"objectType":"ROLE"}


> Initialize HMSFollower when sentry server actually starts
> ---------------------------------------------------------
>
>                 Key: SENTRY-1649
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1649
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Hdfs Plugin
>    Affects Versions: sentry-ha-redesign
>            Reporter: Hao Hao
>            Assignee: Na Li
>            Priority: Critical
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1649.015-sentry-ha-redesign.patch, 
> SENTRY-1649.022-sentry-ha-redesign.patch, 
> SENTRY-1649.024-sentry-ha-redesign.patch, 
> SENTRY-1649.024-sentry-ha-redesign.patch, 
> SENTRY-1649.024-sentry-ha-redesign.patch, 
> SENTRY-1649.025-sentry-ha-redesign.patch, 
> SENTRY-1649.028-sentry-ha-redesign.patch, 
> SENTRY-1649.029-sentry-ha-redesign.patch, 
> SENTRY-1649.030-sentry-ha-redesign.patch, 
> SENTRY-1649.030-sentry-ha-redesign.patch, 
> SENTRY-1649.031-sentry-ha-redesign.patch, 
> SENTRY-1649.031-sentry-ha-redesign.patch, 
> SENTRY-1649.031-sentry-ha-redesign.patch, 
> SENTRY-1649.032-sentry-ha-redesign.patch, 
> SENTRY-1649.033-sentry-ha-redesign.patch
>
>
> Now HMSFollower has been initialized at the constructor of SentryService. It 
> would be better to initialize it when the service starts, e.g runServer().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to