SENTRY-953: External Partitions which are referenced by more than one table can 
cause some unexpected behavior with Sentry HDFS sync ( Hao Hao, Reviewed by: 
Sravya Tirukkovalur)

Change-Id: Ibcda4929bb008f518e4fd2bc4abb95406423488c


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

Branch: refs/heads/master
Commit: 4b33ad92988a8bc0e0bc6d03962dbc7cda58827e
Parents: 9fe7202
Author: Sravya Tirukkovalur <sra...@cloudera.com>
Authored: Wed Dec 16 22:42:41 2015 -0800
Committer: Sravya Tirukkovalur <sra...@cloudera.com>
Committed: Wed Dec 16 22:42:41 2015 -0800

----------------------------------------------------------------------
 .../hdfs/service/thrift/SentryHDFSService.java  | 211 +++++-------
 .../service/thrift/TAuthzUpdateResponse.java    |  99 +++---
 .../hdfs/service/thrift/TPathChanges.java       |  52 ++-
 .../sentry/hdfs/service/thrift/TPathEntry.java  | 317 ++++++++++---------
 .../sentry/hdfs/service/thrift/TPathsDump.java  |  88 +++--
 .../hdfs/service/thrift/TPathsUpdate.java       | 104 +++---
 .../hdfs/service/thrift/TPermissionsUpdate.java | 169 +++++-----
 .../hdfs/service/thrift/TPrivilegeChanges.java  | 140 ++++----
 .../hdfs/service/thrift/TRoleChanges.java       | 116 +++----
 .../java/org/apache/sentry/hdfs/AuthzPaths.java |  41 ++-
 .../java/org/apache/sentry/hdfs/HMSPaths.java   | 196 +++++++++---
 .../org/apache/sentry/hdfs/HMSPathsDumper.java  |  24 +-
 .../org/apache/sentry/hdfs/PathsUpdate.java     |   3 +
 .../java/org/apache/sentry/hdfs/Updateable.java |   2 +-
 .../sentry/hdfs/UpdateableAuthzPaths.java       |   7 +-
 .../main/resources/sentry_hdfs_service.thrift   |  36 ++-
 .../org/apache/sentry/hdfs/TestHMSPaths.java    |  36 ++-
 .../sentry/hdfs/TestHMSPathsFullDump.java       |  36 +--
 .../sentry/hdfs/TestUpdateableAuthzPaths.java   |  69 ++--
 .../sentry/hdfs/SentryAuthorizationInfo.java    |  26 +-
 .../apache/sentry/hdfs/SentryPermissions.java   |  15 +-
 .../hdfs/TestMetastoreCacheInitializer.java     |  16 +-
 .../tests/e2e/hdfs/TestHDFSIntegration.java     | 207 +++++++++++-
 23 files changed, 1133 insertions(+), 877 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/SentryHDFSService.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/SentryHDFSService.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/SentryHDFSService.java
index 663fe4e..5db39a7 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/SentryHDFSService.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/SentryHDFSService.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -434,7 +433,7 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
handle_hms_notification_argsTupleSchemeFactory());
     }
 
-    private TPathsUpdate pathsUpdate; // required
+    public TPathsUpdate pathsUpdate; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -536,8 +535,9 @@ public class SentryHDFSService {
       return this.pathsUpdate;
     }
 
