Repository: incubator-sentry Updated Branches: refs/heads/master c330a21c4 -> bc5c43450
SENTRY-1071: Update thrift gen-file with maven plugin (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/bc5c4345 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/bc5c4345 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/bc5c4345 Branch: refs/heads/master Commit: bc5c43450dddced02e61dc61cae1960c8132cd41 Parents: c330a21 Author: Dapeng Sun <s...@apache.org> Authored: Wed Mar 16 13:14:30 2016 +0800 Committer: Colin Ma <co...@apache.org> Committed: Wed Mar 16 13:16:19 2016 +0800 ---------------------------------------------------------------------- .../hdfs/service/thrift/SentryHDFSService.java | 139 ++++++++++++------- .../service/thrift/TAuthzUpdateResponse.java | 27 ++-- .../hdfs/service/thrift/TPathChanges.java | 52 ++++--- .../sentry/hdfs/service/thrift/TPathEntry.java | 65 ++++++--- .../sentry/hdfs/service/thrift/TPathsDump.java | 40 ++++-- .../hdfs/service/thrift/TPathsUpdate.java | 68 +++++---- .../hdfs/service/thrift/TPermissionsUpdate.java | 73 ++++++---- .../hdfs/service/thrift/TPrivilegeChanges.java | 52 ++++--- .../hdfs/service/thrift/TRoleChanges.java | 52 ++++--- .../thrift/SentryGenericPolicyService.java | 12 +- .../TListSentryPrivilegesByAuthRequest.java | 34 ++--- .../TListSentryPrivilegesByAuthResponse.java | 14 +- .../service/thrift/TSentryPrivilegeMap.java | 12 +- 13 files changed, 400 insertions(+), 240 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/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 5db39a7..254f72b 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,6 +6,7 @@ */ 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; @@ -433,7 +434,7 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new handle_hms_notification_argsTupleSchemeFactory()); } - public TPathsUpdate pathsUpdate; // required + private 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 { @@ -535,9 +536,8 @@ public class SentryHDFSService { return this.pathsUpdate; } - public handle_hms_notification_args setPathsUpdate(TPathsUpdate pathsUpdate) { + public void setPathsUpdate(TPathsUpdate pathsUpdate) { this.pathsUpdate = pathsUpdate; - return this; } public void unsetPathsUpdate() { @@ -617,7 +617,14 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_pathsUpdate = true && (isSetPathsUpdate()); + builder.append(present_pathsUpdate); + if (present_pathsUpdate) + builder.append(pathsUpdate); + + return builder.toHashCode(); } public int compareTo(handle_hms_notification_args other) { @@ -726,8 +733,6 @@ 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(); } @@ -911,7 +916,9 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + return builder.toHashCode(); } public int compareTo(handle_hms_notification_result other) { @@ -991,8 +998,6 @@ 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(); } @@ -1038,7 +1043,7 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new check_hms_seq_num_argsTupleSchemeFactory()); } - public long pathSeqNum; // required + private 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 { @@ -1143,10 +1148,9 @@ public class SentryHDFSService { return this.pathSeqNum; } - public check_hms_seq_num_args setPathSeqNum(long pathSeqNum) { + public void setPathSeqNum(long pathSeqNum) { this.pathSeqNum = pathSeqNum; setPathSeqNumIsSet(true); - return this; } public void unsetPathSeqNum() { @@ -1224,7 +1228,14 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_pathSeqNum = true; + builder.append(present_pathSeqNum); + if (present_pathSeqNum) + builder.append(pathSeqNum); + + return builder.toHashCode(); } public int compareTo(check_hms_seq_num_args other) { @@ -1327,8 +1338,6 @@ 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(); } @@ -1390,7 +1399,7 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new check_hms_seq_num_resultTupleSchemeFactory()); } - public long success; // required + private 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 { @@ -1495,10 +1504,9 @@ public class SentryHDFSService { return this.success; } - public check_hms_seq_num_result setSuccess(long success) { + public void setSuccess(long success) { this.success = success; setSuccessIsSet(true); - return this; } public void unsetSuccess() { @@ -1576,7 +1584,14 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true; + builder.append(present_success); + if (present_success) + builder.append(success); + + return builder.toHashCode(); } public int compareTo(check_hms_seq_num_result other) { @@ -1679,8 +1694,6 @@ 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(); } @@ -1745,8 +1758,8 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new get_all_authz_updates_from_argsTupleSchemeFactory()); } - public long permSeqNum; // required - public long pathSeqNum; // required + private long permSeqNum; // required + private 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 { @@ -1863,10 +1876,9 @@ public class SentryHDFSService { return this.permSeqNum; } - public get_all_authz_updates_from_args setPermSeqNum(long permSeqNum) { + public void setPermSeqNum(long permSeqNum) { this.permSeqNum = permSeqNum; setPermSeqNumIsSet(true); - return this; } public void unsetPermSeqNum() { @@ -1886,10 +1898,9 @@ public class SentryHDFSService { return this.pathSeqNum; } - public get_all_authz_updates_from_args setPathSeqNum(long pathSeqNum) { + public void setPathSeqNum(long pathSeqNum) { this.pathSeqNum = pathSeqNum; setPathSeqNumIsSet(true); - return this; } public void unsetPathSeqNum() { @@ -1989,7 +2000,19 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + 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(); } public int compareTo(get_all_authz_updates_from_args other) { @@ -2114,8 +2137,6 @@ 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(); } @@ -2190,7 +2211,7 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new get_all_authz_updates_from_resultTupleSchemeFactory()); } - public TAuthzUpdateResponse success; // required + private 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 { @@ -2292,9 +2313,8 @@ public class SentryHDFSService { return this.success; } - public get_all_authz_updates_from_result setSuccess(TAuthzUpdateResponse success) { + public void setSuccess(TAuthzUpdateResponse success) { this.success = success; - return this; } public void unsetSuccess() { @@ -2374,7 +2394,14 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + return builder.toHashCode(); } public int compareTo(get_all_authz_updates_from_result other) { @@ -2483,8 +2510,6 @@ 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(); } @@ -2550,8 +2575,8 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new get_all_related_paths_argsTupleSchemeFactory()); } - public String path; // required - public boolean exactMatch; // required + private String path; // required + private 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 { @@ -2667,9 +2692,8 @@ public class SentryHDFSService { return this.path; } - public get_all_related_paths_args setPath(String path) { + public void setPath(String path) { this.path = path; - return this; } public void unsetPath() { @@ -2691,10 +2715,9 @@ public class SentryHDFSService { return this.exactMatch; } - public get_all_related_paths_args setExactMatch(boolean exactMatch) { + public void setExactMatch(boolean exactMatch) { this.exactMatch = exactMatch; setExactMatchIsSet(true); - return this; } public void unsetExactMatch() { @@ -2794,7 +2817,19 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + 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(); } public int compareTo(get_all_related_paths_args other) { @@ -2923,8 +2958,6 @@ 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(); } @@ -3001,7 +3034,7 @@ public class SentryHDFSService { schemes.put(TupleScheme.class, new get_all_related_paths_resultTupleSchemeFactory()); } - public Map<String,List<String>> success; // required + private 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 { @@ -3132,9 +3165,8 @@ public class SentryHDFSService { return this.success; } - public get_all_related_paths_result setSuccess(Map<String,List<String>> success) { + public void setSuccess(Map<String,List<String>> success) { this.success = success; - return this; } public void unsetSuccess() { @@ -3214,7 +3246,14 @@ public class SentryHDFSService { @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_success = true && (isSetSuccess()); + builder.append(present_success); + if (present_success) + builder.append(success); + + return builder.toHashCode(); } public int compareTo(get_all_related_paths_result other) { @@ -3341,8 +3380,6 @@ 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/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 e42d710..ec1d2af 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,6 +6,7 @@ */ 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; @@ -42,8 +43,8 @@ public class TAuthzUpdateResponse implements org.apache.thrift.TBase<TAuthzUpdat schemes.put(TupleScheme.class, new TAuthzUpdateResponseTupleSchemeFactory()); } - public List<TPathsUpdate> authzPathUpdate; // optional - public List<TPermissionsUpdate> authzPermUpdate; // optional + private List<TPathsUpdate> authzPathUpdate; // optional + private 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 { @@ -173,9 +174,8 @@ public class TAuthzUpdateResponse implements org.apache.thrift.TBase<TAuthzUpdat return this.authzPathUpdate; } - public TAuthzUpdateResponse setAuthzPathUpdate(List<TPathsUpdate> authzPathUpdate) { + public void setAuthzPathUpdate(List<TPathsUpdate> authzPathUpdate) { this.authzPathUpdate = authzPathUpdate; - return this; } public void unsetAuthzPathUpdate() { @@ -212,9 +212,8 @@ public class TAuthzUpdateResponse implements org.apache.thrift.TBase<TAuthzUpdat return this.authzPermUpdate; } - public TAuthzUpdateResponse setAuthzPermUpdate(List<TPermissionsUpdate> authzPermUpdate) { + public void setAuthzPermUpdate(List<TPermissionsUpdate> authzPermUpdate) { this.authzPermUpdate = authzPermUpdate; - return this; } public void unsetAuthzPermUpdate() { @@ -316,7 +315,19 @@ public class TAuthzUpdateResponse implements org.apache.thrift.TBase<TAuthzUpdat @Override public int hashCode() { - return 0; + 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(); } public int compareTo(TAuthzUpdateResponse other) { @@ -473,8 +484,6 @@ 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/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 148c30d..85254d7 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,6 +6,7 @@ */ 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,9 +44,9 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath schemes.put(TupleScheme.class, new TPathChangesTupleSchemeFactory()); } - public String authzObj; // required - public List<List<String>> addPaths; // required - public List<List<String>> delPaths; // required + private String authzObj; // required + private List<List<String>> addPaths; // required + private 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 { @@ -189,9 +190,8 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath return this.authzObj; } - public TPathChanges setAuthzObj(String authzObj) { + public void setAuthzObj(String authzObj) { this.authzObj = authzObj; - return this; } public void unsetAuthzObj() { @@ -228,9 +228,8 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath return this.addPaths; } - public TPathChanges setAddPaths(List<List<String>> addPaths) { + public void setAddPaths(List<List<String>> addPaths) { this.addPaths = addPaths; - return this; } public void unsetAddPaths() { @@ -267,9 +266,8 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath return this.delPaths; } - public TPathChanges setDelPaths(List<List<String>> delPaths) { + public void setDelPaths(List<List<String>> delPaths) { this.delPaths = delPaths; - return this; } public void unsetDelPaths() { @@ -393,7 +391,24 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath @Override public int hashCode() { - return 0; + 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(); } public int compareTo(TPathChanges other) { @@ -483,15 +498,18 @@ public class TPathChanges implements org.apache.thrift.TBase<TPathChanges, TPath public void validate() throws org.apache.thrift.TException { // check for required fields - if (authzObj == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' was not present! Struct: " + toString()); + if (!isSetAuthzObj()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' is unset! Struct:" + toString()); } - if (addPaths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPaths' was not present! Struct: " + toString()); + + if (!isSetAddPaths()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPaths' is unset! Struct:" + toString()); } - if (delPaths == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPaths' was not present! Struct: " + toString()); + + if (!isSetDelPaths()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPaths' is unset! Struct:" + toString()); } + // check for sub-struct validity } @@ -599,8 +617,6 @@ 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/bc5c4345/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 35c059d..3e03130 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,6 +6,7 @@ */ 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,10 +45,10 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr schemes.put(TupleScheme.class, new TPathEntryTupleSchemeFactory()); } - public byte type; // required - public String pathElement; // required - public Set<Integer> children; // required - public Set<String> authzObjs; // optional + private byte type; // required + private String pathElement; // required + private Set<Integer> children; // required + private 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 { @@ -194,10 +195,9 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr return this.type; } - public TPathEntry setType(byte type) { + public void setType(byte type) { this.type = type; setTypeIsSet(true); - return this; } public void unsetType() { @@ -217,9 +217,8 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr return this.pathElement; } - public TPathEntry setPathElement(String pathElement) { + public void setPathElement(String pathElement) { this.pathElement = pathElement; - return this; } public void unsetPathElement() { @@ -256,9 +255,8 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr return this.children; } - public TPathEntry setChildren(Set<Integer> children) { + public void setChildren(Set<Integer> children) { this.children = children; - return this; } public void unsetChildren() { @@ -295,9 +293,8 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr return this.authzObjs; } - public TPathEntry setAuthzObjs(Set<String> authzObjs) { + public void setAuthzObjs(Set<String> authzObjs) { this.authzObjs = authzObjs; - return this; } public void unsetAuthzObjs() { @@ -443,7 +440,29 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr @Override public int hashCode() { - return 0; + 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_children = true && (isSetChildren()); + builder.append(present_children); + if (present_children) + builder.append(children); + + boolean present_authzObjs = true && (isSetAuthzObjs()); + builder.append(present_authzObjs); + if (present_authzObjs) + builder.append(authzObjs); + + return builder.toHashCode(); } public int compareTo(TPathEntry other) { @@ -549,13 +568,18 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr public void validate() throws org.apache.thrift.TException { // check for required fields - // 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 (!isSetType()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString()); } - if (children == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'children' 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()); } + // check for sub-struct validity } @@ -653,11 +677,6 @@ public class TPathEntry implements org.apache.thrift.TBase<TPathEntry, TPathEntr 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/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 e599b3e..caf9ad1 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,6 +6,7 @@ */ 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; @@ -42,8 +43,8 @@ public class TPathsDump implements org.apache.thrift.TBase<TPathsDump, TPathsDum schemes.put(TupleScheme.class, new TPathsDumpTupleSchemeFactory()); } - public int rootId; // required - public Map<Integer,TPathEntry> nodeMap; // required + private int rootId; // required + private 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 { @@ -173,10 +174,9 @@ public class TPathsDump implements org.apache.thrift.TBase<TPathsDump, TPathsDum return this.rootId; } - public TPathsDump setRootId(int rootId) { + public void setRootId(int rootId) { this.rootId = rootId; setRootIdIsSet(true); - return this; } public void unsetRootId() { @@ -207,9 +207,8 @@ public class TPathsDump implements org.apache.thrift.TBase<TPathsDump, TPathsDum return this.nodeMap; } - public TPathsDump setNodeMap(Map<Integer,TPathEntry> nodeMap) { + public void setNodeMap(Map<Integer,TPathEntry> nodeMap) { this.nodeMap = nodeMap; - return this; } public void unsetNodeMap() { @@ -311,7 +310,19 @@ public class TPathsDump implements org.apache.thrift.TBase<TPathsDump, TPathsDum @Override public int hashCode() { - return 0; + 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(); } public int compareTo(TPathsDump other) { @@ -379,10 +390,14 @@ public class TPathsDump implements org.apache.thrift.TBase<TPathsDump, TPathsDum public void validate() throws org.apache.thrift.TException { // check for required fields - // 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 (!isSetRootId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'rootId' is unset! Struct:" + toString()); } + + if (!isSetNodeMap()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeMap' is unset! Struct:" + toString()); + } + // check for sub-struct validity } @@ -457,11 +472,6 @@ 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/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 626ac18..f52b4ff 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,6 +6,7 @@ */ 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,10 +45,10 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath schemes.put(TupleScheme.class, new TPathsUpdateTupleSchemeFactory()); } - public boolean hasFullImage; // required - public TPathsDump pathsDump; // optional - public long seqNum; // required - public List<TPathChanges> pathChanges; // required + private boolean hasFullImage; // required + private TPathsDump pathsDump; // optional + private long seqNum; // required + private 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 { @@ -190,10 +191,9 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath return this.hasFullImage; } - public TPathsUpdate setHasFullImage(boolean hasFullImage) { + public void setHasFullImage(boolean hasFullImage) { this.hasFullImage = hasFullImage; setHasFullImageIsSet(true); - return this; } public void unsetHasFullImage() { @@ -213,9 +213,8 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath return this.pathsDump; } - public TPathsUpdate setPathsDump(TPathsDump pathsDump) { + public void setPathsDump(TPathsDump pathsDump) { this.pathsDump = pathsDump; - return this; } public void unsetPathsDump() { @@ -237,10 +236,9 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath return this.seqNum; } - public TPathsUpdate setSeqNum(long seqNum) { + public void setSeqNum(long seqNum) { this.seqNum = seqNum; setSeqNumIsSet(true); - return this; } public void unsetSeqNum() { @@ -275,9 +273,8 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath return this.pathChanges; } - public TPathsUpdate setPathChanges(List<TPathChanges> pathChanges) { + public void setPathChanges(List<TPathChanges> pathChanges) { this.pathChanges = pathChanges; - return this; } public void unsetPathChanges() { @@ -423,7 +420,29 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath @Override public int hashCode() { - return 0; + 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(); } public int compareTo(TPathsUpdate other) { @@ -525,11 +544,18 @@ public class TPathsUpdate implements org.apache.thrift.TBase<TPathsUpdate, TPath public void validate() throws org.apache.thrift.TException { // check for required fields - // 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()); + 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()); } + // check for sub-struct validity if (pathsDump != null) { pathsDump.validate(); @@ -622,14 +648,6 @@ 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPermissionsUpdate.java ---------------------------------------------------------------------- diff --git a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPermissionsUpdate.java b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPermissionsUpdate.java index f2fefda..bfb6cbc 100644 --- a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPermissionsUpdate.java +++ b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPermissionsUpdate.java @@ -6,6 +6,7 @@ */ 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,10 +45,10 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU schemes.put(TupleScheme.class, new TPermissionsUpdateTupleSchemeFactory()); } - public boolean hasfullImage; // required - public long seqNum; // required - public Map<String,TPrivilegeChanges> privilegeChanges; // required - public Map<String,TRoleChanges> roleChanges; // required + private boolean hasfullImage; // required + private long seqNum; // required + private Map<String,TPrivilegeChanges> privilegeChanges; // required + private Map<String,TRoleChanges> roleChanges; // 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 { @@ -214,10 +215,9 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU return this.hasfullImage; } - public TPermissionsUpdate setHasfullImage(boolean hasfullImage) { + public void setHasfullImage(boolean hasfullImage) { this.hasfullImage = hasfullImage; setHasfullImageIsSet(true); - return this; } public void unsetHasfullImage() { @@ -237,10 +237,9 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU return this.seqNum; } - public TPermissionsUpdate setSeqNum(long seqNum) { + public void setSeqNum(long seqNum) { this.seqNum = seqNum; setSeqNumIsSet(true); - return this; } public void unsetSeqNum() { @@ -271,9 +270,8 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU return this.privilegeChanges; } - public TPermissionsUpdate setPrivilegeChanges(Map<String,TPrivilegeChanges> privilegeChanges) { + public void setPrivilegeChanges(Map<String,TPrivilegeChanges> privilegeChanges) { this.privilegeChanges = privilegeChanges; - return this; } public void unsetPrivilegeChanges() { @@ -306,9 +304,8 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU return this.roleChanges; } - public TPermissionsUpdate setRoleChanges(Map<String,TRoleChanges> roleChanges) { + public void setRoleChanges(Map<String,TRoleChanges> roleChanges) { this.roleChanges = roleChanges; - return this; } public void unsetRoleChanges() { @@ -454,7 +451,29 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_hasfullImage = true; + builder.append(present_hasfullImage); + if (present_hasfullImage) + builder.append(hasfullImage); + + boolean present_seqNum = true; + builder.append(present_seqNum); + if (present_seqNum) + builder.append(seqNum); + + boolean present_privilegeChanges = true && (isSetPrivilegeChanges()); + builder.append(present_privilegeChanges); + if (present_privilegeChanges) + builder.append(privilegeChanges); + + boolean present_roleChanges = true && (isSetRoleChanges()); + builder.append(present_roleChanges); + if (present_roleChanges) + builder.append(roleChanges); + + return builder.toHashCode(); } public int compareTo(TPermissionsUpdate other) { @@ -554,14 +573,22 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU public void validate() throws org.apache.thrift.TException { // check for required fields - // 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 (privilegeChanges == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'privilegeChanges' was not present! Struct: " + toString()); + if (!isSetHasfullImage()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasfullImage' is unset! Struct:" + toString()); } - if (roleChanges == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleChanges' was not present! Struct: " + toString()); + + if (!isSetSeqNum()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'seqNum' is unset! Struct:" + toString()); } + + if (!isSetPrivilegeChanges()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'privilegeChanges' is unset! Struct:" + toString()); + } + + if (!isSetRoleChanges()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleChanges' is unset! Struct:" + toString()); + } + // check for sub-struct validity } @@ -665,14 +692,6 @@ public class TPermissionsUpdate implements org.apache.thrift.TBase<TPermissionsU 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(); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPrivilegeChanges.java ---------------------------------------------------------------------- diff --git a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPrivilegeChanges.java b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPrivilegeChanges.java index 8aab38c..dc4626e 100644 --- a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPrivilegeChanges.java +++ b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TPrivilegeChanges.java @@ -6,6 +6,7 @@ */ 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,9 +44,9 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan schemes.put(TupleScheme.class, new TPrivilegeChangesTupleSchemeFactory()); } - public String authzObj; // required - public Map<String,String> addPrivileges; // required - public Map<String,String> delPrivileges; // required + private String authzObj; // required + private Map<String,String> addPrivileges; // required + private Map<String,String> delPrivileges; // 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 { @@ -197,9 +198,8 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan return this.authzObj; } - public TPrivilegeChanges setAuthzObj(String authzObj) { + public void setAuthzObj(String authzObj) { this.authzObj = authzObj; - return this; } public void unsetAuthzObj() { @@ -232,9 +232,8 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan return this.addPrivileges; } - public TPrivilegeChanges setAddPrivileges(Map<String,String> addPrivileges) { + public void setAddPrivileges(Map<String,String> addPrivileges) { this.addPrivileges = addPrivileges; - return this; } public void unsetAddPrivileges() { @@ -267,9 +266,8 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan return this.delPrivileges; } - public TPrivilegeChanges setDelPrivileges(Map<String,String> delPrivileges) { + public void setDelPrivileges(Map<String,String> delPrivileges) { this.delPrivileges = delPrivileges; - return this; } public void unsetDelPrivileges() { @@ -393,7 +391,24 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_authzObj = true && (isSetAuthzObj()); + builder.append(present_authzObj); + if (present_authzObj) + builder.append(authzObj); + + boolean present_addPrivileges = true && (isSetAddPrivileges()); + builder.append(present_addPrivileges); + if (present_addPrivileges) + builder.append(addPrivileges); + + boolean present_delPrivileges = true && (isSetDelPrivileges()); + builder.append(present_delPrivileges); + if (present_delPrivileges) + builder.append(delPrivileges); + + return builder.toHashCode(); } public int compareTo(TPrivilegeChanges other) { @@ -483,15 +498,18 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan public void validate() throws org.apache.thrift.TException { // check for required fields - if (authzObj == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' was not present! Struct: " + toString()); + if (!isSetAuthzObj()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'authzObj' is unset! Struct:" + toString()); } - if (addPrivileges == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPrivileges' was not present! Struct: " + toString()); + + if (!isSetAddPrivileges()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'addPrivileges' is unset! Struct:" + toString()); } - if (delPrivileges == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPrivileges' was not present! Struct: " + toString()); + + if (!isSetDelPrivileges()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'delPrivileges' is unset! Struct:" + toString()); } + // check for sub-struct validity } @@ -583,8 +601,6 @@ public class TPrivilegeChanges implements org.apache.thrift.TBase<TPrivilegeChan 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/bc5c4345/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TRoleChanges.java ---------------------------------------------------------------------- diff --git a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TRoleChanges.java b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TRoleChanges.java index 41ede03..7920872 100644 --- a/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TRoleChanges.java +++ b/sentry-hdfs/sentry-hdfs-common/src/gen/thrift/gen-javabean/org/apache/sentry/hdfs/service/thrift/TRoleChanges.java @@ -6,6 +6,7 @@ */ 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,9 +44,9 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole schemes.put(TupleScheme.class, new TRoleChangesTupleSchemeFactory()); } - public String role; // required - public List<String> addGroups; // required - public List<String> delGroups; // required + private String role; // required + private List<String> addGroups; // required + private List<String> delGroups; // 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 { @@ -179,9 +180,8 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole return this.role; } - public TRoleChanges setRole(String role) { + public void setRole(String role) { this.role = role; - return this; } public void unsetRole() { @@ -218,9 +218,8 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole return this.addGroups; } - public TRoleChanges setAddGroups(List<String> addGroups) { + public void setAddGroups(List<String> addGroups) { this.addGroups = addGroups; - return this; } public void unsetAddGroups() { @@ -257,9 +256,8 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole return this.delGroups; } - public TRoleChanges setDelGroups(List<String> delGroups) { + public void setDelGroups(List<String> delGroups) { this.delGroups = delGroups; - return this; } public void unsetDelGroups() { @@ -383,7 +381,24 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole @Override public int hashCode() { - return 0; + HashCodeBuilder builder = new HashCodeBuilder(); + + boolean present_role = true && (isSetRole()); + builder.append(present_role); + if (present_role) + builder.append(role); + + boolean present_addGroups = true && (isSetAddGroups()); + builder.append(present_addGroups); + if (present_addGroups) + builder.append(addGroups); + + boolean present_delGroups = true && (isSetDelGroups()); + builder.append(present_delGroups); + if (present_delGroups) + builder.append(delGroups); + + return builder.toHashCode(); } public int compareTo(TRoleChanges other) { @@ -473,15 +488,18 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole public void validate() throws org.apache.thrift.TException { // check for required fields - if (role == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'role' was not present! Struct: " + toString()); + if (!isSetRole()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'role' is unset! Struct:" + toString()); } - if (addGroups == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'addGroups' was not present! Struct: " + toString()); + + if (!isSetAddGroups()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'addGroups' is unset! Struct:" + toString()); } - if (delGroups == null) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'delGroups' was not present! Struct: " + toString()); + + if (!isSetDelGroups()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'delGroups' is unset! Struct:" + toString()); } + // check for sub-struct validity } @@ -569,8 +587,6 @@ public class TRoleChanges implements org.apache.thrift.TBase<TRoleChanges, TRole 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/bc5c4345/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyService.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyService.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyService.java index 6a40f57..5090fca 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyService.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/SentryGenericPolicyService.java @@ -7666,7 +7666,7 @@ public class SentryGenericPolicyService { 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); - tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesByAuthRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_authorizable_args.class, metaDataMap); @@ -7882,7 +7882,7 @@ public class SentryGenericPolicyService { while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -7891,7 +7891,7 @@ public class SentryGenericPolicyService { struct.request = new TListSentryPrivilegesByAuthRequest(); struct.request.read(iprot); struct.setRequestIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -8029,7 +8029,7 @@ public class SentryGenericPolicyService { 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); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TListSentryPrivilegesByAuthResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(list_sentry_privileges_by_authorizable_result.class, metaDataMap); @@ -8245,7 +8245,7 @@ public class SentryGenericPolicyService { while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -8254,7 +8254,7 @@ public class SentryGenericPolicyService { struct.success = new TListSentryPrivilegesByAuthResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthRequest.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthRequest.java index 3d328ab..7a341e4 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthRequest.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthRequest.java @@ -139,21 +139,21 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa 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); - tmpMap.put(_Fields.PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("protocol_version", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("protocol_version", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.COMPONENT, new org.apache.thrift.meta_data.FieldMetaData("component", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("serviceName", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("serviceName", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.AUTHORIZABLES_SET, new org.apache.thrift.meta_data.FieldMetaData("authorizablesSet", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.AUTHORIZABLES_SET, new org.apache.thrift.meta_data.FieldMetaData("authorizablesSet", 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.STRING)))); - tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", 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)))); - tmpMap.put(_Fields.ROLE_SET, new org.apache.thrift.meta_data.FieldMetaData("roleSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.ROLE_SET, new org.apache.thrift.meta_data.FieldMetaData("roleSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryActiveRoleSet.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TListSentryPrivilegesByAuthRequest.class, metaDataMap); @@ -871,7 +871,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -879,7 +879,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.protocol_version = iprot.readI32(); struct.setProtocol_versionIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -887,7 +887,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.requestorUserName = iprot.readString(); struct.setRequestorUserNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -895,7 +895,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.component = iprot.readString(); struct.setComponentIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -903,7 +903,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.serviceName = iprot.readString(); struct.setServiceNameIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -921,7 +921,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa iprot.readSetEnd(); } struct.setAuthorizablesSetIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -939,7 +939,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa iprot.readSetEnd(); } struct.setGroupsIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -948,7 +948,7 @@ public class TListSentryPrivilegesByAuthRequest implements org.apache.thrift.TBa struct.roleSet = new TSentryActiveRoleSet(); struct.roleSet.read(iprot); struct.setRoleSetIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthResponse.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthResponse.java index e1b8a78..5309da1 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthResponse.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TListSentryPrivilegesByAuthResponse.java @@ -112,11 +112,11 @@ public class TListSentryPrivilegesByAuthResponse implements org.apache.thrift.TB 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); - tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.sentry.service.thrift.TSentryResponseStatus.class))); - tmpMap.put(_Fields.PRIVILEGES_MAP_BY_AUTH, new org.apache.thrift.meta_data.FieldMetaData("privilegesMapByAuth", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + tmpMap.put(_Fields.PRIVILEGES_MAP_BY_AUTH, new org.apache.thrift.meta_data.FieldMetaData("privilegesMapByAuth", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilegeMap.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TListSentryPrivilegesByAuthResponse.class, metaDataMap); @@ -433,7 +433,7 @@ public class TListSentryPrivilegesByAuthResponse implements org.apache.thrift.TB while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -442,7 +442,7 @@ public class TListSentryPrivilegesByAuthResponse implements org.apache.thrift.TB struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -463,7 +463,7 @@ public class TListSentryPrivilegesByAuthResponse implements org.apache.thrift.TB iprot.readMapEnd(); } struct.setPrivilegesMapByAuthIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/bc5c4345/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TSentryPrivilegeMap.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TSentryPrivilegeMap.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TSentryPrivilegeMap.java index 97b96ef..a2945a2 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TSentryPrivilegeMap.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/generic/service/thrift/TSentryPrivilegeMap.java @@ -106,10 +106,10 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi 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); - tmpMap.put(_Fields.PRIVILEGE_MAP, new org.apache.thrift.meta_data.FieldMetaData("privilegeMap", org.apache.thrift.TFieldRequirementType.REQUIRED, - new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), - new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.PRIVILEGE_MAP, new org.apache.thrift.meta_data.FieldMetaData("privilegeMap", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilege.class))))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSentryPrivilegeMap.class, metaDataMap); @@ -352,7 +352,7 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi while (true) { schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { @@ -383,7 +383,7 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi iprot.readMapEnd(); } struct.setPrivilegeMapIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break;