You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sp...@apache.org on 2018/05/15 21:44:46 UTC
[28/51] [abbrv] [partial] sentry git commit: SENTRY-2206: Refactor
out sentry api from sentry-provider-db to own module (Steve Moist,
reviewed by Sergio Pena)
http://git-wip-us.apache.org/repos/asf/sentry/blob/48422f4c/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
deleted file mode 100644
index 6577cb5..0000000
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryPrivilegeMap.java
+++ /dev/null
@@ -1,490 +0,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.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-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;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-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"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-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);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TSentryPrivilegeMapStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSentryPrivilegeMapTupleSchemeFactory());
- }
-
- private Map<String,Set<TSentryPrivilege>> privilegeMap; // 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 {
- PRIVILEGE_MAP((short)1, "privilegeMap");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // PRIVILEGE_MAP
- return PRIVILEGE_MAP;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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,
- 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);
- }
-
- public TSentryPrivilegeMap() {
- }
-
- public TSentryPrivilegeMap(
- Map<String,Set<TSentryPrivilege>> privilegeMap)
- {
- this();
- this.privilegeMap = privilegeMap;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TSentryPrivilegeMap(TSentryPrivilegeMap other) {
- if (other.isSetPrivilegeMap()) {
- 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();
- Set<TSentryPrivilege> other_element_value = other_element.getValue();
-
- String __this__privilegeMap_copy_key = other_element_key;
-
- 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));
- }
-
- __this__privilegeMap.put(__this__privilegeMap_copy_key, __this__privilegeMap_copy_value);
- }
- this.privilegeMap = __this__privilegeMap;
- }
- }
-
- public TSentryPrivilegeMap deepCopy() {
- return new TSentryPrivilegeMap(this);
- }
-
- @Override
- public void clear() {
- this.privilegeMap = null;
- }
-
- public int getPrivilegeMapSize() {
- return (this.privilegeMap == null) ? 0 : this.privilegeMap.size();
- }
-
- public void putToPrivilegeMap(String key, Set<TSentryPrivilege> val) {
- if (this.privilegeMap == null) {
- this.privilegeMap = new HashMap<String,Set<TSentryPrivilege>>();
- }
- this.privilegeMap.put(key, val);
- }
-
- public Map<String,Set<TSentryPrivilege>> getPrivilegeMap() {
- return this.privilegeMap;
- }
-
- public void setPrivilegeMap(Map<String,Set<TSentryPrivilege>> privilegeMap) {
- this.privilegeMap = privilegeMap;
- }
-
- public void unsetPrivilegeMap() {
- this.privilegeMap = null;
- }
-
- /** Returns true if field privilegeMap is set (has been assigned a value) and false otherwise */
- public boolean isSetPrivilegeMap() {
- return this.privilegeMap != null;
- }
-
- public void setPrivilegeMapIsSet(boolean value) {
- if (!value) {
- this.privilegeMap = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case PRIVILEGE_MAP:
- if (value == null) {
- unsetPrivilegeMap();
- } else {
- setPrivilegeMap((Map<String,Set<TSentryPrivilege>>)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case PRIVILEGE_MAP:
- return getPrivilegeMap();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case PRIVILEGE_MAP:
- return isSetPrivilegeMap();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TSentryPrivilegeMap)
- return this.equals((TSentryPrivilegeMap)that);
- return false;
- }
-
- public boolean equals(TSentryPrivilegeMap that) {
- if (that == null)
- return false;
-
- boolean this_present_privilegeMap = true && this.isSetPrivilegeMap();
- boolean that_present_privilegeMap = true && that.isSetPrivilegeMap();
- if (this_present_privilegeMap || that_present_privilegeMap) {
- if (!(this_present_privilegeMap && that_present_privilegeMap))
- return false;
- if (!this.privilegeMap.equals(that.privilegeMap))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_privilegeMap = true && (isSetPrivilegeMap());
- list.add(present_privilegeMap);
- if (present_privilegeMap)
- list.add(privilegeMap);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(TSentryPrivilegeMap other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetPrivilegeMap()).compareTo(other.isSetPrivilegeMap());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetPrivilegeMap()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.privilegeMap, other.privilegeMap);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TSentryPrivilegeMap(");
- boolean first = true;
-
- sb.append("privilegeMap:");
- if (this.privilegeMap == null) {
- sb.append("null");
- } else {
- sb.append(this.privilegeMap);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetPrivilegeMap()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'privilegeMap' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TSentryPrivilegeMapStandardSchemeFactory implements SchemeFactory {
- public TSentryPrivilegeMapStandardScheme getScheme() {
- return new TSentryPrivilegeMapStandardScheme();
- }
- }
-
- private static class TSentryPrivilegeMapStandardScheme extends StandardScheme<TSentryPrivilegeMap> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TSentryPrivilegeMap struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // PRIVILEGE_MAP
- if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map112 = iprot.readMapBegin();
- struct.privilegeMap = new HashMap<String,Set<TSentryPrivilege>>(2*_map112.size);
- String _key113;
- Set<TSentryPrivilege> _val114;
- for (int _i115 = 0; _i115 < _map112.size; ++_i115)
- {
- _key113 = iprot.readString();
- {
- org.apache.thrift.protocol.TSet _set116 = iprot.readSetBegin();
- _val114 = new HashSet<TSentryPrivilege>(2*_set116.size);
- TSentryPrivilege _elem117;
- for (int _i118 = 0; _i118 < _set116.size; ++_i118)
- {
- _elem117 = new TSentryPrivilege();
- _elem117.read(iprot);
- _val114.add(_elem117);
- }
- iprot.readSetEnd();
- }
- struct.privilegeMap.put(_key113, _val114);
- }
- iprot.readMapEnd();
- }
- struct.setPrivilegeMapIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TSentryPrivilegeMap struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.privilegeMap != null) {
- oprot.writeFieldBegin(PRIVILEGE_MAP_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.SET, struct.privilegeMap.size()));
- for (Map.Entry<String, Set<TSentryPrivilege>> _iter119 : struct.privilegeMap.entrySet())
- {
- oprot.writeString(_iter119.getKey());
- {
- oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, _iter119.getValue().size()));
- for (TSentryPrivilege _iter120 : _iter119.getValue())
- {
- _iter120.write(oprot);
- }
- oprot.writeSetEnd();
- }
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TSentryPrivilegeMapTupleSchemeFactory implements SchemeFactory {
- public TSentryPrivilegeMapTupleScheme getScheme() {
- return new TSentryPrivilegeMapTupleScheme();
- }
- }
-
- private static class TSentryPrivilegeMapTupleScheme extends TupleScheme<TSentryPrivilegeMap> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TSentryPrivilegeMap struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- {
- oprot.writeI32(struct.privilegeMap.size());
- for (Map.Entry<String, Set<TSentryPrivilege>> _iter121 : struct.privilegeMap.entrySet())
- {
- oprot.writeString(_iter121.getKey());
- {
- oprot.writeI32(_iter121.getValue().size());
- for (TSentryPrivilege _iter122 : _iter121.getValue())
- {
- _iter122.write(oprot);
- }
- }
- }
- }
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TSentryPrivilegeMap struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- {
- 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);
- String _key124;
- Set<TSentryPrivilege> _val125;
- for (int _i126 = 0; _i126 < _map123.size; ++_i126)
- {
- _key124 = iprot.readString();
- {
- org.apache.thrift.protocol.TSet _set127 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- _val125 = new HashSet<TSentryPrivilege>(2*_set127.size);
- TSentryPrivilege _elem128;
- for (int _i129 = 0; _i129 < _set127.size; ++_i129)
- {
- _elem128 = new TSentryPrivilege();
- _elem128.read(iprot);
- _val125.add(_elem128);
- }
- }
- struct.privilegeMap.put(_key124, _val125);
- }
- }
- struct.setPrivilegeMapIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/sentry/blob/48422f4c/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
deleted file mode 100644
index f4d4196..0000000
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java
+++ /dev/null
@@ -1,645 +0,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.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-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;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-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"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-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);
- private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.SET, (short)2);
- private static final org.apache.thrift.protocol.TField GRANTOR_PRINCIPAL_FIELD_DESC = new org.apache.thrift.protocol.TField("grantorPrincipal", org.apache.thrift.protocol.TType.STRING, (short)3);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TSentryRoleStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSentryRoleTupleSchemeFactory());
- }
-
- private String roleName; // required
- private Set<TSentryGroup> groups; // required
- private String grantorPrincipal; // 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 {
- ROLE_NAME((short)1, "roleName"),
- GROUPS((short)2, "groups"),
- GRANTOR_PRINCIPAL((short)3, "grantorPrincipal");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // ROLE_NAME
- return ROLE_NAME;
- case 2: // GROUPS
- return GROUPS;
- case 3: // GRANTOR_PRINCIPAL
- return GRANTOR_PRINCIPAL;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- 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.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED,
- 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.REQUIRED,
- 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, TSentryGroup.class))));
- tmpMap.put(_Fields.GRANTOR_PRINCIPAL, new org.apache.thrift.meta_data.FieldMetaData("grantorPrincipal", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSentryRole.class, metaDataMap);
- }
-
- public TSentryRole() {
- }
-
- public TSentryRole(
- String roleName,
- Set<TSentryGroup> groups,
- String grantorPrincipal)
- {
- this();
- this.roleName = roleName;
- this.groups = groups;
- this.grantorPrincipal = grantorPrincipal;
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TSentryRole(TSentryRole other) {
- if (other.isSetRoleName()) {
- this.roleName = other.roleName;
- }
- if (other.isSetGroups()) {
- Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>(other.groups.size());
- for (TSentryGroup other_element : other.groups) {
- __this__groups.add(new TSentryGroup(other_element));
- }
- this.groups = __this__groups;
- }
- if (other.isSetGrantorPrincipal()) {
- this.grantorPrincipal = other.grantorPrincipal;
- }
- }
-
- public TSentryRole deepCopy() {
- return new TSentryRole(this);
- }
-
- @Override
- public void clear() {
- this.roleName = null;
- this.groups = null;
- this.grantorPrincipal = null;
- }
-
- public String getRoleName() {
- return this.roleName;
- }
-
- public void setRoleName(String roleName) {
- this.roleName = roleName;
- }
-
- public void unsetRoleName() {
- this.roleName = null;
- }
-
- /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
- public boolean isSetRoleName() {
- return this.roleName != null;
- }
-
- public void setRoleNameIsSet(boolean value) {
- if (!value) {
- this.roleName = null;
- }
- }
-
- public int getGroupsSize() {
- return (this.groups == null) ? 0 : this.groups.size();
- }
-
- public java.util.Iterator<TSentryGroup> getGroupsIterator() {
- return (this.groups == null) ? null : this.groups.iterator();
- }
-
- public void addToGroups(TSentryGroup elem) {
- if (this.groups == null) {
- this.groups = new HashSet<TSentryGroup>();
- }
- this.groups.add(elem);
- }
-
- public Set<TSentryGroup> getGroups() {
- return this.groups;
- }
-
- public void setGroups(Set<TSentryGroup> groups) {
- this.groups = groups;
- }
-
- public void unsetGroups() {
- this.groups = null;
- }
-
- /** Returns true if field groups is set (has been assigned a value) and false otherwise */
- public boolean isSetGroups() {
- return this.groups != null;
- }
-
- public void setGroupsIsSet(boolean value) {
- if (!value) {
- this.groups = null;
- }
- }
-
- public String getGrantorPrincipal() {
- return this.grantorPrincipal;
- }
-
- public void setGrantorPrincipal(String grantorPrincipal) {
- this.grantorPrincipal = grantorPrincipal;
- }
-
- public void unsetGrantorPrincipal() {
- this.grantorPrincipal = null;
- }
-
- /** Returns true if field grantorPrincipal is set (has been assigned a value) and false otherwise */
- public boolean isSetGrantorPrincipal() {
- return this.grantorPrincipal != null;
- }
-
- public void setGrantorPrincipalIsSet(boolean value) {
- if (!value) {
- this.grantorPrincipal = null;
- }
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case ROLE_NAME:
- if (value == null) {
- unsetRoleName();
- } else {
- setRoleName((String)value);
- }
- break;
-
- case GROUPS:
- if (value == null) {
- unsetGroups();
- } else {
- setGroups((Set<TSentryGroup>)value);
- }
- break;
-
- case GRANTOR_PRINCIPAL:
- if (value == null) {
- unsetGrantorPrincipal();
- } else {
- setGrantorPrincipal((String)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case ROLE_NAME:
- return getRoleName();
-
- case GROUPS:
- return getGroups();
-
- case GRANTOR_PRINCIPAL:
- return getGrantorPrincipal();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case ROLE_NAME:
- return isSetRoleName();
- case GROUPS:
- return isSetGroups();
- case GRANTOR_PRINCIPAL:
- return isSetGrantorPrincipal();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TSentryRole)
- return this.equals((TSentryRole)that);
- return false;
- }
-
- public boolean equals(TSentryRole that) {
- if (that == null)
- return false;
-
- boolean this_present_roleName = true && this.isSetRoleName();
- boolean that_present_roleName = true && that.isSetRoleName();
- if (this_present_roleName || that_present_roleName) {
- if (!(this_present_roleName && that_present_roleName))
- return false;
- if (!this.roleName.equals(that.roleName))
- return false;
- }
-
- boolean this_present_groups = true && this.isSetGroups();
- boolean that_present_groups = true && that.isSetGroups();
- if (this_present_groups || that_present_groups) {
- if (!(this_present_groups && that_present_groups))
- return false;
- if (!this.groups.equals(that.groups))
- return false;
- }
-
- boolean this_present_grantorPrincipal = true && this.isSetGrantorPrincipal();
- boolean that_present_grantorPrincipal = true && that.isSetGrantorPrincipal();
- if (this_present_grantorPrincipal || that_present_grantorPrincipal) {
- if (!(this_present_grantorPrincipal && that_present_grantorPrincipal))
- return false;
- if (!this.grantorPrincipal.equals(that.grantorPrincipal))
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_roleName = true && (isSetRoleName());
- list.add(present_roleName);
- if (present_roleName)
- list.add(roleName);
-
- boolean present_groups = true && (isSetGroups());
- list.add(present_groups);
- if (present_groups)
- list.add(groups);
-
- boolean present_grantorPrincipal = true && (isSetGrantorPrincipal());
- list.add(present_grantorPrincipal);
- if (present_grantorPrincipal)
- list.add(grantorPrincipal);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(TSentryRole other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetRoleName()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGroups()).compareTo(other.isSetGroups());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGroups()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, other.groups);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetGrantorPrincipal()).compareTo(other.isSetGrantorPrincipal());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetGrantorPrincipal()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.grantorPrincipal, other.grantorPrincipal);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TSentryRole(");
- boolean first = true;
-
- sb.append("roleName:");
- if (this.roleName == null) {
- sb.append("null");
- } else {
- sb.append(this.roleName);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("groups:");
- if (this.groups == null) {
- sb.append("null");
- } else {
- sb.append(this.groups);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("grantorPrincipal:");
- if (this.grantorPrincipal == null) {
- sb.append("null");
- } else {
- sb.append(this.grantorPrincipal);
- }
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetRoleName()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
- }
-
- if (!isSetGroups()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'groups' is unset! Struct:" + toString());
- }
-
- if (!isSetGrantorPrincipal()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'grantorPrincipal' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TSentryRoleStandardSchemeFactory implements SchemeFactory {
- public TSentryRoleStandardScheme getScheme() {
- return new TSentryRoleStandardScheme();
- }
- }
-
- private static class TSentryRoleStandardScheme extends StandardScheme<TSentryRole> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TSentryRole struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // ROLE_NAME
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.roleName = iprot.readString();
- struct.setRoleNameIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // GROUPS
- if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
- {
- org.apache.thrift.protocol.TSet _set56 = iprot.readSetBegin();
- struct.groups = new HashSet<TSentryGroup>(2*_set56.size);
- TSentryGroup _elem57;
- for (int _i58 = 0; _i58 < _set56.size; ++_i58)
- {
- _elem57 = new TSentryGroup();
- _elem57.read(iprot);
- struct.groups.add(_elem57);
- }
- iprot.readSetEnd();
- }
- struct.setGroupsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 3: // GRANTOR_PRINCIPAL
- if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
- struct.grantorPrincipal = iprot.readString();
- struct.setGrantorPrincipalIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TSentryRole struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.roleName != null) {
- oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
- oprot.writeString(struct.roleName);
- oprot.writeFieldEnd();
- }
- if (struct.groups != null) {
- oprot.writeFieldBegin(GROUPS_FIELD_DESC);
- {
- oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
- for (TSentryGroup _iter59 : struct.groups)
- {
- _iter59.write(oprot);
- }
- oprot.writeSetEnd();
- }
- oprot.writeFieldEnd();
- }
- if (struct.grantorPrincipal != null) {
- oprot.writeFieldBegin(GRANTOR_PRINCIPAL_FIELD_DESC);
- oprot.writeString(struct.grantorPrincipal);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TSentryRoleTupleSchemeFactory implements SchemeFactory {
- public TSentryRoleTupleScheme getScheme() {
- return new TSentryRoleTupleScheme();
- }
- }
-
- private static class TSentryRoleTupleScheme extends TupleScheme<TSentryRole> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TSentryRole struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeString(struct.roleName);
- {
- oprot.writeI32(struct.groups.size());
- for (TSentryGroup _iter60 : struct.groups)
- {
- _iter60.write(oprot);
- }
- }
- oprot.writeString(struct.grantorPrincipal);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TSentryRole struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.roleName = iprot.readString();
- struct.setRoleNameIsSet(true);
- {
- 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);
- TSentryGroup _elem62;
- for (int _i63 = 0; _i63 < _set61.size; ++_i63)
- {
- _elem62 = new TSentryGroup();
- _elem62.read(iprot);
- struct.groups.add(_elem62);
- }
- }
- struct.setGroupsIsSet(true);
- struct.grantorPrincipal = iprot.readString();
- struct.setGrantorPrincipalIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/sentry/blob/48422f4c/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDRequest.java
deleted file mode 100644
index f8f8185..0000000
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDRequest.java
+++ /dev/null
@@ -1,484 +0,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.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-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;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-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"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TSentrySyncIDRequest implements org.apache.thrift.TBase<TSentrySyncIDRequest, TSentrySyncIDRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TSentrySyncIDRequest> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentrySyncIDRequest");
-
- 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);
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TSentrySyncIDRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSentrySyncIDRequestTupleSchemeFactory());
- }
-
- private int protocol_version; // required
- private long id; // 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 {
- PROTOCOL_VERSION((short)1, "protocol_version"),
- ID((short)2, "id");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // PROTOCOL_VERSION
- return PROTOCOL_VERSION;
- case 2: // ID
- return ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __PROTOCOL_VERSION_ISSET_ID = 0;
- private static final int __ID_ISSET_ID = 1;
- private byte __isset_bitfield = 0;
- 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,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSentrySyncIDRequest.class, metaDataMap);
- }
-
- public TSentrySyncIDRequest() {
- this.protocol_version = 2;
-
- }
-
- public TSentrySyncIDRequest(
- int protocol_version,
- long id)
- {
- this();
- this.protocol_version = protocol_version;
- setProtocol_versionIsSet(true);
- this.id = id;
- setIdIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TSentrySyncIDRequest(TSentrySyncIDRequest other) {
- __isset_bitfield = other.__isset_bitfield;
- this.protocol_version = other.protocol_version;
- this.id = other.id;
- }
-
- public TSentrySyncIDRequest deepCopy() {
- return new TSentrySyncIDRequest(this);
- }
-
- @Override
- public void clear() {
- this.protocol_version = 2;
-
- setIdIsSet(false);
- this.id = 0;
- }
-
- public int getProtocol_version() {
- return this.protocol_version;
- }
-
- public void setProtocol_version(int protocol_version) {
- this.protocol_version = protocol_version;
- setProtocol_versionIsSet(true);
- }
-
- public void unsetProtocol_version() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
- }
-
- /** Returns true if field protocol_version is set (has been assigned a value) and false otherwise */
- public boolean isSetProtocol_version() {
- return EncodingUtils.testBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID);
- }
-
- public void setProtocol_versionIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PROTOCOL_VERSION_ISSET_ID, value);
- }
-
- public long getId() {
- return this.id;
- }
-
- public void setId(long id) {
- this.id = id;
- setIdIsSet(true);
- }
-
- public void unsetId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
- }
-
- public void setIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case PROTOCOL_VERSION:
- if (value == null) {
- unsetProtocol_version();
- } else {
- setProtocol_version((Integer)value);
- }
- break;
-
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case PROTOCOL_VERSION:
- return getProtocol_version();
-
- case ID:
- return getId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case PROTOCOL_VERSION:
- return isSetProtocol_version();
- case ID:
- return isSetId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TSentrySyncIDRequest)
- return this.equals((TSentrySyncIDRequest)that);
- return false;
- }
-
- public boolean equals(TSentrySyncIDRequest that) {
- if (that == null)
- return false;
-
- boolean this_present_protocol_version = true;
- boolean that_present_protocol_version = true;
- if (this_present_protocol_version || that_present_protocol_version) {
- if (!(this_present_protocol_version && that_present_protocol_version))
- return false;
- if (this.protocol_version != that.protocol_version)
- return false;
- }
-
- boolean this_present_id = true;
- boolean that_present_id = true;
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (this.id != that.id)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_protocol_version = true;
- list.add(present_protocol_version);
- if (present_protocol_version)
- list.add(protocol_version);
-
- boolean present_id = true;
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(TSentrySyncIDRequest other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- 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, other.protocol_version);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TSentrySyncIDRequest(");
- boolean first = true;
-
- sb.append("protocol_version:");
- sb.append(this.protocol_version);
- first = false;
- if (!first) sb.append(", ");
- sb.append("id:");
- sb.append(this.id);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetProtocol_version()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'protocol_version' is unset! Struct:" + toString());
- }
-
- if (!isSetId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TSentrySyncIDRequestStandardSchemeFactory implements SchemeFactory {
- public TSentrySyncIDRequestStandardScheme getScheme() {
- return new TSentrySyncIDRequestStandardScheme();
- }
- }
-
- private static class TSentrySyncIDRequestStandardScheme extends StandardScheme<TSentrySyncIDRequest> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TSentrySyncIDRequest struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // PROTOCOL_VERSION
- if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
- struct.protocol_version = iprot.readI32();
- struct.setProtocol_versionIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.id = iprot.readI64();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TSentrySyncIDRequest struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(PROTOCOL_VERSION_FIELD_DESC);
- oprot.writeI32(struct.protocol_version);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeI64(struct.id);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TSentrySyncIDRequestTupleSchemeFactory implements SchemeFactory {
- public TSentrySyncIDRequestTupleScheme getScheme() {
- return new TSentrySyncIDRequestTupleScheme();
- }
- }
-
- private static class TSentrySyncIDRequestTupleScheme extends TupleScheme<TSentrySyncIDRequest> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TSentrySyncIDRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- oprot.writeI32(struct.protocol_version);
- oprot.writeI64(struct.id);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TSentrySyncIDRequest struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.protocol_version = iprot.readI32();
- struct.setProtocol_versionIsSet(true);
- struct.id = iprot.readI64();
- struct.setIdIsSet(true);
- }
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/sentry/blob/48422f4c/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDResponse.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDResponse.java
deleted file mode 100644
index d6b5f3a..0000000
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentrySyncIDResponse.java
+++ /dev/null
@@ -1,493 +0,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.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-
-import org.apache.thrift.scheme.TupleScheme;
-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;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-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"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
-public class TSentrySyncIDResponse implements org.apache.thrift.TBase<TSentrySyncIDResponse, TSentrySyncIDResponse._Fields>, java.io.Serializable, Cloneable, Comparable<TSentrySyncIDResponse> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSentrySyncIDResponse");
-
- 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);
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)2);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TSentrySyncIDResponseStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TSentrySyncIDResponseTupleSchemeFactory());
- }
-
- private org.apache.sentry.service.thrift.TSentryResponseStatus status; // required
- private long id; // 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 {
- STATUS((short)1, "status"),
- ID((short)2, "id");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
- static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
- byName.put(field.getFieldName(), field);
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, or null if its not found.
- */
- public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
- case 1: // STATUS
- return STATUS;
- case 2: // ID
- return ID;
- default:
- return null;
- }
- }
-
- /**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
- */
- public static _Fields findByThriftIdOrThrow(int fieldId) {
- _Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- return fields;
- }
-
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
- public static _Fields findByName(String name) {
- return byName.get(name);
- }
-
- private final short _thriftId;
- private final String _fieldName;
-
- _Fields(short thriftId, String fieldName) {
- _thriftId = thriftId;
- _fieldName = fieldName;
- }
-
- public short getThriftFieldId() {
- return _thriftId;
- }
-
- public String getFieldName() {
- return _fieldName;
- }
- }
-
- // isset id assignments
- private static final int __ID_ISSET_ID = 0;
- private byte __isset_bitfield = 0;
- 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,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.sentry.service.thrift.TSentryResponseStatus.class)));
- tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
- org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSentrySyncIDResponse.class, metaDataMap);
- }
-
- public TSentrySyncIDResponse() {
- }
-
- public TSentrySyncIDResponse(
- org.apache.sentry.service.thrift.TSentryResponseStatus status,
- long id)
- {
- this();
- this.status = status;
- this.id = id;
- setIdIsSet(true);
- }
-
- /**
- * Performs a deep copy on <i>other</i>.
- */
- public TSentrySyncIDResponse(TSentrySyncIDResponse other) {
- __isset_bitfield = other.__isset_bitfield;
- if (other.isSetStatus()) {
- this.status = new org.apache.sentry.service.thrift.TSentryResponseStatus(other.status);
- }
- this.id = other.id;
- }
-
- public TSentrySyncIDResponse deepCopy() {
- return new TSentrySyncIDResponse(this);
- }
-
- @Override
- public void clear() {
- this.status = null;
- setIdIsSet(false);
- this.id = 0;
- }
-
- public org.apache.sentry.service.thrift.TSentryResponseStatus getStatus() {
- return this.status;
- }
-
- public void setStatus(org.apache.sentry.service.thrift.TSentryResponseStatus status) {
- this.status = status;
- }
-
- public void unsetStatus() {
- this.status = null;
- }
-
- /** Returns true if field status is set (has been assigned a value) and false otherwise */
- public boolean isSetStatus() {
- return this.status != null;
- }
-
- public void setStatusIsSet(boolean value) {
- if (!value) {
- this.status = null;
- }
- }
-
- public long getId() {
- return this.id;
- }
-
- public void setId(long id) {
- this.id = id;
- setIdIsSet(true);
- }
-
- public void unsetId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
- }
-
- /** Returns true if field id is set (has been assigned a value) and false otherwise */
- public boolean isSetId() {
- return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
- }
-
- public void setIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
- }
-
- public void setFieldValue(_Fields field, Object value) {
- switch (field) {
- case STATUS:
- if (value == null) {
- unsetStatus();
- } else {
- setStatus((org.apache.sentry.service.thrift.TSentryResponseStatus)value);
- }
- break;
-
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Long)value);
- }
- break;
-
- }
- }
-
- public Object getFieldValue(_Fields field) {
- switch (field) {
- case STATUS:
- return getStatus();
-
- case ID:
- return getId();
-
- }
- throw new IllegalStateException();
- }
-
- /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
- public boolean isSet(_Fields field) {
- if (field == null) {
- throw new IllegalArgumentException();
- }
-
- switch (field) {
- case STATUS:
- return isSetStatus();
- case ID:
- return isSetId();
- }
- throw new IllegalStateException();
- }
-
- @Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
- if (that instanceof TSentrySyncIDResponse)
- return this.equals((TSentrySyncIDResponse)that);
- return false;
- }
-
- public boolean equals(TSentrySyncIDResponse that) {
- if (that == null)
- return false;
-
- boolean this_present_status = true && this.isSetStatus();
- boolean that_present_status = true && that.isSetStatus();
- if (this_present_status || that_present_status) {
- if (!(this_present_status && that_present_status))
- return false;
- if (!this.status.equals(that.status))
- return false;
- }
-
- boolean this_present_id = true;
- boolean that_present_id = true;
- if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id))
- return false;
- if (this.id != that.id)
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_status = true && (isSetStatus());
- list.add(present_status);
- if (present_status)
- list.add(status);
-
- boolean present_id = true;
- list.add(present_id);
- if (present_id)
- list.add(id);
-
- return list.hashCode();
- }
-
- @Override
- public int compareTo(TSentrySyncIDResponse other) {
- if (!getClass().equals(other.getClass())) {
- return getClass().getName().compareTo(other.getClass().getName());
- }
-
- int lastComparison = 0;
-
- lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetStatus()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetId()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
- return 0;
- }
-
- public _Fields fieldForId(int fieldId) {
- return _Fields.findByThriftId(fieldId);
- }
-
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TSentrySyncIDResponse(");
- boolean first = true;
-
- sb.append("status:");
- if (this.status == null) {
- sb.append("null");
- } else {
- sb.append(this.status);
- }
- first = false;
- if (!first) sb.append(", ");
- sb.append("id:");
- sb.append(this.id);
- first = false;
- sb.append(")");
- return sb.toString();
- }
-
- public void validate() throws org.apache.thrift.TException {
- // check for required fields
- if (!isSetStatus()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
- }
-
- if (!isSetId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
- }
-
- // check for sub-struct validity
- if (status != null) {
- status.validate();
- }
- }
-
- private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
- try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
- try {
- // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
- __isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
- } catch (org.apache.thrift.TException te) {
- throw new java.io.IOException(te);
- }
- }
-
- private static class TSentrySyncIDResponseStandardSchemeFactory implements SchemeFactory {
- public TSentrySyncIDResponseStandardScheme getScheme() {
- return new TSentrySyncIDResponseStandardScheme();
- }
- }
-
- private static class TSentrySyncIDResponseStandardScheme extends StandardScheme<TSentrySyncIDResponse> {
-
- public void read(org.apache.thrift.protocol.TProtocol iprot, TSentrySyncIDResponse struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TField schemeField;
- iprot.readStructBegin();
- while (true)
- {
- schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (schemeField.id) {
- case 1: // STATUS
- if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
- struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus();
- struct.status.read(iprot);
- struct.setStatusIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- case 2: // ID
- if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
- struct.id = iprot.readI64();
- struct.setIdIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- struct.validate();
- }
-
- public void write(org.apache.thrift.protocol.TProtocol oprot, TSentrySyncIDResponse struct) throws org.apache.thrift.TException {
- struct.validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (struct.status != null) {
- oprot.writeFieldBegin(STATUS_FIELD_DESC);
- struct.status.write(oprot);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(ID_FIELD_DESC);
- oprot.writeI64(struct.id);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
- }
-
- }
-
- private static class TSentrySyncIDResponseTupleSchemeFactory implements SchemeFactory {
- public TSentrySyncIDResponseTupleScheme getScheme() {
- return new TSentrySyncIDResponseTupleScheme();
- }
- }
-
- private static class TSentrySyncIDResponseTupleScheme extends TupleScheme<TSentrySyncIDResponse> {
-
- @Override
- public void write(org.apache.thrift.protocol.TProtocol prot, TSentrySyncIDResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- struct.status.write(oprot);
- oprot.writeI64(struct.id);
- }
-
- @Override
- public void read(org.apache.thrift.protocol.TProtocol prot, TSentrySyncIDResponse struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- struct.status = new org.apache.sentry.service.thrift.TSentryResponseStatus();
- struct.status.read(iprot);
- struct.setStatusIsSet(true);
- struct.id = iprot.readI64();
- struct.setIdIsSet(true);
- }
- }
-
-}
-