-    public void setPathsUpdate(TPathsUpdate pathsUpdate) {
+    public handle_hms_notification_args setPathsUpdate(TPathsUpdate 
pathsUpdate) {
       this.pathsUpdate = pathsUpdate;
+      return this;
     }
 
     public void unsetPathsUpdate() {
@@ -617,14 +617,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_pathsUpdate = true && (isSetPathsUpdate());
-      builder.append(present_pathsUpdate);
-      if (present_pathsUpdate)
-        builder.append(pathsUpdate);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(handle_hms_notification_args other) {
@@ -733,6 +726,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -916,9 +911,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(handle_hms_notification_result other) {
@@ -998,6 +991,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -1043,7 +1038,7 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
check_hms_seq_num_argsTupleSchemeFactory());
     }
 
-    private long pathSeqNum; // required
+    public long pathSeqNum; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1148,9 +1143,10 @@ public class SentryHDFSService {
       return this.pathSeqNum;
     }
 
-    public void setPathSeqNum(long pathSeqNum) {
+    public check_hms_seq_num_args setPathSeqNum(long pathSeqNum) {
       this.pathSeqNum = pathSeqNum;
       setPathSeqNumIsSet(true);
+      return this;
     }
 
     public void unsetPathSeqNum() {
@@ -1228,14 +1224,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_pathSeqNum = true;
-      builder.append(present_pathSeqNum);
-      if (present_pathSeqNum)
-        builder.append(pathSeqNum);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(check_hms_seq_num_args other) {
@@ -1338,6 +1327,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -1399,7 +1390,7 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
check_hms_seq_num_resultTupleSchemeFactory());
     }
 
-    private long success; // required
+    public long success; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1504,9 +1495,10 @@ public class SentryHDFSService {
       return this.success;
     }
 
-    public void setSuccess(long success) {
+    public check_hms_seq_num_result setSuccess(long success) {
       this.success = success;
       setSuccessIsSet(true);
+      return this;
     }
 
     public void unsetSuccess() {
@@ -1584,14 +1576,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_success = true;
-      builder.append(present_success);
-      if (present_success)
-        builder.append(success);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(check_hms_seq_num_result other) {
@@ -1694,6 +1679,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -1758,8 +1745,8 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
get_all_authz_updates_from_argsTupleSchemeFactory());
     }
 
-    private long permSeqNum; // required
-    private long pathSeqNum; // required
+    public long permSeqNum; // required
+    public long pathSeqNum; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1876,9 +1863,10 @@ public class SentryHDFSService {
       return this.permSeqNum;
     }
 
-    public void setPermSeqNum(long permSeqNum) {
+    public get_all_authz_updates_from_args setPermSeqNum(long permSeqNum) {
       this.permSeqNum = permSeqNum;
       setPermSeqNumIsSet(true);
+      return this;
     }
 
     public void unsetPermSeqNum() {
@@ -1898,9 +1886,10 @@ public class SentryHDFSService {
       return this.pathSeqNum;
     }
 
-    public void setPathSeqNum(long pathSeqNum) {
+    public get_all_authz_updates_from_args setPathSeqNum(long pathSeqNum) {
       this.pathSeqNum = pathSeqNum;
       setPathSeqNumIsSet(true);
+      return this;
     }
 
     public void unsetPathSeqNum() {
@@ -2000,19 +1989,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_permSeqNum = true;
-      builder.append(present_permSeqNum);
-      if (present_permSeqNum)
-        builder.append(permSeqNum);
-
-      boolean present_pathSeqNum = true;
-      builder.append(present_pathSeqNum);
-      if (present_pathSeqNum)
-        builder.append(pathSeqNum);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(get_all_authz_updates_from_args other) {
@@ -2137,6 +2114,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -2211,7 +2190,7 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
get_all_authz_updates_from_resultTupleSchemeFactory());
     }
 
-    private TAuthzUpdateResponse success; // required
+    public TAuthzUpdateResponse success; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -2313,8 +2292,9 @@ public class SentryHDFSService {
       return this.success;
     }
 
-    public void setSuccess(TAuthzUpdateResponse success) {
+    public get_all_authz_updates_from_result setSuccess(TAuthzUpdateResponse 
success) {
       this.success = success;
+      return this;
     }
 
     public void unsetSuccess() {
@@ -2394,14 +2374,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_success = true && (isSetSuccess());
-      builder.append(present_success);
-      if (present_success)
-        builder.append(success);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(get_all_authz_updates_from_result other) {
@@ -2510,6 +2483,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -2575,8 +2550,8 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
get_all_related_paths_argsTupleSchemeFactory());
     }
 
-    private String path; // required
-    private boolean exactMatch; // required
+    public String path; // required
+    public boolean exactMatch; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -2692,8 +2667,9 @@ public class SentryHDFSService {
       return this.path;
     }
 
-    public void setPath(String path) {
+    public get_all_related_paths_args setPath(String path) {
       this.path = path;
+      return this;
     }
 
     public void unsetPath() {
@@ -2715,9 +2691,10 @@ public class SentryHDFSService {
       return this.exactMatch;
     }
 
-    public void setExactMatch(boolean exactMatch) {
+    public get_all_related_paths_args setExactMatch(boolean exactMatch) {
       this.exactMatch = exactMatch;
       setExactMatchIsSet(true);
+      return this;
     }
 
     public void unsetExactMatch() {
@@ -2817,19 +2794,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_path = true && (isSetPath());
-      builder.append(present_path);
-      if (present_path)
-        builder.append(path);
-
-      boolean present_exactMatch = true;
-      builder.append(present_exactMatch);
-      if (present_exactMatch)
-        builder.append(exactMatch);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(get_all_related_paths_args other) {
@@ -2958,6 +2923,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -3034,7 +3001,7 @@ public class SentryHDFSService {
       schemes.put(TupleScheme.class, new 
get_all_related_paths_resultTupleSchemeFactory());
     }
 
-    private Map<String,List<String>> success; // required
+    public Map<String,List<String>> success; // required
 
     /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3165,8 +3132,9 @@ public class SentryHDFSService {
       return this.success;
     }
 
-    public void setSuccess(Map<String,List<String>> success) {
+    public get_all_related_paths_result setSuccess(Map<String,List<String>> 
success) {
       this.success = success;
+      return this;
     }
 
     public void unsetSuccess() {
@@ -3246,14 +3214,7 @@ public class SentryHDFSService {
 
     @Override
     public int hashCode() {
-      HashCodeBuilder builder = new HashCodeBuilder();
-
-      boolean present_success = true && (isSetSuccess());
-      builder.append(present_success);
-      if (present_success)
-        builder.append(success);
-
-      return builder.toHashCode();
+      return 0;
     }
 
     public int compareTo(get_all_related_paths_result other) {
@@ -3347,25 +3308,25 @@ public class SentryHDFSService {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
                 {
-                  org.apache.thrift.protocol.TMap _map130 = 
iprot.readMapBegin();
-                  struct.success = new 
HashMap<String,List<String>>(2*_map130.size);
-                  for (int _i131 = 0; _i131 < _map130.size; ++_i131)
+                  org.apache.thrift.protocol.TMap _map138 = 
iprot.readMapBegin();
+                  struct.success = new 
HashMap<String,List<String>>(2*_map138.size);
+                  for (int _i139 = 0; _i139 < _map138.size; ++_i139)
                   {
-                    String _key132; // required
-                    List<String> _val133; // required
-                    _key132 = iprot.readString();
+                    String _key140; // required
+                    List<String> _val141; // required
+                    _key140 = iprot.readString();
                     {
-                      org.apache.thrift.protocol.TList _list134 = 
iprot.readListBegin();
-                      _val133 = new ArrayList<String>(_list134.size);
-                      for (int _i135 = 0; _i135 < _list134.size; ++_i135)
+                      org.apache.thrift.protocol.TList _list142 = 
iprot.readListBegin();
+                      _val141 = new ArrayList<String>(_list142.size);
+                      for (int _i143 = 0; _i143 < _list142.size; ++_i143)
                       {
-                        String _elem136; // required
-                        _elem136 = iprot.readString();
-                        _val133.add(_elem136);
+                        String _elem144; // required
+                        _elem144 = iprot.readString();
+                        _val141.add(_elem144);
                       }
                       iprot.readListEnd();
                     }
-                    struct.success.put(_key132, _val133);
+                    struct.success.put(_key140, _val141);
                   }
                   iprot.readMapEnd();
                 }
@@ -3380,6 +3341,8 @@ public class SentryHDFSService {
           iprot.readFieldEnd();
         }
         iprot.readStructEnd();
+
+        // check for required fields of primitive type, which can't be checked 
in the validate method
         struct.validate();
       }
 
@@ -3391,14 +3354,14 @@ public class SentryHDFSService {
           oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
           {
             oprot.writeMapBegin(new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, 
org.apache.thrift.protocol.TType.LIST, struct.success.size()));
-            for (Map.Entry<String, List<String>> _iter137 : 
struct.success.entrySet())
+            for (Map.Entry<String, List<String>> _iter145 : 
struct.success.entrySet())
             {
-              oprot.writeString(_iter137.getKey());
+              oprot.writeString(_iter145.getKey());
               {
-                oprot.writeListBegin(new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, 
_iter137.getValue().size()));
-                for (String _iter138 : _iter137.getValue())
+                oprot.writeListBegin(new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, 
_iter145.getValue().size()));
+                for (String _iter146 : _iter145.getValue())
                 {
-                  oprot.writeString(_iter138);
+                  oprot.writeString(_iter146);
                 }
                 oprot.writeListEnd();
               }
@@ -3432,14 +3395,14 @@ public class SentryHDFSService {
         if (struct.isSetSuccess()) {
           {
             oprot.writeI32(struct.success.size());
-            for (Map.Entry<String, List<String>> _iter139 : 
struct.success.entrySet())
+            for (Map.Entry<String, List<String>> _iter147 : 
struct.success.entrySet())
             {
-              oprot.writeString(_iter139.getKey());
+              oprot.writeString(_iter147.getKey());
               {
-                oprot.writeI32(_iter139.getValue().size());
-                for (String _iter140 : _iter139.getValue())
+                oprot.writeI32(_iter147.getValue().size());
+                for (String _iter148 : _iter147.getValue())
                 {
-                  oprot.writeString(_iter140);
+                  oprot.writeString(_iter148);
                 }
               }
             }
@@ -3453,24 +3416,24 @@ public class SentryHDFSService {
         BitSet incoming = iprot.readBitSet(1);
         if (incoming.get(0)) {
           {
-            org.apache.thrift.protocol.TMap _map141 = new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, 
org.apache.thrift.protocol.TType.LIST, iprot.readI32());
-            struct.success = new HashMap<String,List<String>>(2*_map141.size);
-            for (int _i142 = 0; _i142 < _map141.size; ++_i142)
+            org.apache.thrift.protocol.TMap _map149 = new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, 
org.apache.thrift.protocol.TType.LIST, iprot.readI32());
+            struct.success = new HashMap<String,List<String>>(2*_map149.size);
+            for (int _i150 = 0; _i150 < _map149.size; ++_i150)
             {
-              String _key143; // required
-              List<String> _val144; // required
-              _key143 = iprot.readString();
+              String _key151; // required
+              List<String> _val152; // required
+              _key151 = iprot.readString();
               {
-                org.apache.thrift.protocol.TList _list145 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, 
iprot.readI32());
-                _val144 = new ArrayList<String>(_list145.size);
-                for (int _i146 = 0; _i146 < _list145.size; ++_i146)
+                org.apache.thrift.protocol.TList _list153 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, 
iprot.readI32());
+                _val152 = new ArrayList<String>(_list153.size);
+                for (int _i154 = 0; _i154 < _list153.size; ++_i154)
                 {
-                  String _elem147; // required
-                  _elem147 = iprot.readString();
-                  _val144.add(_elem147);
+                  String _elem155; // required
+                  _elem155 = iprot.readString();
+                  _val152.add(_elem155);
                 }
               }
-              struct.success.put(_key143, _val144);
+              struct.success.put(_key151, _val152);
             }
           }
           struct.setSuccessIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TAuthzUpdateResponse.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TAuthzUpdateResponse.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TAuthzUpdateResponse.java
index 480c264..e42d710 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TAuthzUpdateResponse.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TAuthzUpdateResponse.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -43,8 +42,8 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
     schemes.put(TupleScheme.class, new 
TAuthzUpdateResponseTupleSchemeFactory());
   }
 
-  private List<TPathsUpdate> authzPathUpdate; // optional
-  private List<TPermissionsUpdate> authzPermUpdate; // optional
+  public List<TPathsUpdate> authzPathUpdate; // optional
+  public List<TPermissionsUpdate> authzPermUpdate; // optional
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -174,8 +173,9 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
     return this.authzPathUpdate;
   }
 
-  public void setAuthzPathUpdate(List<TPathsUpdate> authzPathUpdate) {
+  public TAuthzUpdateResponse setAuthzPathUpdate(List<TPathsUpdate> 
authzPathUpdate) {
     this.authzPathUpdate = authzPathUpdate;
+    return this;
   }
 
   public void unsetAuthzPathUpdate() {
@@ -212,8 +212,9 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
     return this.authzPermUpdate;
   }
 
-  public void setAuthzPermUpdate(List<TPermissionsUpdate> authzPermUpdate) {
+  public TAuthzUpdateResponse setAuthzPermUpdate(List<TPermissionsUpdate> 
authzPermUpdate) {
     this.authzPermUpdate = authzPermUpdate;
+    return this;
   }
 
   public void unsetAuthzPermUpdate() {
@@ -315,19 +316,7 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
-
-    boolean present_authzPathUpdate = true && (isSetAuthzPathUpdate());
-    builder.append(present_authzPathUpdate);
-    if (present_authzPathUpdate)
-      builder.append(authzPathUpdate);
-
-    boolean present_authzPermUpdate = true && (isSetAuthzPermUpdate());
-    builder.append(present_authzPermUpdate);
-    if (present_authzPermUpdate)
-      builder.append(authzPermUpdate);
-
-    return builder.toHashCode();
+    return 0;
   }
 
   public int compareTo(TAuthzUpdateResponse other) {
@@ -443,14 +432,14 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
           case 1: // AUTHZ_PATH_UPDATE
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list114 = 
iprot.readListBegin();
-                struct.authzPathUpdate = new 
ArrayList<TPathsUpdate>(_list114.size);
-                for (int _i115 = 0; _i115 < _list114.size; ++_i115)
+                org.apache.thrift.protocol.TList _list122 = 
iprot.readListBegin();
+                struct.authzPathUpdate = new 
ArrayList<TPathsUpdate>(_list122.size);
+                for (int _i123 = 0; _i123 < _list122.size; ++_i123)
                 {
-                  TPathsUpdate _elem116; // required
-                  _elem116 = new TPathsUpdate();
-                  _elem116.read(iprot);
-                  struct.authzPathUpdate.add(_elem116);
+                  TPathsUpdate _elem124; // required
+                  _elem124 = new TPathsUpdate();
+                  _elem124.read(iprot);
+                  struct.authzPathUpdate.add(_elem124);
                 }
                 iprot.readListEnd();
               }
@@ -462,14 +451,14 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
           case 2: // AUTHZ_PERM_UPDATE
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list117 = 
iprot.readListBegin();
-                struct.authzPermUpdate = new 
ArrayList<TPermissionsUpdate>(_list117.size);
-                for (int _i118 = 0; _i118 < _list117.size; ++_i118)
+                org.apache.thrift.protocol.TList _list125 = 
iprot.readListBegin();
+                struct.authzPermUpdate = new 
ArrayList<TPermissionsUpdate>(_list125.size);
+                for (int _i126 = 0; _i126 < _list125.size; ++_i126)
                 {
-                  TPermissionsUpdate _elem119; // required
-                  _elem119 = new TPermissionsUpdate();
-                  _elem119.read(iprot);
-                  struct.authzPermUpdate.add(_elem119);
+                  TPermissionsUpdate _elem127; // required
+                  _elem127 = new TPermissionsUpdate();
+                  _elem127.read(iprot);
+                  struct.authzPermUpdate.add(_elem127);
                 }
                 iprot.readListEnd();
               }
@@ -484,6 +473,8 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
         iprot.readFieldEnd();
       }
       iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked 
in the validate method
       struct.validate();
     }
 
@@ -496,9 +487,9 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
           oprot.writeFieldBegin(AUTHZ_PATH_UPDATE_FIELD_DESC);
           {
             oprot.writeListBegin(new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
struct.authzPathUpdate.size()));
-            for (TPathsUpdate _iter120 : struct.authzPathUpdate)
+            for (TPathsUpdate _iter128 : struct.authzPathUpdate)
             {
-              _iter120.write(oprot);
+              _iter128.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -510,9 +501,9 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
           oprot.writeFieldBegin(AUTHZ_PERM_UPDATE_FIELD_DESC);
           {
             oprot.writeListBegin(new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
struct.authzPermUpdate.size()));
-            for (TPermissionsUpdate _iter121 : struct.authzPermUpdate)
+            for (TPermissionsUpdate _iter129 : struct.authzPermUpdate)
             {
-              _iter121.write(oprot);
+              _iter129.write(oprot);
             }
             oprot.writeListEnd();
           }
@@ -547,18 +538,18 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
       if (struct.isSetAuthzPathUpdate()) {
         {
           oprot.writeI32(struct.authzPathUpdate.size());
-          for (TPathsUpdate _iter122 : struct.authzPathUpdate)
+          for (TPathsUpdate _iter130 : struct.authzPathUpdate)
           {
-            _iter122.write(oprot);
+            _iter130.write(oprot);
           }
         }
       }
       if (struct.isSetAuthzPermUpdate()) {
         {
           oprot.writeI32(struct.authzPermUpdate.size());
-          for (TPermissionsUpdate _iter123 : struct.authzPermUpdate)
+          for (TPermissionsUpdate _iter131 : struct.authzPermUpdate)
           {
-            _iter123.write(oprot);
+            _iter131.write(oprot);
           }
         }
       }
@@ -570,28 +561,28 @@ public class TAuthzUpdateResponse implements 
org.apache.thrift.TBase<TAuthzUpdat
       BitSet incoming = iprot.readBitSet(2);
       if (incoming.get(0)) {
         {
-          org.apache.thrift.protocol.TList _list124 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
-          struct.authzPathUpdate = new ArrayList<TPathsUpdate>(_list124.size);
-          for (int _i125 = 0; _i125 < _list124.size; ++_i125)
+          org.apache.thrift.protocol.TList _list132 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
+          struct.authzPathUpdate = new ArrayList<TPathsUpdate>(_list132.size);
+          for (int _i133 = 0; _i133 < _list132.size; ++_i133)
           {
-            TPathsUpdate _elem126; // required
-            _elem126 = new TPathsUpdate();
-            _elem126.read(iprot);
-            struct.authzPathUpdate.add(_elem126);
+            TPathsUpdate _elem134; // required
+            _elem134 = new TPathsUpdate();
+            _elem134.read(iprot);
+            struct.authzPathUpdate.add(_elem134);
           }
         }
         struct.setAuthzPathUpdateIsSet(true);
       }
       if (incoming.get(1)) {
         {
-          org.apache.thrift.protocol.TList _list127 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
-          struct.authzPermUpdate = new 
ArrayList<TPermissionsUpdate>(_list127.size);
-          for (int _i128 = 0; _i128 < _list127.size; ++_i128)
+          org.apache.thrift.protocol.TList _list135 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
+          struct.authzPermUpdate = new 
ArrayList<TPermissionsUpdate>(_list135.size);
+          for (int _i136 = 0; _i136 < _list135.size; ++_i136)
           {
-            TPermissionsUpdate _elem129; // required
-            _elem129 = new TPermissionsUpdate();
-            _elem129.read(iprot);
-            struct.authzPermUpdate.add(_elem129);
+            TPermissionsUpdate _elem137; // required
+            _elem137 = new TPermissionsUpdate();
+            _elem137.read(iprot);
+            struct.authzPermUpdate.add(_elem137);
           }
         }
         struct.setAuthzPermUpdateIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathChanges.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathChanges.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathChanges.java
index 85254d7..148c30d 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathChanges.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathChanges.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -44,9 +43,9 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
     schemes.put(TupleScheme.class, new TPathChangesTupleSchemeFactory());
   }
 
-  private String authzObj; // required
-  private List<List<String>> addPaths; // required
-  private List<List<String>> delPaths; // required
+  public String authzObj; // required
+  public List<List<String>> addPaths; // required
+  public List<List<String>> delPaths; // required
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -190,8 +189,9 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
     return this.authzObj;
   }
 
-  public void setAuthzObj(String authzObj) {
+  public TPathChanges setAuthzObj(String authzObj) {
     this.authzObj = authzObj;
+    return this;
   }
 
   public void unsetAuthzObj() {
@@ -228,8 +228,9 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
     return this.addPaths;
   }
 
-  public void setAddPaths(List<List<String>> addPaths) {
+  public TPathChanges setAddPaths(List<List<String>> addPaths) {
     this.addPaths = addPaths;
+    return this;
   }
 
   public void unsetAddPaths() {
@@ -266,8 +267,9 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
     return this.delPaths;
   }
 
-  public void setDelPaths(List<List<String>> delPaths) {
+  public TPathChanges setDelPaths(List<List<String>> delPaths) {
     this.delPaths = delPaths;
+    return this;
   }
 
   public void unsetDelPaths() {
@@ -391,24 +393,7 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
-
-    boolean present_authzObj = true && (isSetAuthzObj());
-    builder.append(present_authzObj);
-    if (present_authzObj)
-      builder.append(authzObj);
-
-    boolean present_addPaths = true && (isSetAddPaths());
-    builder.append(present_addPaths);
-    if (present_addPaths)
-      builder.append(addPaths);
-
-    boolean present_delPaths = true && (isSetDelPaths());
-    builder.append(present_delPaths);
-    if (present_delPaths)
-      builder.append(delPaths);
-
-    return builder.toHashCode();
+    return 0;
   }
 
   public int compareTo(TPathChanges other) {
@@ -498,18 +483,15 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetAuthzObj()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'authzObj' is unset! Struct:" + toString());
+    if (authzObj == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'authzObj' was not present! Struct: " + toString());
     }
-
-    if (!isSetAddPaths()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'addPaths' is unset! Struct:" + toString());
+    if (addPaths == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'addPaths' was not present! Struct: " + toString());
     }
-
-    if (!isSetDelPaths()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'delPaths' is unset! Struct:" + toString());
+    if (delPaths == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'delPaths' was not present! Struct: " + toString());
     }
-
     // check for sub-struct validity
   }
 
@@ -617,6 +599,8 @@ public class TPathChanges implements 
org.apache.thrift.TBase<TPathChanges, TPath
         iprot.readFieldEnd();
       }
       iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked 
in the validate method
       struct.validate();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathEntry.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathEntry.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathEntry.java
index a2a7f7b..35c059d 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathEntry.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathEntry.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -36,8 +35,8 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
 
   private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new 
org.apache.thrift.protocol.TField("type", 
org.apache.thrift.protocol.TType.BYTE, (short)1);
   private static final org.apache.thrift.protocol.TField 
PATH_ELEMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("pathElement", 
org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField AUTHZ_OBJ_FIELD_DESC 
= new org.apache.thrift.protocol.TField("authzObj", 
org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = 
new org.apache.thrift.protocol.TField("children", 
org.apache.thrift.protocol.TType.SET, (short)4);
+  private static final org.apache.thrift.protocol.TField AUTHZ_OBJS_FIELD_DESC 
= new org.apache.thrift.protocol.TField("authzObjs", 
org.apache.thrift.protocol.TType.SET, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = 
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -45,17 +44,17 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     schemes.put(TupleScheme.class, new TPathEntryTupleSchemeFactory());
   }
 
-  private byte type; // required
-  private String pathElement; // required
-  private String authzObj; // optional
-  private Set<Integer> children; // required
+  public byte type; // required
+  public String pathElement; // required
+  public Set<Integer> children; // required
+  public Set<String> authzObjs; // optional
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     TYPE((short)1, "type"),
     PATH_ELEMENT((short)2, "pathElement"),
-    AUTHZ_OBJ((short)3, "authzObj"),
-    CHILDREN((short)4, "children");
+    CHILDREN((short)4, "children"),
+    AUTHZ_OBJS((short)5, "authzObjs");
 
     private static final Map<String, _Fields> byName = new HashMap<String, 
_Fields>();
 
@@ -74,10 +73,10 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
           return TYPE;
         case 2: // PATH_ELEMENT
           return PATH_ELEMENT;
-        case 3: // AUTHZ_OBJ
-          return AUTHZ_OBJ;
         case 4: // CHILDREN
           return CHILDREN;
+        case 5: // AUTHZ_OBJS
+          return AUTHZ_OBJS;
         default:
           return null;
       }
@@ -120,7 +119,7 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
   // isset id assignments
   private static final int __TYPE_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private _Fields optionals[] = {_Fields.AUTHZ_OBJ};
+  private _Fields optionals[] = {_Fields.AUTHZ_OBJS};
   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 
metaDataMap;
   static {
     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new 
EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -128,11 +127,12 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
         new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
     tmpMap.put(_Fields.PATH_ELEMENT, new 
org.apache.thrift.meta_data.FieldMetaData("pathElement", 
org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.AUTHZ_OBJ, new 
org.apache.thrift.meta_data.FieldMetaData("authzObj", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
-        new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.CHILDREN, new 
org.apache.thrift.meta_data.FieldMetaData("children", 
org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new 
org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
             new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
+    tmpMap.put(_Fields.AUTHZ_OBJS, new 
org.apache.thrift.meta_data.FieldMetaData("authzObjs", 
org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new 
org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
+            new 
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPathEntry.class,
 metaDataMap);
   }
@@ -161,9 +161,6 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     if (other.isSetPathElement()) {
       this.pathElement = other.pathElement;
     }
-    if (other.isSetAuthzObj()) {
-      this.authzObj = other.authzObj;
-    }
     if (other.isSetChildren()) {
       Set<Integer> __this__children = new HashSet<Integer>();
       for (Integer other_element : other.children) {
@@ -171,6 +168,13 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       }
       this.children = __this__children;
     }
+    if (other.isSetAuthzObjs()) {
+      Set<String> __this__authzObjs = new HashSet<String>();
+      for (String other_element : other.authzObjs) {
+        __this__authzObjs.add(other_element);
+      }
+      this.authzObjs = __this__authzObjs;
+    }
   }
 
   public TPathEntry deepCopy() {
@@ -182,17 +186,18 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     setTypeIsSet(false);
     this.type = 0;
     this.pathElement = null;
-    this.authzObj = null;
     this.children = null;
+    this.authzObjs = null;
   }
 
   public byte getType() {
     return this.type;
   }
 
-  public void setType(byte type) {
+  public TPathEntry setType(byte type) {
     this.type = type;
     setTypeIsSet(true);
+    return this;
   }
 
   public void unsetType() {
@@ -212,8 +217,9 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     return this.pathElement;
   }
 
-  public void setPathElement(String pathElement) {
+  public TPathEntry setPathElement(String pathElement) {
     this.pathElement = pathElement;
+    return this;
   }
 
   public void unsetPathElement() {
@@ -231,29 +237,6 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     }
   }
 
-  public String getAuthzObj() {
-    return this.authzObj;
-  }
-
-  public void setAuthzObj(String authzObj) {
-    this.authzObj = authzObj;
-  }
-
-  public void unsetAuthzObj() {
-    this.authzObj = null;
-  }
-
-  /** Returns true if field authzObj is set (has been assigned a value) and 
false otherwise */
-  public boolean isSetAuthzObj() {
-    return this.authzObj != null;
-  }
-
-  public void setAuthzObjIsSet(boolean value) {
-    if (!value) {
-      this.authzObj = null;
-    }
-  }
-
   public int getChildrenSize() {
     return (this.children == null) ? 0 : this.children.size();
   }
@@ -273,8 +256,9 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     return this.children;
   }
 
-  public void setChildren(Set<Integer> children) {
+  public TPathEntry setChildren(Set<Integer> children) {
     this.children = children;
+    return this;
   }
 
   public void unsetChildren() {
@@ -292,6 +276,45 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     }
   }
 
+  public int getAuthzObjsSize() {
+    return (this.authzObjs == null) ? 0 : this.authzObjs.size();
+  }
+
+  public java.util.Iterator<String> getAuthzObjsIterator() {
+    return (this.authzObjs == null) ? null : this.authzObjs.iterator();
+  }
+
+  public void addToAuthzObjs(String elem) {
+    if (this.authzObjs == null) {
+      this.authzObjs = new HashSet<String>();
+    }
+    this.authzObjs.add(elem);
+  }
+
+  public Set<String> getAuthzObjs() {
+    return this.authzObjs;
+  }
+
+  public TPathEntry setAuthzObjs(Set<String> authzObjs) {
+    this.authzObjs = authzObjs;
+    return this;
+  }
+
+  public void unsetAuthzObjs() {
+    this.authzObjs = null;
+  }
+
+  /** Returns true if field authzObjs is set (has been assigned a value) and 
false otherwise */
+  public boolean isSetAuthzObjs() {
+    return this.authzObjs != null;
+  }
+
+  public void setAuthzObjsIsSet(boolean value) {
+    if (!value) {
+      this.authzObjs = null;
+    }
+  }
+
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case TYPE:
@@ -310,19 +333,19 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       }
       break;
 
-    case AUTHZ_OBJ:
+    case CHILDREN:
       if (value == null) {
-        unsetAuthzObj();
+        unsetChildren();
       } else {
-        setAuthzObj((String)value);
+        setChildren((Set<Integer>)value);
       }
       break;
 
-    case CHILDREN:
+    case AUTHZ_OBJS:
       if (value == null) {
-        unsetChildren();
+        unsetAuthzObjs();
       } else {
-        setChildren((Set<Integer>)value);
+        setAuthzObjs((Set<String>)value);
       }
       break;
 
@@ -337,12 +360,12 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
     case PATH_ELEMENT:
       return getPathElement();
 
-    case AUTHZ_OBJ:
-      return getAuthzObj();
-
     case CHILDREN:
       return getChildren();
 
+    case AUTHZ_OBJS:
+      return getAuthzObjs();
+
     }
     throw new IllegalStateException();
   }
@@ -358,10 +381,10 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       return isSetType();
     case PATH_ELEMENT:
       return isSetPathElement();
-    case AUTHZ_OBJ:
-      return isSetAuthzObj();
     case CHILDREN:
       return isSetChildren();
+    case AUTHZ_OBJS:
+      return isSetAuthzObjs();
     }
     throw new IllegalStateException();
   }
@@ -397,15 +420,6 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
         return false;
     }
 
-    boolean this_present_authzObj = true && this.isSetAuthzObj();
-    boolean that_present_authzObj = true && that.isSetAuthzObj();
-    if (this_present_authzObj || that_present_authzObj) {
-      if (!(this_present_authzObj && that_present_authzObj))
-        return false;
-      if (!this.authzObj.equals(that.authzObj))
-        return false;
-    }
-
     boolean this_present_children = true && this.isSetChildren();
     boolean that_present_children = true && that.isSetChildren();
     if (this_present_children || that_present_children) {
@@ -415,34 +429,21 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
         return false;
     }
 
+    boolean this_present_authzObjs = true && this.isSetAuthzObjs();
+    boolean that_present_authzObjs = true && that.isSetAuthzObjs();
+    if (this_present_authzObjs || that_present_authzObjs) {
+      if (!(this_present_authzObjs && that_present_authzObjs))
+        return false;
+      if (!this.authzObjs.equals(that.authzObjs))
+        return false;
+    }
+
     return true;
   }
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
-
-    boolean present_type = true;
-    builder.append(present_type);
-    if (present_type)
-      builder.append(type);
-
-    boolean present_pathElement = true && (isSetPathElement());
-    builder.append(present_pathElement);
-    if (present_pathElement)
-      builder.append(pathElement);
-
-    boolean present_authzObj = true && (isSetAuthzObj());
-    builder.append(present_authzObj);
-    if (present_authzObj)
-      builder.append(authzObj);
-
-    boolean present_children = true && (isSetChildren());
-    builder.append(present_children);
-    if (present_children)
-      builder.append(children);
-
-    return builder.toHashCode();
+    return 0;
   }
 
   public int compareTo(TPathEntry other) {
@@ -473,22 +474,22 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
         return lastComparison;
       }
     }
-    lastComparison = 
Boolean.valueOf(isSetAuthzObj()).compareTo(typedOther.isSetAuthzObj());
+    lastComparison = 
Boolean.valueOf(isSetChildren()).compareTo(typedOther.isSetChildren());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetAuthzObj()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzObj, 
typedOther.authzObj);
+    if (isSetChildren()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, 
typedOther.children);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = 
Boolean.valueOf(isSetChildren()).compareTo(typedOther.isSetChildren());
+    lastComparison = 
Boolean.valueOf(isSetAuthzObjs()).compareTo(typedOther.isSetAuthzObjs());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetChildren()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, 
typedOther.children);
+    if (isSetAuthzObjs()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authzObjs, 
typedOther.authzObjs);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -524,16 +525,6 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       sb.append(this.pathElement);
     }
     first = false;
-    if (isSetAuthzObj()) {
-      if (!first) sb.append(", ");
-      sb.append("authzObj:");
-      if (this.authzObj == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.authzObj);
-      }
-      first = false;
-    }
     if (!first) sb.append(", ");
     sb.append("children:");
     if (this.children == null) {
@@ -542,24 +533,29 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       sb.append(this.children);
     }
     first = false;
+    if (isSetAuthzObjs()) {
+      if (!first) sb.append(", ");
+      sb.append("authzObjs:");
+      if (this.authzObjs == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.authzObjs);
+      }
+      first = false;
+    }
     sb.append(")");
     return sb.toString();
   }
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetType()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'type' is unset! Struct:" + toString());
+    // alas, we cannot check 'type' because it's a primitive and you chose the 
non-beans generator.
+    if (pathElement == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'pathElement' was not present! Struct: " + toString());
     }
-
-    if (!isSetPathElement()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'pathElement' is unset! Struct:" + toString());
-    }
-
-    if (!isSetChildren()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'children' is unset! Struct:" + toString());
+    if (children == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'children' was not present! Struct: " + toString());
     }
-
     // check for sub-struct validity
   }
 
@@ -615,14 +611,6 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
             }
             break;
-          case 3: // AUTHZ_OBJ
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.authzObj = iprot.readString();
-              struct.setAuthzObjIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
-            }
-            break;
           case 4: // CHILDREN
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
@@ -641,12 +629,35 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
             }
             break;
+          case 5: // AUTHZ_OBJS
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set35 = iprot.readSetBegin();
+                struct.authzObjs = new HashSet<String>(2*_set35.size);
+                for (int _i36 = 0; _i36 < _set35.size; ++_i36)
+                {
+                  String _elem37; // required
+                  _elem37 = iprot.readString();
+                  struct.authzObjs.add(_elem37);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setAuthzObjsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
+            }
+            break;
           default:
             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, 
schemeField.type);
         }
         iprot.readFieldEnd();
       }
       iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked 
in the validate method
+      if (!struct.isSetType()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'type' was not found in serialized data! Struct: " + toString());
+      }
       struct.validate();
     }
 
@@ -662,25 +673,32 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
         oprot.writeString(struct.pathElement);
         oprot.writeFieldEnd();
       }
