sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject sentry git commit: SENTRY-1751: HMSFollower should not persist empty full snapshot (Kalyan Kalvagadda, reviewed by: Na Li, Sergio Pena and Alex Kolbasov)
Date Tue, 16 May 2017 04:04:52 GMT
Repository: sentry
Updated Branches:
  refs/heads/sentry-ha-redesign ed47850a7 -> 17a8c4985


SENTRY-1751: HMSFollower should not persist empty full snapshot (Kalyan Kalvagadda, reviewed
by: Na Li, Sergio Pena and Alex Kolbasov)


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/17a8c498
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/17a8c498
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/17a8c498

Branch: refs/heads/sentry-ha-redesign
Commit: 17a8c4985738b53e88e2816ce5da01584a14bf05
Parents: ed47850
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Mon May 15 21:03:03 2017 -0700
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Mon May 15 21:03:03 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/sentry/service/thrift/HMSFollower.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/17a8c498/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
index 5e6b906..375cf16 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/HMSFollower.java
@@ -283,6 +283,10 @@ public class HMSFollower implements Runnable, AutoCloseable {
 
         try {
           pathsFullSnapshot = fetchFullUpdate();
+          if(pathsFullSnapshot.isEmpty()) {
+            LOGGER.info("Hive full snapshot is Empty. Perhaps, HMS does not have any data");
+            return;
+          }
         } catch (ExecutionException | InterruptedException ex) {
           LOGGER.error("#### Encountered failure during fetching hive full snapshot !!",
ex);
           return;


Mime
View raw message