You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sd...@apache.org on 2015/03/11 02:35:07 UTC
incubator-sentry git commit: SENTRY-599: Sentry service may report
incorrect status when service is restarting (Dapeng Sun, reviewed by Colin Ma)
Repository: incubator-sentry
Updated Branches:
refs/heads/master 90ea9aca1 -> 925afae89
SENTRY-599: Sentry service may report incorrect status when service is restarting (Dapeng Sun, reviewed by Colin Ma)
Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/925afae8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/925afae8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/925afae8
Branch: refs/heads/master
Commit: 925afae8964ebae76f61eba73d955bf0a7a787c2
Parents: 90ea9ac
Author: Sun Dapeng <sd...@apache.org>
Authored: Wed Mar 11 09:28:42 2015 +0800
Committer: Sun Dapeng <sd...@apache.org>
Committed: Wed Mar 11 09:28:42 2015 +0800
----------------------------------------------------------------------
.../main/java/org/apache/sentry/service/thrift/SentryService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/925afae8/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
index d48fe5b..9dda1fb 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/SentryService.java
@@ -150,6 +150,7 @@ public class SentryService implements Callable {
public String call() throws Exception {
SentryKerberosContext kerberosContext = null;
try {
+ status = Status.STARTED;
if (kerberos) {
kerberosContext = new SentryKerberosContext(principal, keytab, true);
Subject.doAs(kerberosContext.getSubject(), new PrivilegedExceptionAction<Void>() {
@@ -258,7 +259,6 @@ public class SentryService implements Callable {
throw new IllegalStateException("Cannot start when " + status);
}
LOGGER.info("Attempting to start...");
- status = Status.STARTED;
serviceStatus = serviceExecutor.submit(this);
}