-      if (struct.authzObj != null) {
-        if (struct.isSetAuthzObj()) {
-          oprot.writeFieldBegin(AUTHZ_OBJ_FIELD_DESC);
-          oprot.writeString(struct.authzObj);
-          oprot.writeFieldEnd();
-        }
-      }
       if (struct.children != null) {
         oprot.writeFieldBegin(CHILDREN_FIELD_DESC);
         {
           oprot.writeSetBegin(new 
org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, 
struct.children.size()));
-          for (int _iter35 : struct.children)
+          for (int _iter38 : struct.children)
           {
-            oprot.writeI32(_iter35);
+            oprot.writeI32(_iter38);
           }
           oprot.writeSetEnd();
         }
         oprot.writeFieldEnd();
       }
+      if (struct.authzObjs != null) {
+        if (struct.isSetAuthzObjs()) {
+          oprot.writeFieldBegin(AUTHZ_OBJS_FIELD_DESC);
+          {
+            oprot.writeSetBegin(new 
org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, 
struct.authzObjs.size()));
+            for (String _iter39 : struct.authzObjs)
+            {
+              oprot.writeString(_iter39);
+            }
+            oprot.writeSetEnd();
+          }
+          oprot.writeFieldEnd();
+        }
+      }
       oprot.writeFieldStop();
       oprot.writeStructEnd();
     }
