[
https://issues.apache.org/jira/browse/SENTRY-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289606#comment-16289606
]
Na Li commented on SENTRY-1753:
-------------------------------
[~liamsargent] the default value right now is 0
"SENTRY_HMSFOLLOWER_INIT_DELAY_MILLS_DEFAULT = 0;". It would be nice to measure
how long HMS service can start, and then set the initial delay around that
value. So we can avoid a lot of exception in sentry log
{code}
2017-12-11 10:50:00,779 ERROR org.apache.sentry.service.thrift.HMSFollower:
HMSFollower cannot connect to HMS!!
java.lang.reflect.UndeclaredThrowableException
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1980)
at
org.apache.sentry.service.thrift.HiveSimpleConnectionFactory.connect(HiveSimpleConnectionFactory.java:114)
at
org.apache.sentry.service.thrift.SentryHMSClient.connect(SentryHMSClient.java:108)
at
org.apache.sentry.service.thrift.HMSFollower.syncupWithHms(HMSFollower.java:158)
{code}
We want to minimize those exception before HMS service is up and Sentry can
connect to it by {color:red}setting SENTRY_HMSFOLLOWER_INIT_DELAY_MILLS_DEFAULT
a little lower than the time HMS service takes to start{color}. Setting this
value too large will unnecessarily delay sentry service.
Basically, such exception should be ignored before the following message shows
up in sentry log.
{code}
2017-12-01 05:50:03,672 INFO org.apache.sentry.service.thrift.HMSFollower:
Sentry HMS support is ready
{code}
For example, it takes about 5 minutes for HMS service to start, and sentry
service is able to connect to HMS service in one cluster
{code}
2017-12-11 10:49:53
<sentry service starts>
2017-12-11 10:55:18,745 INFO hive.metastore: Connected to metastore.
<sentry connects to HMS>
2017-12-11 10:55:18,832 INFO org.apache.sentry.service.thrift.SentryHMSClient:
Request full HMS snapshot
2017-12-11 10:55:19,147 INFO org.apache.sentry.service.thrift.HMSFollower:
Sentry HMS support is ready <sentry gets full snapshot, and ready
for HMS support>
{code}
> Make HMSFollower initial delay configurable
> -------------------------------------------
>
> Key: SENTRY-1753
> URL: https://issues.apache.org/jira/browse/SENTRY-1753
> Project: Sentry
> Issue Type: Task
> Components: Sentry
> Affects Versions: 2.0.0
> Reporter: Na Li
> Priority: Minor
>
> HMSFollower initial delay affects how fast it can get notification from Hive
> meta store. We are changing it from 60 seconds to 0 second. It may cause some
> issue. It is better to make this value configurable, so we can adjust it
> based on testing result.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)