You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by am...@apache.org on 2018/10/19 23:42:28 UTC

sentry git commit: SENTRY-2428: Skip null partitions or partitions with null sds entries (Arjun Mishra reviewed by Na Li)

Repository: sentry
Updated Branches:
  refs/heads/master 985b70887 -> bd0583db9


SENTRY-2428: Skip null partitions or partitions with null sds entries (Arjun Mishra reviewed by Na Li)

Change-Id: I3ad372400d482706f79d4570817e296332bb23c4


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

Branch: refs/heads/master
Commit: bd0583db9d52cfc03e8c75a3ac1eaac8fd535695
Parents: 985b708
Author: amishra <am...@cloudera.com>
Authored: Fri Oct 19 18:39:40 2018 -0500
Committer: amishra <am...@cloudera.com>
Committed: Fri Oct 19 18:39:40 2018 -0500

----------------------------------------------------------------------
 .../apache/sentry/service/thrift/FullUpdateInitializer.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/bd0583db/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java
----------------------------------------------------------------------
diff --git a/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java b/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java
index 3e27d1b..4ff3dc9 100644
--- a/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java
+++ b/sentry-service/sentry-service-server/src/main/java/org/apache/sentry/service/thrift/FullUpdateInitializer.java
@@ -303,14 +303,13 @@ public final class FullUpdateInitializer implements AutoCloseable {
       Collection<String> partitionNames = new ArrayList<>(tblParts.size());
 
         for (Partition part : tblParts) {
-          try {
+          if(part != null && part.getSd() != null) {
             String partPath = pathFromURI(part.getSd().getLocation());
             if (partPath != null) {
               partitionNames.add(partPath.intern());
             }
-          } catch(Exception e) {
-            LOGGER.error("Exception while fetching partitions for db = {} table = {}", dbName, tblName);
-            throw e;
+          } else {
+            LOGGER.info("Partition or its storage descriptor is null while fetching partitions for db = {} table = {}", dbName, tblName);
           }
         }
       return new ObjectMapping(authName, partitionNames);