@@ -702,18 +720,24 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       oprot.writeString(struct.pathElement);
       {
         oprot.writeI32(struct.children.size());
-        for (int _iter36 : struct.children)
+        for (int _iter40 : struct.children)
         {
-          oprot.writeI32(_iter36);
+          oprot.writeI32(_iter40);
         }
       }
       BitSet optionals = new BitSet();
-      if (struct.isSetAuthzObj()) {
+      if (struct.isSetAuthzObjs()) {
         optionals.set(0);
       }
       oprot.writeBitSet(optionals, 1);
-      if (struct.isSetAuthzObj()) {
-        oprot.writeString(struct.authzObj);
+      if (struct.isSetAuthzObjs()) {
+        {
+          oprot.writeI32(struct.authzObjs.size());
+          for (String _iter41 : struct.authzObjs)
+          {
+            oprot.writeString(_iter41);
+          }
+        }
       }
     }
 
@@ -725,20 +749,29 @@ public class TPathEntry implements 
org.apache.thrift.TBase<TPathEntry, TPathEntr
       struct.pathElement = iprot.readString();
       struct.setPathElementIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set37 = new 
org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, 
iprot.readI32());
-        struct.children = new HashSet<Integer>(2*_set37.size);
-        for (int _i38 = 0; _i38 < _set37.size; ++_i38)
+        org.apache.thrift.protocol.TSet _set42 = new 
org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, 
iprot.readI32());
+        struct.children = new HashSet<Integer>(2*_set42.size);
+        for (int _i43 = 0; _i43 < _set42.size; ++_i43)
         {
-          int _elem39; // required
-          _elem39 = iprot.readI32();
-          struct.children.add(_elem39);
+          int _elem44; // required
+          _elem44 = iprot.readI32();
+          struct.children.add(_elem44);
         }
       }
       struct.setChildrenIsSet(true);
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
-        struct.authzObj = iprot.readString();
-        struct.setAuthzObjIsSet(true);
+        {
+          org.apache.thrift.protocol.TSet _set45 = new 
org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, 
iprot.readI32());
+          struct.authzObjs = new HashSet<String>(2*_set45.size);
+          for (int _i46 = 0; _i46 < _set45.size; ++_i46)
+          {
+            String _elem47; // required
+            _elem47 = iprot.readString();
+            struct.authzObjs.add(_elem47);
+          }
+        }
+        struct.setAuthzObjsIsSet(true);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsDump.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsDump.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsDump.java
index 200ecad..e599b3e 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsDump.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsDump.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -43,8 +42,8 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
     schemes.put(TupleScheme.class, new TPathsDumpTupleSchemeFactory());
   }
 
