Repository: sentry Updated Branches: refs/heads/master 42744cc97 -> e67bde0da
http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryGroup.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryGroup.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryGroup.java index 4aadd22..991a79a 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryGroup.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryGroup.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryGroup implements org.apache.thrift.TBase<TSentryGroup, TSentryGroup._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryGroup implements org.apache.thrift.TBase<TSentryGroup, TSentryGroup._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryGroup> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryGroup"); private static final org.apache.thrift.protocol.TField GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("groupName", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -225,30 +229,30 @@ public class TSentryGroup implements org.apache.thrift.TBase<TSentryGroup, TSent @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_groupName = true && (isSetGroupName()); - builder.append(present_groupName); + list.add(present_groupName); if (present_groupName) - builder.append(groupName); + list.add(groupName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryGroup other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryGroup typedOther = (TSentryGroup)other; - lastComparison = Boolean.valueOf(isSetGroupName()).compareTo(typedOther.isSetGroupName()); + lastComparison = Boolean.valueOf(isSetGroupName()).compareTo(other.isSetGroupName()); if (lastComparison != 0) { return lastComparison; } if (isSetGroupName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupName, typedOther.groupName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupName, other.groupName); if (lastComparison != 0) { return lastComparison; } http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataRequest.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataRequest.java index 23ad56c..c8295f4 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataRequest.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataRequest.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryImportMappingDataRequest implements org.apache.thrift.TBase<TSentryImportMappingDataRequest, TSentryImportMappingDataRequest._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryImportMappingDataRequest implements org.apache.thrift.TBase<TSentryImportMappingDataRequest, TSentryImportMappingDataRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryImportMappingDataRequest> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryImportMappingDataRequest"); private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)1); @@ -317,13 +321,13 @@ public class TSentryImportMappingDataRequest implements org.apache.thrift.TBase< public Object getFieldValue(_Fields field) { switch (field) { case PROTOCOL_VERSION: - return Integer.valueOf(getProtocol_version()); + return getProtocol_version(); case REQUESTOR_USER_NAME: return getRequestorUserName(); case OVERWRITE_ROLE: - return Boolean.valueOf(isOverwriteRole()); + return isOverwriteRole(); case MAPPING_DATA: return getMappingData(); @@ -405,75 +409,75 @@ public class TSentryImportMappingDataRequest implements org.apache.thrift.TBase< @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_protocol_version = true; - builder.append(present_protocol_version); + list.add(present_protocol_version); if (present_protocol_version) - builder.append(protocol_version); + list.add(protocol_version); boolean present_requestorUserName = true && (isSetRequestorUserName()); - builder.append(present_requestorUserName); + list.add(present_requestorUserName); if (present_requestorUserName) - builder.append(requestorUserName); + list.add(requestorUserName); boolean present_overwriteRole = true; - builder.append(present_overwriteRole); + list.add(present_overwriteRole); if (present_overwriteRole) - builder.append(overwriteRole); + list.add(overwriteRole); boolean present_mappingData = true && (isSetMappingData()); - builder.append(present_mappingData); + list.add(present_mappingData); if (present_mappingData) - builder.append(mappingData); + list.add(mappingData); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryImportMappingDataRequest other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryImportMappingDataRequest typedOther = (TSentryImportMappingDataRequest)other; - lastComparison = Boolean.valueOf(isSetProtocol_version()).compareTo(typedOther.isSetProtocol_version()); + lastComparison = Boolean.valueOf(isSetProtocol_version()).compareTo(other.isSetProtocol_version()); if (lastComparison != 0) { return lastComparison; } if (isSetProtocol_version()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol_version, typedOther.protocol_version); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.protocol_version, other.protocol_version); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRequestorUserName()).compareTo(typedOther.isSetRequestorUserName()); + lastComparison = Boolean.valueOf(isSetRequestorUserName()).compareTo(other.isSetRequestorUserName()); if (lastComparison != 0) { return lastComparison; } if (isSetRequestorUserName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorUserName, typedOther.requestorUserName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorUserName, other.requestorUserName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOverwriteRole()).compareTo(typedOther.isSetOverwriteRole()); + lastComparison = Boolean.valueOf(isSetOverwriteRole()).compareTo(other.isSetOverwriteRole()); if (lastComparison != 0) { return lastComparison; } if (isSetOverwriteRole()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overwriteRole, typedOther.overwriteRole); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.overwriteRole, other.overwriteRole); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMappingData()).compareTo(typedOther.isSetMappingData()); + lastComparison = Boolean.valueOf(isSetMappingData()).compareTo(other.isSetMappingData()); if (lastComparison != 0) { return lastComparison; } if (isSetMappingData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mappingData, typedOther.mappingData); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mappingData, other.mappingData); if (lastComparison != 0) { return lastComparison; } http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataResponse.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataResponse.java index 8276fcf..1d38202 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataResponse.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryImportMappingDataResponse.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryImportMappingDataResponse implements org.apache.thrift.TBase<TSentryImportMappingDataResponse, TSentryImportMappingDataResponse._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryImportMappingDataResponse implements org.apache.thrift.TBase<TSentryImportMappingDataResponse, TSentryImportMappingDataResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryImportMappingDataResponse> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryImportMappingDataResponse"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -225,30 +229,30 @@ public class TSentryImportMappingDataResponse implements org.apache.thrift.TBase @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_status = true && (isSetStatus()); - builder.append(present_status); + list.add(present_status); if (present_status) - builder.append(status); + list.add(status); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryImportMappingDataResponse other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryImportMappingDataResponse typedOther = (TSentryImportMappingDataResponse)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); if (lastComparison != 0) { return lastComparison; } http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryMappingData.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryMappingData.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryMappingData.java index c4137d6..2c091cb 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryMappingData.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryMappingData.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappingData, TSentryMappingData._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappingData, TSentryMappingData._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryMappingData> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryMappingData"); private static final org.apache.thrift.protocol.TField GROUP_ROLES_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("groupRolesMap", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -113,24 +117,24 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin } // isset id assignments - private _Fields optionals[] = {_Fields.GROUP_ROLES_MAP,_Fields.ROLE_PRIVILEGES_MAP,_Fields.USER_ROLES_MAP}; + private static final _Fields optionals[] = {_Fields.GROUP_ROLES_MAP,_Fields.ROLE_PRIVILEGES_MAP,_Fields.USER_ROLES_MAP}; 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.GROUP_ROLES_MAP, new org.apache.thrift.meta_data.FieldMetaData("groupRolesMap", 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.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.GROUP_ROLES_MAP, new org.apache.thrift.meta_data.FieldMetaData("groupRolesMap", 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.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))))); - tmpMap.put(_Fields.ROLE_PRIVILEGES_MAP, new org.apache.thrift.meta_data.FieldMetaData("rolePrivilegesMap", 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.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.ROLE_PRIVILEGES_MAP, new org.apache.thrift.meta_data.FieldMetaData("rolePrivilegesMap", 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.SetMetaData(org.apache.thrift.protocol.TType.SET, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilege.class))))); - tmpMap.put(_Fields.USER_ROLES_MAP, new org.apache.thrift.meta_data.FieldMetaData("userRolesMap", 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.SetMetaData(org.apache.thrift.protocol.TType.SET, + tmpMap.put(_Fields.USER_ROLES_MAP, new org.apache.thrift.meta_data.FieldMetaData("userRolesMap", 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.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(TSentryMappingData.class, metaDataMap); @@ -144,7 +148,7 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin */ public TSentryMappingData(TSentryMappingData other) { if (other.isSetGroupRolesMap()) { - Map<String,Set<String>> __this__groupRolesMap = new HashMap<String,Set<String>>(); + Map<String,Set<String>> __this__groupRolesMap = new HashMap<String,Set<String>>(other.groupRolesMap.size()); for (Map.Entry<String, Set<String>> other_element : other.groupRolesMap.entrySet()) { String other_element_key = other_element.getKey(); @@ -152,17 +156,14 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin String __this__groupRolesMap_copy_key = other_element_key; - Set<String> __this__groupRolesMap_copy_value = new HashSet<String>(); - for (String other_element_value_element : other_element_value) { - __this__groupRolesMap_copy_value.add(other_element_value_element); - } + Set<String> __this__groupRolesMap_copy_value = new HashSet<String>(other_element_value); __this__groupRolesMap.put(__this__groupRolesMap_copy_key, __this__groupRolesMap_copy_value); } this.groupRolesMap = __this__groupRolesMap; } if (other.isSetRolePrivilegesMap()) { - Map<String,Set<TSentryPrivilege>> __this__rolePrivilegesMap = new HashMap<String,Set<TSentryPrivilege>>(); + Map<String,Set<TSentryPrivilege>> __this__rolePrivilegesMap = new HashMap<String,Set<TSentryPrivilege>>(other.rolePrivilegesMap.size()); for (Map.Entry<String, Set<TSentryPrivilege>> other_element : other.rolePrivilegesMap.entrySet()) { String other_element_key = other_element.getKey(); @@ -170,7 +171,7 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin String __this__rolePrivilegesMap_copy_key = other_element_key; - Set<TSentryPrivilege> __this__rolePrivilegesMap_copy_value = new HashSet<TSentryPrivilege>(); + Set<TSentryPrivilege> __this__rolePrivilegesMap_copy_value = new HashSet<TSentryPrivilege>(other_element_value.size()); for (TSentryPrivilege other_element_value_element : other_element_value) { __this__rolePrivilegesMap_copy_value.add(new TSentryPrivilege(other_element_value_element)); } @@ -180,7 +181,7 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin this.rolePrivilegesMap = __this__rolePrivilegesMap; } if (other.isSetUserRolesMap()) { - Map<String,Set<String>> __this__userRolesMap = new HashMap<String,Set<String>>(); + Map<String,Set<String>> __this__userRolesMap = new HashMap<String,Set<String>>(other.userRolesMap.size()); for (Map.Entry<String, Set<String>> other_element : other.userRolesMap.entrySet()) { String other_element_key = other_element.getKey(); @@ -188,10 +189,7 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin String __this__userRolesMap_copy_key = other_element_key; - Set<String> __this__userRolesMap_copy_value = new HashSet<String>(); - for (String other_element_value_element : other_element_value) { - __this__userRolesMap_copy_value.add(other_element_value_element); - } + Set<String> __this__userRolesMap_copy_value = new HashSet<String>(other_element_value); __this__userRolesMap.put(__this__userRolesMap_copy_key, __this__userRolesMap_copy_value); } @@ -314,43 +312,43 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin public void setFieldValue(_Fields field, Object value) { switch (field) { - case GROUP_ROLES_MAP: - if (value == null) { - unsetGroupRolesMap(); - } else { - setGroupRolesMap((Map<String,Set<String>>)value); - } - break; + case GROUP_ROLES_MAP: + if (value == null) { + unsetGroupRolesMap(); + } else { + setGroupRolesMap((Map<String,Set<String>>)value); + } + break; - case ROLE_PRIVILEGES_MAP: - if (value == null) { - unsetRolePrivilegesMap(); - } else { - setRolePrivilegesMap((Map<String,Set<TSentryPrivilege>>)value); - } - break; + case ROLE_PRIVILEGES_MAP: + if (value == null) { + unsetRolePrivilegesMap(); + } else { + setRolePrivilegesMap((Map<String,Set<TSentryPrivilege>>)value); + } + break; - case USER_ROLES_MAP: - if (value == null) { - unsetUserRolesMap(); - } else { - setUserRolesMap((Map<String,Set<String>>)value); - } - break; + case USER_ROLES_MAP: + if (value == null) { + unsetUserRolesMap(); + } else { + setUserRolesMap((Map<String,Set<String>>)value); + } + break; } } public Object getFieldValue(_Fields field) { switch (field) { - case GROUP_ROLES_MAP: - return getGroupRolesMap(); + case GROUP_ROLES_MAP: + return getGroupRolesMap(); - case ROLE_PRIVILEGES_MAP: - return getRolePrivilegesMap(); + case ROLE_PRIVILEGES_MAP: + return getRolePrivilegesMap(); - case USER_ROLES_MAP: - return getUserRolesMap(); + case USER_ROLES_MAP: + return getUserRolesMap(); } throw new IllegalStateException(); @@ -363,12 +361,12 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin } switch (field) { - case GROUP_ROLES_MAP: - return isSetGroupRolesMap(); - case ROLE_PRIVILEGES_MAP: - return isSetRolePrivilegesMap(); - case USER_ROLES_MAP: - return isSetUserRolesMap(); + case GROUP_ROLES_MAP: + return isSetGroupRolesMap(); + case ROLE_PRIVILEGES_MAP: + return isSetRolePrivilegesMap(); + case USER_ROLES_MAP: + return isSetUserRolesMap(); } throw new IllegalStateException(); } @@ -418,60 +416,60 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_groupRolesMap = true && (isSetGroupRolesMap()); - builder.append(present_groupRolesMap); + list.add(present_groupRolesMap); if (present_groupRolesMap) - builder.append(groupRolesMap); + list.add(groupRolesMap); boolean present_rolePrivilegesMap = true && (isSetRolePrivilegesMap()); - builder.append(present_rolePrivilegesMap); + list.add(present_rolePrivilegesMap); if (present_rolePrivilegesMap) - builder.append(rolePrivilegesMap); + list.add(rolePrivilegesMap); boolean present_userRolesMap = true && (isSetUserRolesMap()); - builder.append(present_userRolesMap); + list.add(present_userRolesMap); if (present_userRolesMap) - builder.append(userRolesMap); + list.add(userRolesMap); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryMappingData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryMappingData typedOther = (TSentryMappingData)other; - lastComparison = Boolean.valueOf(isSetGroupRolesMap()).compareTo(typedOther.isSetGroupRolesMap()); + lastComparison = Boolean.valueOf(isSetGroupRolesMap()).compareTo(other.isSetGroupRolesMap()); if (lastComparison != 0) { return lastComparison; } if (isSetGroupRolesMap()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupRolesMap, typedOther.groupRolesMap); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupRolesMap, other.groupRolesMap); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRolePrivilegesMap()).compareTo(typedOther.isSetRolePrivilegesMap()); + lastComparison = Boolean.valueOf(isSetRolePrivilegesMap()).compareTo(other.isSetRolePrivilegesMap()); if (lastComparison != 0) { return lastComparison; } if (isSetRolePrivilegesMap()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rolePrivilegesMap, typedOther.rolePrivilegesMap); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rolePrivilegesMap, other.rolePrivilegesMap); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUserRolesMap()).compareTo(typedOther.isSetUserRolesMap()); + lastComparison = Boolean.valueOf(isSetUserRolesMap()).compareTo(other.isSetUserRolesMap()); if (lastComparison != 0) { return lastComparison; } if (isSetUserRolesMap()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userRolesMap, typedOther.userRolesMap); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userRolesMap, other.userRolesMap); if (lastComparison != 0) { return lastComparison; } @@ -564,7 +562,7 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin 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) { @@ -573,28 +571,28 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map156 = iprot.readMapBegin(); struct.groupRolesMap = new HashMap<String,Set<String>>(2*_map156.size); - for (int _i157 = 0; _i157 < _map156.size; ++_i157) + String _key157; + Set<String> _val158; + for (int _i159 = 0; _i159 < _map156.size; ++_i159) { - String _key158; // required - Set<String> _val159; // required - _key158 = iprot.readString(); + _key157 = iprot.readString(); { org.apache.thrift.protocol.TSet _set160 = iprot.readSetBegin(); - _val159 = new HashSet<String>(2*_set160.size); - for (int _i161 = 0; _i161 < _set160.size; ++_i161) + _val158 = new HashSet<String>(2*_set160.size); + String _elem161; + for (int _i162 = 0; _i162 < _set160.size; ++_i162) { - String _elem162; // required - _elem162 = iprot.readString(); - _val159.add(_elem162); + _elem161 = iprot.readString(); + _val158.add(_elem161); } iprot.readSetEnd(); } - struct.groupRolesMap.put(_key158, _val159); + struct.groupRolesMap.put(_key157, _val158); } iprot.readMapEnd(); } struct.setGroupRolesMapIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -603,29 +601,29 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map163 = iprot.readMapBegin(); struct.rolePrivilegesMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map163.size); - for (int _i164 = 0; _i164 < _map163.size; ++_i164) + String _key164; + Set<TSentryPrivilege> _val165; + for (int _i166 = 0; _i166 < _map163.size; ++_i166) { - String _key165; // required - Set<TSentryPrivilege> _val166; // required - _key165 = iprot.readString(); + _key164 = iprot.readString(); { org.apache.thrift.protocol.TSet _set167 = iprot.readSetBegin(); - _val166 = new HashSet<TSentryPrivilege>(2*_set167.size); - for (int _i168 = 0; _i168 < _set167.size; ++_i168) + _val165 = new HashSet<TSentryPrivilege>(2*_set167.size); + TSentryPrivilege _elem168; + for (int _i169 = 0; _i169 < _set167.size; ++_i169) { - TSentryPrivilege _elem169; // required - _elem169 = new TSentryPrivilege(); - _elem169.read(iprot); - _val166.add(_elem169); + _elem168 = new TSentryPrivilege(); + _elem168.read(iprot); + _val165.add(_elem168); } iprot.readSetEnd(); } - struct.rolePrivilegesMap.put(_key165, _val166); + struct.rolePrivilegesMap.put(_key164, _val165); } iprot.readMapEnd(); } struct.setRolePrivilegesMapIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -634,28 +632,28 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map170 = iprot.readMapBegin(); struct.userRolesMap = new HashMap<String,Set<String>>(2*_map170.size); - for (int _i171 = 0; _i171 < _map170.size; ++_i171) + String _key171; + Set<String> _val172; + for (int _i173 = 0; _i173 < _map170.size; ++_i173) { - String _key172; // required - Set<String> _val173; // required - _key172 = iprot.readString(); + _key171 = iprot.readString(); { org.apache.thrift.protocol.TSet _set174 = iprot.readSetBegin(); - _val173 = new HashSet<String>(2*_set174.size); - for (int _i175 = 0; _i175 < _set174.size; ++_i175) + _val172 = new HashSet<String>(2*_set174.size); + String _elem175; + for (int _i176 = 0; _i176 < _set174.size; ++_i176) { - String _elem176; // required - _elem176 = iprot.readString(); - _val173.add(_elem176); + _elem175 = iprot.readString(); + _val172.add(_elem175); } iprot.readSetEnd(); } - struct.userRolesMap.put(_key172, _val173); + struct.userRolesMap.put(_key171, _val172); } iprot.readMapEnd(); } struct.setUserRolesMapIsSet(true); - } else { + } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; @@ -824,22 +822,22 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map189 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32()); struct.groupRolesMap = new HashMap<String,Set<String>>(2*_map189.size); - for (int _i190 = 0; _i190 < _map189.size; ++_i190) + String _key190; + Set<String> _val191; + for (int _i192 = 0; _i192 < _map189.size; ++_i192) { - String _key191; // required - Set<String> _val192; // required - _key191 = iprot.readString(); + _key190 = iprot.readString(); { org.apache.thrift.protocol.TSet _set193 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - _val192 = new HashSet<String>(2*_set193.size); - for (int _i194 = 0; _i194 < _set193.size; ++_i194) + _val191 = new HashSet<String>(2*_set193.size); + String _elem194; + for (int _i195 = 0; _i195 < _set193.size; ++_i195) { - String _elem195; // required - _elem195 = iprot.readString(); - _val192.add(_elem195); + _elem194 = iprot.readString(); + _val191.add(_elem194); } } - struct.groupRolesMap.put(_key191, _val192); + struct.groupRolesMap.put(_key190, _val191); } } struct.setGroupRolesMapIsSet(true); @@ -848,23 +846,23 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map196 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32()); struct.rolePrivilegesMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map196.size); - for (int _i197 = 0; _i197 < _map196.size; ++_i197) + String _key197; + Set<TSentryPrivilege> _val198; + for (int _i199 = 0; _i199 < _map196.size; ++_i199) { - String _key198; // required - Set<TSentryPrivilege> _val199; // required - _key198 = iprot.readString(); + _key197 = iprot.readString(); { org.apache.thrift.protocol.TSet _set200 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val199 = new HashSet<TSentryPrivilege>(2*_set200.size); - for (int _i201 = 0; _i201 < _set200.size; ++_i201) + _val198 = new HashSet<TSentryPrivilege>(2*_set200.size); + TSentryPrivilege _elem201; + for (int _i202 = 0; _i202 < _set200.size; ++_i202) { - TSentryPrivilege _elem202; // required - _elem202 = new TSentryPrivilege(); - _elem202.read(iprot); - _val199.add(_elem202); + _elem201 = new TSentryPrivilege(); + _elem201.read(iprot); + _val198.add(_elem201); } } - struct.rolePrivilegesMap.put(_key198, _val199); + struct.rolePrivilegesMap.put(_key197, _val198); } } struct.setRolePrivilegesMapIsSet(true); @@ -873,22 +871,22 @@ public class TSentryMappingData implements org.apache.thrift.TBase<TSentryMappin { org.apache.thrift.protocol.TMap _map203 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32()); struct.userRolesMap = new HashMap<String,Set<String>>(2*_map203.size); - for (int _i204 = 0; _i204 < _map203.size; ++_i204) + String _key204; + Set<String> _val205; + for (int _i206 = 0; _i206 < _map203.size; ++_i206) { - String _key205; // required - Set<String> _val206; // required - _key205 = iprot.readString(); + _key204 = iprot.readString(); { org.apache.thrift.protocol.TSet _set207 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - _val206 = new HashSet<String>(2*_set207.size); - for (int _i208 = 0; _i208 < _set207.size; ++_i208) + _val205 = new HashSet<String>(2*_set207.size); + String _elem208; + for (int _i209 = 0; _i209 < _set207.size; ++_i209) { - String _elem209; // required - _elem209 = iprot.readString(); - _val206.add(_elem209); + _elem208 = iprot.readString(); + _val205.add(_elem208); } } - struct.userRolesMap.put(_key205, _val206); + struct.userRolesMap.put(_key204, _val205); } } struct.setUserRolesMapIsSet(true); http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilege.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilege.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilege.java index 1f75478..15b339f 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilege.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilege.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivilege, TSentryPrivilege._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivilege, TSentryPrivilege._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryPrivilege> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryPrivilege"); private static final org.apache.thrift.protocol.TField PRIVILEGE_SCOPE_FIELD_DESC = new org.apache.thrift.protocol.TField("privilegeScope", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -149,7 +153,7 @@ public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivileg // isset id assignments private static final int __CREATETIME_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.URI,_Fields.CREATE_TIME,_Fields.GRANT_OPTION,_Fields.COLUMN_NAME}; + private static final _Fields optionals[] = {_Fields.DB_NAME,_Fields.TABLE_NAME,_Fields.URI,_Fields.CREATE_TIME,_Fields.GRANT_OPTION,_Fields.COLUMN_NAME}; 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); @@ -569,7 +573,7 @@ public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivileg return getAction(); case CREATE_TIME: - return Long.valueOf(getCreateTime()); + return getCreateTime(); case GRANT_OPTION: return getGrantOption(); @@ -709,150 +713,150 @@ public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivileg @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_privilegeScope = true && (isSetPrivilegeScope()); - builder.append(present_privilegeScope); + list.add(present_privilegeScope); if (present_privilegeScope) - builder.append(privilegeScope); + list.add(privilegeScope); boolean present_serverName = true && (isSetServerName()); - builder.append(present_serverName); + list.add(present_serverName); if (present_serverName) - builder.append(serverName); + list.add(serverName); boolean present_dbName = true && (isSetDbName()); - builder.append(present_dbName); + list.add(present_dbName); if (present_dbName) - builder.append(dbName); + list.add(dbName); boolean present_tableName = true && (isSetTableName()); - builder.append(present_tableName); + list.add(present_tableName); if (present_tableName) - builder.append(tableName); + list.add(tableName); boolean present_URI = true && (isSetURI()); - builder.append(present_URI); + list.add(present_URI); if (present_URI) - builder.append(URI); + list.add(URI); boolean present_action = true && (isSetAction()); - builder.append(present_action); + list.add(present_action); if (present_action) - builder.append(action); + list.add(action); boolean present_createTime = true && (isSetCreateTime()); - builder.append(present_createTime); + list.add(present_createTime); if (present_createTime) - builder.append(createTime); + list.add(createTime); boolean present_grantOption = true && (isSetGrantOption()); - builder.append(present_grantOption); + list.add(present_grantOption); if (present_grantOption) - builder.append(grantOption.getValue()); + list.add(grantOption.getValue()); boolean present_columnName = true && (isSetColumnName()); - builder.append(present_columnName); + list.add(present_columnName); if (present_columnName) - builder.append(columnName); + list.add(columnName); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryPrivilege other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryPrivilege typedOther = (TSentryPrivilege)other; - lastComparison = Boolean.valueOf(isSetPrivilegeScope()).compareTo(typedOther.isSetPrivilegeScope()); + lastComparison = Boolean.valueOf(isSetPrivilegeScope()).compareTo(other.isSetPrivilegeScope()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivilegeScope()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeScope, typedOther.privilegeScope); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeScope, other.privilegeScope); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServerName()).compareTo(typedOther.isSetServerName()); + lastComparison = Boolean.valueOf(isSetServerName()).compareTo(other.isSetServerName()); if (lastComparison != 0) { return lastComparison; } if (isSetServerName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverName, typedOther.serverName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverName, other.serverName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName()); if (lastComparison != 0) { return lastComparison; } if (isSetDbName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, typedOther.dbName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetURI()).compareTo(typedOther.isSetURI()); + lastComparison = Boolean.valueOf(isSetURI()).compareTo(other.isSetURI()); if (lastComparison != 0) { return lastComparison; } if (isSetURI()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.URI, typedOther.URI); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.URI, other.URI); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAction()).compareTo(typedOther.isSetAction()); + lastComparison = Boolean.valueOf(isSetAction()).compareTo(other.isSetAction()); if (lastComparison != 0) { return lastComparison; } if (isSetAction()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.action, typedOther.action); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.action, other.action); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, typedOther.createTime); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(typedOther.isSetGrantOption()); + lastComparison = Boolean.valueOf(isSetGrantOption()).compareTo(other.isSetGrantOption()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantOption()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, typedOther.grantOption); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantOption, other.grantOption); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); if (lastComparison != 0) { return lastComparison; } @@ -1071,7 +1075,7 @@ public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivileg break; case 9: // GRANT_OPTION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.grantOption = TSentryGrantOption.findByValue(iprot.readI32()); + struct.grantOption = org.apache.sentry.provider.db.service.thrift.TSentryGrantOption.findByValue(iprot.readI32()); struct.setGrantOptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -1240,7 +1244,7 @@ public class TSentryPrivilege implements org.apache.thrift.TBase<TSentryPrivileg struct.setCreateTimeIsSet(true); } if (incoming.get(4)) { - struct.grantOption = TSentryGrantOption.findByValue(iprot.readI32()); + struct.grantOption = org.apache.sentry.provider.db.service.thrift.TSentryGrantOption.findByValue(iprot.readI32()); struct.setGrantOptionIsSet(true); } if (incoming.get(5)) { http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java index 3d85d9f..9991f3b 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivilegeMap, TSentryPrivilegeMap._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivilegeMap, TSentryPrivilegeMap._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryPrivilegeMap> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryPrivilegeMap"); private static final org.apache.thrift.protocol.TField PRIVILEGE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("privilegeMap", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -130,7 +134,7 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi */ public TSentryPrivilegeMap(TSentryPrivilegeMap other) { if (other.isSetPrivilegeMap()) { - Map<String,Set<TSentryPrivilege>> __this__privilegeMap = new HashMap<String,Set<TSentryPrivilege>>(); + Map<String,Set<TSentryPrivilege>> __this__privilegeMap = new HashMap<String,Set<TSentryPrivilege>>(other.privilegeMap.size()); for (Map.Entry<String, Set<TSentryPrivilege>> other_element : other.privilegeMap.entrySet()) { String other_element_key = other_element.getKey(); @@ -138,7 +142,7 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi String __this__privilegeMap_copy_key = other_element_key; - Set<TSentryPrivilege> __this__privilegeMap_copy_value = new HashSet<TSentryPrivilege>(); + Set<TSentryPrivilege> __this__privilegeMap_copy_value = new HashSet<TSentryPrivilege>(other_element_value.size()); for (TSentryPrivilege other_element_value_element : other_element_value) { __this__privilegeMap_copy_value.add(new TSentryPrivilege(other_element_value_element)); } @@ -254,30 +258,30 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_privilegeMap = true && (isSetPrivilegeMap()); - builder.append(present_privilegeMap); + list.add(present_privilegeMap); if (present_privilegeMap) - builder.append(privilegeMap); + list.add(privilegeMap); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryPrivilegeMap other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryPrivilegeMap typedOther = (TSentryPrivilegeMap)other; - lastComparison = Boolean.valueOf(isSetPrivilegeMap()).compareTo(typedOther.isSetPrivilegeMap()); + lastComparison = Boolean.valueOf(isSetPrivilegeMap()).compareTo(other.isSetPrivilegeMap()); if (lastComparison != 0) { return lastComparison; } if (isSetPrivilegeMap()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeMap, typedOther.privilegeMap); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeMap, other.privilegeMap); if (lastComparison != 0) { return lastComparison; } @@ -361,24 +365,24 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi { org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin(); struct.privilegeMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map112.size); - for (int _i113 = 0; _i113 < _map112.size; ++_i113) + String _key113; + Set<TSentryPrivilege> _val114; + for (int _i115 = 0; _i115 < _map112.size; ++_i115) { - String _key114; // required - Set<TSentryPrivilege> _val115; // required - _key114 = iprot.readString(); + _key113 = iprot.readString(); { org.apache.thrift.protocol.TSet _set116 = iprot.readSetBegin(); - _val115 = new HashSet<TSentryPrivilege>(2*_set116.size); - for (int _i117 = 0; _i117 < _set116.size; ++_i117) + _val114 = new HashSet<TSentryPrivilege>(2*_set116.size); + TSentryPrivilege _elem117; + for (int _i118 = 0; _i118 < _set116.size; ++_i118) { - TSentryPrivilege _elem118; // required - _elem118 = new TSentryPrivilege(); - _elem118.read(iprot); - _val115.add(_elem118); + _elem117 = new TSentryPrivilege(); + _elem117.read(iprot); + _val114.add(_elem117); } iprot.readSetEnd(); } - struct.privilegeMap.put(_key114, _val115); + struct.privilegeMap.put(_key113, _val114); } iprot.readMapEnd(); } @@ -459,23 +463,23 @@ public class TSentryPrivilegeMap implements org.apache.thrift.TBase<TSentryPrivi { org.apache.thrift.protocol.TMap _map123 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, iprot.readI32()); struct.privilegeMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map123.size); - for (int _i124 = 0; _i124 < _map123.size; ++_i124) + String _key124; + Set<TSentryPrivilege> _val125; + for (int _i126 = 0; _i126 < _map123.size; ++_i126) { - String _key125; // required - Set<TSentryPrivilege> _val126; // required - _key125 = iprot.readString(); + _key124 = iprot.readString(); { org.apache.thrift.protocol.TSet _set127 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val126 = new HashSet<TSentryPrivilege>(2*_set127.size); - for (int _i128 = 0; _i128 < _set127.size; ++_i128) + _val125 = new HashSet<TSentryPrivilege>(2*_set127.size); + TSentryPrivilege _elem128; + for (int _i129 = 0; _i129 < _set127.size; ++_i129) { - TSentryPrivilege _elem129; // required - _elem129 = new TSentryPrivilege(); - _elem129.read(iprot); - _val126.add(_elem129); + _elem128 = new TSentryPrivilege(); + _elem128.read(iprot); + _val125.add(_elem128); } } - struct.privilegeMap.put(_key125, _val126); + struct.privilegeMap.put(_key124, _val125); } } struct.setPrivilegeMapIsSet(true); http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java index 0faa12a..e60ac24 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.provider.db.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentryRole._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentryRole._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryRole> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryRole"); private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -149,7 +153,7 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry this.roleName = other.roleName; } if (other.isSetGroups()) { - Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>(); + Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>(other.groups.size()); for (TSentryGroup other_element : other.groups) { __this__groups.add(new TSentryGroup(other_element)); } @@ -361,60 +365,60 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_roleName = true && (isSetRoleName()); - builder.append(present_roleName); + list.add(present_roleName); if (present_roleName) - builder.append(roleName); + list.add(roleName); boolean present_groups = true && (isSetGroups()); - builder.append(present_groups); + list.add(present_groups); if (present_groups) - builder.append(groups); + list.add(groups); boolean present_grantorPrincipal = true && (isSetGrantorPrincipal()); - builder.append(present_grantorPrincipal); + list.add(present_grantorPrincipal); if (present_grantorPrincipal) - builder.append(grantorPrincipal); + list.add(grantorPrincipal); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryRole other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryRole typedOther = (TSentryRole)other; - lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName()); + lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName()); if (lastComparison != 0) { return lastComparison; } if (isSetRoleName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGroups()).compareTo(typedOther.isSetGroups()); + lastComparison = Boolean.valueOf(isSetGroups()).compareTo(other.isSetGroups()); if (lastComparison != 0) { return lastComparison; } if (isSetGroups()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, typedOther.groups); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGrantorPrincipal()).compareTo(typedOther.isSetGrantorPrincipal()); + lastComparison = Boolean.valueOf(isSetGrantorPrincipal()).compareTo(other.isSetGrantorPrincipal()); if (lastComparison != 0) { return lastComparison; } if (isSetGrantorPrincipal()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorPrincipal, typedOther.grantorPrincipal); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorPrincipal, other.grantorPrincipal); if (lastComparison != 0) { return lastComparison; } @@ -530,12 +534,12 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry { org.apache.thrift.protocol.TSet _set56 = iprot.readSetBegin(); struct.groups = new HashSet<TSentryGroup>(2*_set56.size); - for (int _i57 = 0; _i57 < _set56.size; ++_i57) + TSentryGroup _elem57; + for (int _i58 = 0; _i58 < _set56.size; ++_i58) { - TSentryGroup _elem58; // required - _elem58 = new TSentryGroup(); - _elem58.read(iprot); - struct.groups.add(_elem58); + _elem57 = new TSentryGroup(); + _elem57.read(iprot); + struct.groups.add(_elem57); } iprot.readSetEnd(); } @@ -623,12 +627,12 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry { org.apache.thrift.protocol.TSet _set61 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.groups = new HashSet<TSentryGroup>(2*_set61.size); - for (int _i62 = 0; _i62 < _set61.size; ++_i62) + TSentryGroup _elem62; + for (int _i63 = 0; _i63 < _set61.size; ++_i63) { - TSentryGroup _elem63; // required - _elem63 = new TSentryGroup(); - _elem63.read(iprot); - struct.groups.add(_elem63); + _elem62 = new TSentryGroup(); + _elem62.read(iprot); + struct.groups.add(_elem62); } } struct.setGroupsIsSet(true); http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/TSentryResponseStatus.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/TSentryResponseStatus.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/TSentryResponseStatus.java index 81abd90..d9a9f86 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/TSentryResponseStatus.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/TSentryResponseStatus.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,10 +29,13 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TSentryResponseStatus implements org.apache.thrift.TBase<TSentryResponseStatus, TSentryResponseStatus._Fields>, java.io.Serializable, Cloneable { +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-05") +public class TSentryResponseStatus implements org.apache.thrift.TBase<TSentryResponseStatus, TSentryResponseStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TSentryResponseStatus> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentryResponseStatus"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I32, (short)1); @@ -115,7 +119,7 @@ public class TSentryResponseStatus implements org.apache.thrift.TBase<TSentryRes // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.STACK}; + private static final _Fields optionals[] = {_Fields.STACK}; 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); @@ -268,7 +272,7 @@ public class TSentryResponseStatus implements org.apache.thrift.TBase<TSentryRes public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return Integer.valueOf(getValue()); + return getValue(); case MESSAGE: return getMessage(); @@ -342,60 +346,60 @@ public class TSentryResponseStatus implements org.apache.thrift.TBase<TSentryRes @Override public int hashCode() { - HashCodeBuilder builder = new HashCodeBuilder(); + List<Object> list = new ArrayList<Object>(); boolean present_value = true; - builder.append(present_value); + list.add(present_value); if (present_value) - builder.append(value); + list.add(value); boolean present_message = true && (isSetMessage()); - builder.append(present_message); + list.add(present_message); if (present_message) - builder.append(message); + list.add(message); boolean present_stack = true && (isSetStack()); - builder.append(present_stack); + list.add(present_stack); if (present_stack) - builder.append(stack); + list.add(stack); - return builder.toHashCode(); + return list.hashCode(); } + @Override public int compareTo(TSentryResponseStatus other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - TSentryResponseStatus typedOther = (TSentryResponseStatus)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetStack()).compareTo(typedOther.isSetStack()); + lastComparison = Boolean.valueOf(isSetStack()).compareTo(other.isSetStack()); if (lastComparison != 0) { return lastComparison; } if (isSetStack()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stack, typedOther.stack); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stack, other.stack); if (lastComparison != 0) { return lastComparison; } http://git-wip-us.apache.org/repos/asf/sentry/blob/e67bde0d/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/sentry_common_serviceConstants.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/sentry_common_serviceConstants.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/sentry_common_serviceConstants.java index ff2ddb7..eb63bc3 100644 --- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/sentry_common_serviceConstants.java +++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/service/thrift/sentry_common_serviceConstants.java @@ -1,12 +1,11 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package org.apache.sentry.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; @@ -16,6 +15,8 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; +import org.apache.thrift.async.AsyncMethodCallback; +import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -28,9 +29,11 @@ import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; +import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) public class sentry_common_serviceConstants { public static final int TSENTRY_SERVICE_V1 = 1;