-  private int rootId; // required
-  private Map<Integer,TPathEntry> nodeMap; // required
+  public int rootId; // required
+  public Map<Integer,TPathEntry> nodeMap; // required
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -174,9 +173,10 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
     return this.rootId;
   }
 
-  public void setRootId(int rootId) {
+  public TPathsDump setRootId(int rootId) {
     this.rootId = rootId;
     setRootIdIsSet(true);
+    return this;
   }
 
   public void unsetRootId() {
@@ -207,8 +207,9 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
     return this.nodeMap;
   }
 
-  public void setNodeMap(Map<Integer,TPathEntry> nodeMap) {
+  public TPathsDump setNodeMap(Map<Integer,TPathEntry> nodeMap) {
     this.nodeMap = nodeMap;
+    return this;
   }
 
   public void unsetNodeMap() {
@@ -310,19 +311,7 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
-
-    boolean present_rootId = true;
-    builder.append(present_rootId);
-    if (present_rootId)
-      builder.append(rootId);
-
-    boolean present_nodeMap = true && (isSetNodeMap());
-    builder.append(present_nodeMap);
-    if (present_nodeMap)
-      builder.append(nodeMap);
-
-    return builder.toHashCode();
+    return 0;
   }
 
   public int compareTo(TPathsDump other) {
@@ -390,14 +379,10 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetRootId()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'rootId' is unset! Struct:" + toString());
+    // alas, we cannot check 'rootId' because it's a primitive and you chose 
the non-beans generator.
+    if (nodeMap == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'nodeMap' was not present! Struct: " + toString());
     }
-
-    if (!isSetNodeMap()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'nodeMap' is unset! Struct:" + toString());
-    }
-
     // check for sub-struct validity
   }
 
@@ -448,16 +433,16 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
           case 2: // NODE_MAP
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
-                org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin();
-                struct.nodeMap = new 
HashMap<Integer,TPathEntry>(2*_map40.size);
-                for (int _i41 = 0; _i41 < _map40.size; ++_i41)
+                org.apache.thrift.protocol.TMap _map48 = iprot.readMapBegin();
+                struct.nodeMap = new 
HashMap<Integer,TPathEntry>(2*_map48.size);
+                for (int _i49 = 0; _i49 < _map48.size; ++_i49)
                 {
-                  int _key42; // required
-                  TPathEntry _val43; // required
-                  _key42 = iprot.readI32();
-                  _val43 = new TPathEntry();
-                  _val43.read(iprot);
-                  struct.nodeMap.put(_key42, _val43);
+                  int _key50; // required
+                  TPathEntry _val51; // required
+                  _key50 = iprot.readI32();
+                  _val51 = new TPathEntry();
+                  _val51.read(iprot);
+                  struct.nodeMap.put(_key50, _val51);
                 }
                 iprot.readMapEnd();
               }
@@ -472,6 +457,11 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
         iprot.readFieldEnd();
       }
       iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked 
in the validate method
+      if (!struct.isSetRootId()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'rootId' was not found in serialized data! Struct: " + toString());
+      }
       struct.validate();
     }
 
@@ -486,10 +476,10 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
         oprot.writeFieldBegin(NODE_MAP_FIELD_DESC);
         {
           oprot.writeMapBegin(new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, 
org.apache.thrift.protocol.TType.STRUCT, struct.nodeMap.size()));
-          for (Map.Entry<Integer, TPathEntry> _iter44 : 
struct.nodeMap.entrySet())
+          for (Map.Entry<Integer, TPathEntry> _iter52 : 
struct.nodeMap.entrySet())
           {
-            oprot.writeI32(_iter44.getKey());
-            _iter44.getValue().write(oprot);
+            oprot.writeI32(_iter52.getKey());
+            _iter52.getValue().write(oprot);
           }
           oprot.writeMapEnd();
         }
@@ -515,10 +505,10 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
       oprot.writeI32(struct.rootId);
       {
         oprot.writeI32(struct.nodeMap.size());
-        for (Map.Entry<Integer, TPathEntry> _iter45 : 
struct.nodeMap.entrySet())
+        for (Map.Entry<Integer, TPathEntry> _iter53 : 
struct.nodeMap.entrySet())
         {
-          oprot.writeI32(_iter45.getKey());
-          _iter45.getValue().write(oprot);
+          oprot.writeI32(_iter53.getKey());
+          _iter53.getValue().write(oprot);
         }
       }
     }
@@ -529,16 +519,16 @@ public class TPathsDump implements 
org.apache.thrift.TBase<TPathsDump, TPathsDum
       struct.rootId = iprot.readI32();
       struct.setRootIdIsSet(true);
       {
-        org.apache.thrift.protocol.TMap _map46 = new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, 
org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.nodeMap = new HashMap<Integer,TPathEntry>(2*_map46.size);
-        for (int _i47 = 0; _i47 < _map46.size; ++_i47)
+        org.apache.thrift.protocol.TMap _map54 = new 
org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, 
org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.nodeMap = new HashMap<Integer,TPathEntry>(2*_map54.size);
+        for (int _i55 = 0; _i55 < _map54.size; ++_i55)
         {
-          int _key48; // required
-          TPathEntry _val49; // required
-          _key48 = iprot.readI32();
-          _val49 = new TPathEntry();
-          _val49.read(iprot);
-          struct.nodeMap.put(_key48, _val49);
+          int _key56; // required
+          TPathEntry _val57; // required
+          _key56 = iprot.readI32();
+          _val57 = new TPathEntry();
+          _val57.read(iprot);
+          struct.nodeMap.put(_key56, _val57);
         }
       }
       struct.setNodeMapIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/4b33ad92/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsUpdate.java
----------------------------------------------------------------------
diff --git 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsUpdate.java
 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsUpdate.java
index d0ee6b6..626ac18 100644
--- 
a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsUpdate.java
+++ 
b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPathsUpdate.java
@@ -6,7 +6,6 @@
  */
 package org.apache.sentry.hdfs.service.thrift;
 
-import org.apache.commons.lang.builder.HashCodeBuilder;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
 import org.apache.thrift.scheme.StandardScheme;
@@ -45,10 +44,10 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
     schemes.put(TupleScheme.class, new TPathsUpdateTupleSchemeFactory());
   }
 
-  private boolean hasFullImage; // required
-  private TPathsDump pathsDump; // optional
-  private long seqNum; // required
-  private List<TPathChanges> pathChanges; // required
+  public boolean hasFullImage; // required
+  public TPathsDump pathsDump; // optional
+  public long seqNum; // required
+  public List<TPathChanges> pathChanges; // required
 
   /** The set of fields this struct contains, along with convenience methods 
for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -191,9 +190,10 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
     return this.hasFullImage;
   }
 
-  public void setHasFullImage(boolean hasFullImage) {
+  public TPathsUpdate setHasFullImage(boolean hasFullImage) {
     this.hasFullImage = hasFullImage;
     setHasFullImageIsSet(true);
+    return this;
   }
 
   public void unsetHasFullImage() {
@@ -213,8 +213,9 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
     return this.pathsDump;
   }
 
-  public void setPathsDump(TPathsDump pathsDump) {
+  public TPathsUpdate setPathsDump(TPathsDump pathsDump) {
     this.pathsDump = pathsDump;
+    return this;
   }
 
   public void unsetPathsDump() {
@@ -236,9 +237,10 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
     return this.seqNum;
   }
 
-  public void setSeqNum(long seqNum) {
+  public TPathsUpdate setSeqNum(long seqNum) {
     this.seqNum = seqNum;
     setSeqNumIsSet(true);
+    return this;
   }
 
   public void unsetSeqNum() {
@@ -273,8 +275,9 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
     return this.pathChanges;
   }
 
-  public void setPathChanges(List<TPathChanges> pathChanges) {
+  public TPathsUpdate setPathChanges(List<TPathChanges> pathChanges) {
     this.pathChanges = pathChanges;
+    return this;
   }
 
   public void unsetPathChanges() {
@@ -420,29 +423,7 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
 
   @Override
   public int hashCode() {
-    HashCodeBuilder builder = new HashCodeBuilder();
-
-    boolean present_hasFullImage = true;
-    builder.append(present_hasFullImage);
-    if (present_hasFullImage)
-      builder.append(hasFullImage);
-
-    boolean present_pathsDump = true && (isSetPathsDump());
-    builder.append(present_pathsDump);
-    if (present_pathsDump)
-      builder.append(pathsDump);
-
-    boolean present_seqNum = true;
-    builder.append(present_seqNum);
-    if (present_seqNum)
-      builder.append(seqNum);
-
-    boolean present_pathChanges = true && (isSetPathChanges());
-    builder.append(present_pathChanges);
-    if (present_pathChanges)
-      builder.append(pathChanges);
-
-    return builder.toHashCode();
+    return 0;
   }
 
   public int compareTo(TPathsUpdate other) {
@@ -544,18 +525,11 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetHasFullImage()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'hasFullImage' is unset! Struct:" + toString());
-    }
-
-    if (!isSetSeqNum()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'seqNum' is unset! Struct:" + toString());
-    }
-
-    if (!isSetPathChanges()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'pathChanges' is unset! Struct:" + toString());
+    // alas, we cannot check 'hasFullImage' because it's a primitive and you 
chose the non-beans generator.
+    // alas, we cannot check 'seqNum' because it's a primitive and you chose 
the non-beans generator.
+    if (pathChanges == null) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 
'pathChanges' was not present! Struct: " + toString());
     }
-
     // check for sub-struct validity
     if (pathsDump != null) {
       pathsDump.validate();
@@ -626,14 +600,14 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
           case 4: // PATH_CHANGES
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
-                org.apache.thrift.protocol.TList _list50 = 
iprot.readListBegin();
-                struct.pathChanges = new ArrayList<TPathChanges>(_list50.size);
-                for (int _i51 = 0; _i51 < _list50.size; ++_i51)
+                org.apache.thrift.protocol.TList _list58 = 
iprot.readListBegin();
+                struct.pathChanges = new ArrayList<TPathChanges>(_list58.size);
+                for (int _i59 = 0; _i59 < _list58.size; ++_i59)
                 {
-                  TPathChanges _elem52; // required
-                  _elem52 = new TPathChanges();
-                  _elem52.read(iprot);
-                  struct.pathChanges.add(_elem52);
+                  TPathChanges _elem60; // required
+                  _elem60 = new TPathChanges();
+                  _elem60.read(iprot);
+                  struct.pathChanges.add(_elem60);
                 }
                 iprot.readListEnd();
               }
@@ -648,6 +622,14 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
         iprot.readFieldEnd();
       }
       iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked 
in the validate method
+      if (!struct.isSetHasFullImage()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'hasFullImage' was not found in serialized data! Struct: " + toString());
+      }
+      if (!struct.isSetSeqNum()) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required 
field 'seqNum' was not found in serialized data! Struct: " + toString());
+      }
       struct.validate();
     }
 
@@ -672,9 +654,9 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
         oprot.writeFieldBegin(PATH_CHANGES_FIELD_DESC);
         {
           oprot.writeListBegin(new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
struct.pathChanges.size()));
-          for (TPathChanges _iter53 : struct.pathChanges)
+          for (TPathChanges _iter61 : struct.pathChanges)
           {
-            _iter53.write(oprot);
+            _iter61.write(oprot);
           }
           oprot.writeListEnd();
         }
@@ -701,9 +683,9 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
       oprot.writeI64(struct.seqNum);
       {
         oprot.writeI32(struct.pathChanges.size());
-        for (TPathChanges _iter54 : struct.pathChanges)
+        for (TPathChanges _iter62 : struct.pathChanges)
         {
-          _iter54.write(oprot);
+          _iter62.write(oprot);
         }
       }
       BitSet optionals = new BitSet();
@@ -724,14 +706,14 @@ public class TPathsUpdate implements 
org.apache.thrift.TBase<TPathsUpdate, TPath
       struct.seqNum = iprot.readI64();
       struct.setSeqNumIsSet(true);
       {
-        org.apache.thrift.protocol.TList _list55 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
-        struct.pathChanges = new ArrayList<TPathChanges>(_list55.size);
-        for (int _i56 = 0; _i56 < _list55.size; ++_i56)
+        org.apache.thrift.protocol.TList _list63 = new 
org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, 
iprot.readI32());
+        struct.pathChanges = new ArrayList<TPathChanges>(_list63.size);
+        for (int _i64 = 0; _i64 < _list63.size; ++_i64)
         {
-          TPathChanges _elem57; // required
-          _elem57 = new TPathChanges();
-          _elem57.read(iprot);
-          struct.pathChanges.add(_elem57);
+          TPathChanges _elem65; // required
+          _elem65 = new TPathChanges();
+          _elem65.read(iprot);
+          struct.pathChanges.add(_elem65);
         }
       }
       struct.setPathChangesIsSet(true);

Reply via email to