You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by vi...@apache.org on 2018/10/07 22:47:49 UTC
[13/13] hive git commit: HIVE-20306 : Implement projection spec for
fetching only requested fields from partitions (Vihang Karajgaonkar,
reviewed by Aihua Xu, Andrew Sherman and Alexander Kolbasov)
HIVE-20306 : Implement projection spec for fetching only requested fields from partitions (Vihang Karajgaonkar, reviewed by Aihua Xu, Andrew Sherman and Alexander Kolbasov)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/44ef91a6
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/44ef91a6
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/44ef91a6
Branch: refs/heads/master
Commit: 44ef91a67c8493dbb7bae13ddc1c208473cb093f
Parents: 827f4f9
Author: Vihang Karajgaonkar <vi...@apache.org>
Authored: Sun Oct 7 15:37:25 2018 -0700
Committer: Vihang Karajgaonkar <vi...@apache.org>
Committed: Sun Oct 7 15:37:31 2018 -0700
----------------------------------------------------------------------
.../listener/DummyRawStoreFailEvent.java | 9 +
.../metastore/api/GetPartitionsFilterSpec.java | 560 +
.../api/GetPartitionsProjectionSpec.java | 652 +
.../metastore/api/GetPartitionsRequest.java | 1188 ++
.../metastore/api/GetPartitionsResponse.java | 449 +
.../hive/metastore/api/PartitionFilterMode.java | 48 +
.../hive/metastore/api/ThriftHiveMetastore.java | 4027 ++++--
.../gen-php/metastore/ThriftHiveMetastore.php | 1613 ++-
.../src/gen/thrift/gen-php/metastore/Types.php | 657 +
.../hive_metastore/ThriftHiveMetastore-remote | 7 +
.../hive_metastore/ThriftHiveMetastore.py | 1132 +-
.../gen/thrift/gen-py/hive_metastore/ttypes.py | 448 +
.../gen/thrift/gen-rb/hive_metastore_types.rb | 95 +
.../gen/thrift/gen-rb/thrift_hive_metastore.rb | 61 +
.../hive/metastore/HiveMetaStoreClient.java | 6 +
.../hadoop/hive/metastore/IMetaStoreClient.java | 21 +
.../hive/metastore/utils/MetaStoreUtils.java | 5 +
.../src/main/thrift/hive_metastore.thrift | 64 +
.../hadoop/hive/metastore/HiveMetaStore.java | 165 +-
.../hive/metastore/MetaStoreDirectSql.java | 741 +-
.../hive/metastore/MetaStoreDirectSql.java.orig | 2845 ++++
.../hive/metastore/MetastoreDirectSqlUtils.java | 571 +
.../hadoop/hive/metastore/ObjectStore.java | 140 +-
.../hadoop/hive/metastore/ObjectStore.java.orig | 12514 +++++++++++++++++
.../metastore/PartitionProjectionEvaluator.java | 889 ++
.../apache/hadoop/hive/metastore/RawStore.java | 38 +
.../hive/metastore/StatObjectConverter.java | 153 +-
.../hive/metastore/cache/CachedStore.java | 13 +
.../hadoop/hive/metastore/model/MSerDeInfo.java | 3 +
.../metastore/model/MStorageDescriptor.java | 9 +-
.../metastore/utils/MetaStoreServerUtils.java | 282 +-
.../DummyRawStoreControlledCommit.java | 39 +-
.../DummyRawStoreForJdoConnection.java | 7 +
.../HiveMetaStoreClientPreCatalog.java | 6 +
.../TestGetPartitionsUsingProjection.java | 700 +
.../hive/metastore/TestHiveMetaStore.java | 141 +-
.../TestPartitionProjectionEvaluator.java | 250 +
.../utils/TestMetaStoreServerUtils.java | 356 +-
38 files changed, 27522 insertions(+), 3382 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/44ef91a6/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
----------------------------------------------------------------------
diff --git a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
index 0ad2a24..d59d5d8 100644
--- a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
+++ b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/DummyRawStoreFailEvent.java
@@ -413,6 +413,15 @@ public class DummyRawStoreFailEvent implements RawStore, Configurable {
}
@Override
+ public List<Partition> getPartitionSpecsByFilterAndProjection(String catalog,
+ String dbName, String tblName,
+ List<String> fieldList, String includeParamKeyPattern,
+ String excludeParamKeyPattern) throws MetaException, NoSuchObjectException {
+ return objectStore.getPartitionSpecsByFilterAndProjection(catalog, dbName, tblName, fieldList,
+ includeParamKeyPattern, excludeParamKeyPattern);
+ }
+
+ @Override
public int getNumPartitionsByFilter(String catName, String dbName, String tblName,
String filter) throws MetaException, NoSuchObjectException {
return objectStore.getNumPartitionsByFilter(catName, dbName, tblName, filter);
http://git-wip-us.apache.org/repos/asf/hive/blob/44ef91a6/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsFilterSpec.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsFilterSpec.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsFilterSpec.java
new file mode 100644
index 0000000..57511ce
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsFilterSpec.java
@@ -0,0 +1,560 @@
+/**
+ * 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.hadoop.hive.metastore.api;
+
+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)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class GetPartitionsFilterSpec implements org.apache.thrift.TBase<GetPartitionsFilterSpec, GetPartitionsFilterSpec._Fields>, java.io.Serializable, Cloneable, Comparable<GetPartitionsFilterSpec> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPartitionsFilterSpec");
+
+ private static final org.apache.thrift.protocol.TField FILTER_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("filterMode", org.apache.thrift.protocol.TType.I32, (short)7);
+ private static final org.apache.thrift.protocol.TField FILTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("filters", org.apache.thrift.protocol.TType.LIST, (short)8);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetPartitionsFilterSpecStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetPartitionsFilterSpecTupleSchemeFactory());
+ }
+
+ private PartitionFilterMode filterMode; // optional
+ private List<String> filters; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ *
+ * @see PartitionFilterMode
+ */
+ FILTER_MODE((short)7, "filterMode"),
+ FILTERS((short)8, "filters");
+
+ 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 7: // FILTER_MODE
+ return FILTER_MODE;
+ case 8: // FILTERS
+ return FILTERS;
+ 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 _Fields optionals[] = {_Fields.FILTER_MODE,_Fields.FILTERS};
+ 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.FILTER_MODE, new org.apache.thrift.meta_data.FieldMetaData("filterMode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PartitionFilterMode.class)));
+ tmpMap.put(_Fields.FILTERS, new org.apache.thrift.meta_data.FieldMetaData("filters", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPartitionsFilterSpec.class, metaDataMap);
+ }
+
+ public GetPartitionsFilterSpec() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetPartitionsFilterSpec(GetPartitionsFilterSpec other) {
+ if (other.isSetFilterMode()) {
+ this.filterMode = other.filterMode;
+ }
+ if (other.isSetFilters()) {
+ List<String> __this__filters = new ArrayList<String>(other.filters);
+ this.filters = __this__filters;
+ }
+ }
+
+ public GetPartitionsFilterSpec deepCopy() {
+ return new GetPartitionsFilterSpec(this);
+ }
+
+ @Override
+ public void clear() {
+ this.filterMode = null;
+ this.filters = null;
+ }
+
+ /**
+ *
+ * @see PartitionFilterMode
+ */
+ public PartitionFilterMode getFilterMode() {
+ return this.filterMode;
+ }
+
+ /**
+ *
+ * @see PartitionFilterMode
+ */
+ public void setFilterMode(PartitionFilterMode filterMode) {
+ this.filterMode = filterMode;
+ }
+
+ public void unsetFilterMode() {
+ this.filterMode = null;
+ }
+
+ /** Returns true if field filterMode is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilterMode() {
+ return this.filterMode != null;
+ }
+
+ public void setFilterModeIsSet(boolean value) {
+ if (!value) {
+ this.filterMode = null;
+ }
+ }
+
+ public int getFiltersSize() {
+ return (this.filters == null) ? 0 : this.filters.size();
+ }
+
+ public java.util.Iterator<String> getFiltersIterator() {
+ return (this.filters == null) ? null : this.filters.iterator();
+ }
+
+ public void addToFilters(String elem) {
+ if (this.filters == null) {
+ this.filters = new ArrayList<String>();
+ }
+ this.filters.add(elem);
+ }
+
+ public List<String> getFilters() {
+ return this.filters;
+ }
+
+ public void setFilters(List<String> filters) {
+ this.filters = filters;
+ }
+
+ public void unsetFilters() {
+ this.filters = null;
+ }
+
+ /** Returns true if field filters is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilters() {
+ return this.filters != null;
+ }
+
+ public void setFiltersIsSet(boolean value) {
+ if (!value) {
+ this.filters = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FILTER_MODE:
+ if (value == null) {
+ unsetFilterMode();
+ } else {
+ setFilterMode((PartitionFilterMode)value);
+ }
+ break;
+
+ case FILTERS:
+ if (value == null) {
+ unsetFilters();
+ } else {
+ setFilters((List<String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FILTER_MODE:
+ return getFilterMode();
+
+ case FILTERS:
+ return getFilters();
+
+ }
+ 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 FILTER_MODE:
+ return isSetFilterMode();
+ case FILTERS:
+ return isSetFilters();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetPartitionsFilterSpec)
+ return this.equals((GetPartitionsFilterSpec)that);
+ return false;
+ }
+
+ public boolean equals(GetPartitionsFilterSpec that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_filterMode = true && this.isSetFilterMode();
+ boolean that_present_filterMode = true && that.isSetFilterMode();
+ if (this_present_filterMode || that_present_filterMode) {
+ if (!(this_present_filterMode && that_present_filterMode))
+ return false;
+ if (!this.filterMode.equals(that.filterMode))
+ return false;
+ }
+
+ boolean this_present_filters = true && this.isSetFilters();
+ boolean that_present_filters = true && that.isSetFilters();
+ if (this_present_filters || that_present_filters) {
+ if (!(this_present_filters && that_present_filters))
+ return false;
+ if (!this.filters.equals(that.filters))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_filterMode = true && (isSetFilterMode());
+ list.add(present_filterMode);
+ if (present_filterMode)
+ list.add(filterMode.getValue());
+
+ boolean present_filters = true && (isSetFilters());
+ list.add(present_filters);
+ if (present_filters)
+ list.add(filters);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GetPartitionsFilterSpec other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetFilterMode()).compareTo(other.isSetFilterMode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilterMode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterMode, other.filterMode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFilters()).compareTo(other.isSetFilters());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilters()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filters, other.filters);
+ 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("GetPartitionsFilterSpec(");
+ boolean first = true;
+
+ if (isSetFilterMode()) {
+ sb.append("filterMode:");
+ if (this.filterMode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.filterMode);
+ }
+ first = false;
+ }
+ if (isSetFilters()) {
+ if (!first) sb.append(", ");
+ sb.append("filters:");
+ if (this.filters == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.filters);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // 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 GetPartitionsFilterSpecStandardSchemeFactory implements SchemeFactory {
+ public GetPartitionsFilterSpecStandardScheme getScheme() {
+ return new GetPartitionsFilterSpecStandardScheme();
+ }
+ }
+
+ private static class GetPartitionsFilterSpecStandardScheme extends StandardScheme<GetPartitionsFilterSpec> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPartitionsFilterSpec 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 7: // FILTER_MODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.filterMode = org.apache.hadoop.hive.metastore.api.PartitionFilterMode.findByValue(iprot.readI32());
+ struct.setFilterModeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // FILTERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list976 = iprot.readListBegin();
+ struct.filters = new ArrayList<String>(_list976.size);
+ String _elem977;
+ for (int _i978 = 0; _i978 < _list976.size; ++_i978)
+ {
+ _elem977 = iprot.readString();
+ struct.filters.add(_elem977);
+ }
+ iprot.readListEnd();
+ }
+ struct.setFiltersIsSet(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, GetPartitionsFilterSpec struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.filterMode != null) {
+ if (struct.isSetFilterMode()) {
+ oprot.writeFieldBegin(FILTER_MODE_FIELD_DESC);
+ oprot.writeI32(struct.filterMode.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.filters != null) {
+ if (struct.isSetFilters()) {
+ oprot.writeFieldBegin(FILTERS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filters.size()));
+ for (String _iter979 : struct.filters)
+ {
+ oprot.writeString(_iter979);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetPartitionsFilterSpecTupleSchemeFactory implements SchemeFactory {
+ public GetPartitionsFilterSpecTupleScheme getScheme() {
+ return new GetPartitionsFilterSpecTupleScheme();
+ }
+ }
+
+ private static class GetPartitionsFilterSpecTupleScheme extends TupleScheme<GetPartitionsFilterSpec> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetPartitionsFilterSpec struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetFilterMode()) {
+ optionals.set(0);
+ }
+ if (struct.isSetFilters()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetFilterMode()) {
+ oprot.writeI32(struct.filterMode.getValue());
+ }
+ if (struct.isSetFilters()) {
+ {
+ oprot.writeI32(struct.filters.size());
+ for (String _iter980 : struct.filters)
+ {
+ oprot.writeString(_iter980);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetPartitionsFilterSpec struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.filterMode = org.apache.hadoop.hive.metastore.api.PartitionFilterMode.findByValue(iprot.readI32());
+ struct.setFilterModeIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TList _list981 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.filters = new ArrayList<String>(_list981.size);
+ String _elem982;
+ for (int _i983 = 0; _i983 < _list981.size; ++_i983)
+ {
+ _elem982 = iprot.readString();
+ struct.filters.add(_elem982);
+ }
+ }
+ struct.setFiltersIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/44ef91a6/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsProjectionSpec.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsProjectionSpec.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsProjectionSpec.java
new file mode 100644
index 0000000..bf7b6b7
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsProjectionSpec.java
@@ -0,0 +1,652 @@
+/**
+ * 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.hadoop.hive.metastore.api;
+
+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)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class GetPartitionsProjectionSpec implements org.apache.thrift.TBase<GetPartitionsProjectionSpec, GetPartitionsProjectionSpec._Fields>, java.io.Serializable, Cloneable, Comparable<GetPartitionsProjectionSpec> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPartitionsProjectionSpec");
+
+ private static final org.apache.thrift.protocol.TField FIELD_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("fieldList", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField INCLUDE_PARAM_KEY_PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("includeParamKeyPattern", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField EXCLUDE_PARAM_KEY_PATTERN_FIELD_DESC = new org.apache.thrift.protocol.TField("excludeParamKeyPattern", 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 GetPartitionsProjectionSpecStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetPartitionsProjectionSpecTupleSchemeFactory());
+ }
+
+ private List<String> fieldList; // required
+ private String includeParamKeyPattern; // required
+ private String excludeParamKeyPattern; // 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 {
+ FIELD_LIST((short)1, "fieldList"),
+ INCLUDE_PARAM_KEY_PATTERN((short)2, "includeParamKeyPattern"),
+ EXCLUDE_PARAM_KEY_PATTERN((short)3, "excludeParamKeyPattern");
+
+ 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: // FIELD_LIST
+ return FIELD_LIST;
+ case 2: // INCLUDE_PARAM_KEY_PATTERN
+ return INCLUDE_PARAM_KEY_PATTERN;
+ case 3: // EXCLUDE_PARAM_KEY_PATTERN
+ return EXCLUDE_PARAM_KEY_PATTERN;
+ 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.FIELD_LIST, new org.apache.thrift.meta_data.FieldMetaData("fieldList", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.INCLUDE_PARAM_KEY_PATTERN, new org.apache.thrift.meta_data.FieldMetaData("includeParamKeyPattern", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.EXCLUDE_PARAM_KEY_PATTERN, new org.apache.thrift.meta_data.FieldMetaData("excludeParamKeyPattern", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPartitionsProjectionSpec.class, metaDataMap);
+ }
+
+ public GetPartitionsProjectionSpec() {
+ }
+
+ public GetPartitionsProjectionSpec(
+ List<String> fieldList,
+ String includeParamKeyPattern,
+ String excludeParamKeyPattern)
+ {
+ this();
+ this.fieldList = fieldList;
+ this.includeParamKeyPattern = includeParamKeyPattern;
+ this.excludeParamKeyPattern = excludeParamKeyPattern;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetPartitionsProjectionSpec(GetPartitionsProjectionSpec other) {
+ if (other.isSetFieldList()) {
+ List<String> __this__fieldList = new ArrayList<String>(other.fieldList);
+ this.fieldList = __this__fieldList;
+ }
+ if (other.isSetIncludeParamKeyPattern()) {
+ this.includeParamKeyPattern = other.includeParamKeyPattern;
+ }
+ if (other.isSetExcludeParamKeyPattern()) {
+ this.excludeParamKeyPattern = other.excludeParamKeyPattern;
+ }
+ }
+
+ public GetPartitionsProjectionSpec deepCopy() {
+ return new GetPartitionsProjectionSpec(this);
+ }
+
+ @Override
+ public void clear() {
+ this.fieldList = null;
+ this.includeParamKeyPattern = null;
+ this.excludeParamKeyPattern = null;
+ }
+
+ public int getFieldListSize() {
+ return (this.fieldList == null) ? 0 : this.fieldList.size();
+ }
+
+ public java.util.Iterator<String> getFieldListIterator() {
+ return (this.fieldList == null) ? null : this.fieldList.iterator();
+ }
+
+ public void addToFieldList(String elem) {
+ if (this.fieldList == null) {
+ this.fieldList = new ArrayList<String>();
+ }
+ this.fieldList.add(elem);
+ }
+
+ public List<String> getFieldList() {
+ return this.fieldList;
+ }
+
+ public void setFieldList(List<String> fieldList) {
+ this.fieldList = fieldList;
+ }
+
+ public void unsetFieldList() {
+ this.fieldList = null;
+ }
+
+ /** Returns true if field fieldList is set (has been assigned a value) and false otherwise */
+ public boolean isSetFieldList() {
+ return this.fieldList != null;
+ }
+
+ public void setFieldListIsSet(boolean value) {
+ if (!value) {
+ this.fieldList = null;
+ }
+ }
+
+ public String getIncludeParamKeyPattern() {
+ return this.includeParamKeyPattern;
+ }
+
+ public void setIncludeParamKeyPattern(String includeParamKeyPattern) {
+ this.includeParamKeyPattern = includeParamKeyPattern;
+ }
+
+ public void unsetIncludeParamKeyPattern() {
+ this.includeParamKeyPattern = null;
+ }
+
+ /** Returns true if field includeParamKeyPattern is set (has been assigned a value) and false otherwise */
+ public boolean isSetIncludeParamKeyPattern() {
+ return this.includeParamKeyPattern != null;
+ }
+
+ public void setIncludeParamKeyPatternIsSet(boolean value) {
+ if (!value) {
+ this.includeParamKeyPattern = null;
+ }
+ }
+
+ public String getExcludeParamKeyPattern() {
+ return this.excludeParamKeyPattern;
+ }
+
+ public void setExcludeParamKeyPattern(String excludeParamKeyPattern) {
+ this.excludeParamKeyPattern = excludeParamKeyPattern;
+ }
+
+ public void unsetExcludeParamKeyPattern() {
+ this.excludeParamKeyPattern = null;
+ }
+
+ /** Returns true if field excludeParamKeyPattern is set (has been assigned a value) and false otherwise */
+ public boolean isSetExcludeParamKeyPattern() {
+ return this.excludeParamKeyPattern != null;
+ }
+
+ public void setExcludeParamKeyPatternIsSet(boolean value) {
+ if (!value) {
+ this.excludeParamKeyPattern = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case FIELD_LIST:
+ if (value == null) {
+ unsetFieldList();
+ } else {
+ setFieldList((List<String>)value);
+ }
+ break;
+
+ case INCLUDE_PARAM_KEY_PATTERN:
+ if (value == null) {
+ unsetIncludeParamKeyPattern();
+ } else {
+ setIncludeParamKeyPattern((String)value);
+ }
+ break;
+
+ case EXCLUDE_PARAM_KEY_PATTERN:
+ if (value == null) {
+ unsetExcludeParamKeyPattern();
+ } else {
+ setExcludeParamKeyPattern((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case FIELD_LIST:
+ return getFieldList();
+
+ case INCLUDE_PARAM_KEY_PATTERN:
+ return getIncludeParamKeyPattern();
+
+ case EXCLUDE_PARAM_KEY_PATTERN:
+ return getExcludeParamKeyPattern();
+
+ }
+ 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 FIELD_LIST:
+ return isSetFieldList();
+ case INCLUDE_PARAM_KEY_PATTERN:
+ return isSetIncludeParamKeyPattern();
+ case EXCLUDE_PARAM_KEY_PATTERN:
+ return isSetExcludeParamKeyPattern();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetPartitionsProjectionSpec)
+ return this.equals((GetPartitionsProjectionSpec)that);
+ return false;
+ }
+
+ public boolean equals(GetPartitionsProjectionSpec that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_fieldList = true && this.isSetFieldList();
+ boolean that_present_fieldList = true && that.isSetFieldList();
+ if (this_present_fieldList || that_present_fieldList) {
+ if (!(this_present_fieldList && that_present_fieldList))
+ return false;
+ if (!this.fieldList.equals(that.fieldList))
+ return false;
+ }
+
+ boolean this_present_includeParamKeyPattern = true && this.isSetIncludeParamKeyPattern();
+ boolean that_present_includeParamKeyPattern = true && that.isSetIncludeParamKeyPattern();
+ if (this_present_includeParamKeyPattern || that_present_includeParamKeyPattern) {
+ if (!(this_present_includeParamKeyPattern && that_present_includeParamKeyPattern))
+ return false;
+ if (!this.includeParamKeyPattern.equals(that.includeParamKeyPattern))
+ return false;
+ }
+
+ boolean this_present_excludeParamKeyPattern = true && this.isSetExcludeParamKeyPattern();
+ boolean that_present_excludeParamKeyPattern = true && that.isSetExcludeParamKeyPattern();
+ if (this_present_excludeParamKeyPattern || that_present_excludeParamKeyPattern) {
+ if (!(this_present_excludeParamKeyPattern && that_present_excludeParamKeyPattern))
+ return false;
+ if (!this.excludeParamKeyPattern.equals(that.excludeParamKeyPattern))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_fieldList = true && (isSetFieldList());
+ list.add(present_fieldList);
+ if (present_fieldList)
+ list.add(fieldList);
+
+ boolean present_includeParamKeyPattern = true && (isSetIncludeParamKeyPattern());
+ list.add(present_includeParamKeyPattern);
+ if (present_includeParamKeyPattern)
+ list.add(includeParamKeyPattern);
+
+ boolean present_excludeParamKeyPattern = true && (isSetExcludeParamKeyPattern());
+ list.add(present_excludeParamKeyPattern);
+ if (present_excludeParamKeyPattern)
+ list.add(excludeParamKeyPattern);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GetPartitionsProjectionSpec other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetFieldList()).compareTo(other.isSetFieldList());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFieldList()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fieldList, other.fieldList);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetIncludeParamKeyPattern()).compareTo(other.isSetIncludeParamKeyPattern());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetIncludeParamKeyPattern()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.includeParamKeyPattern, other.includeParamKeyPattern);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetExcludeParamKeyPattern()).compareTo(other.isSetExcludeParamKeyPattern());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetExcludeParamKeyPattern()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.excludeParamKeyPattern, other.excludeParamKeyPattern);
+ 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("GetPartitionsProjectionSpec(");
+ boolean first = true;
+
+ sb.append("fieldList:");
+ if (this.fieldList == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.fieldList);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("includeParamKeyPattern:");
+ if (this.includeParamKeyPattern == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.includeParamKeyPattern);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("excludeParamKeyPattern:");
+ if (this.excludeParamKeyPattern == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.excludeParamKeyPattern);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // 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 GetPartitionsProjectionSpecStandardSchemeFactory implements SchemeFactory {
+ public GetPartitionsProjectionSpecStandardScheme getScheme() {
+ return new GetPartitionsProjectionSpecStandardScheme();
+ }
+ }
+
+ private static class GetPartitionsProjectionSpecStandardScheme extends StandardScheme<GetPartitionsProjectionSpec> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPartitionsProjectionSpec 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: // FIELD_LIST
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list968 = iprot.readListBegin();
+ struct.fieldList = new ArrayList<String>(_list968.size);
+ String _elem969;
+ for (int _i970 = 0; _i970 < _list968.size; ++_i970)
+ {
+ _elem969 = iprot.readString();
+ struct.fieldList.add(_elem969);
+ }
+ iprot.readListEnd();
+ }
+ struct.setFieldListIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // INCLUDE_PARAM_KEY_PATTERN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.includeParamKeyPattern = iprot.readString();
+ struct.setIncludeParamKeyPatternIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // EXCLUDE_PARAM_KEY_PATTERN
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.excludeParamKeyPattern = iprot.readString();
+ struct.setExcludeParamKeyPatternIsSet(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, GetPartitionsProjectionSpec struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.fieldList != null) {
+ oprot.writeFieldBegin(FIELD_LIST_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.fieldList.size()));
+ for (String _iter971 : struct.fieldList)
+ {
+ oprot.writeString(_iter971);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.includeParamKeyPattern != null) {
+ oprot.writeFieldBegin(INCLUDE_PARAM_KEY_PATTERN_FIELD_DESC);
+ oprot.writeString(struct.includeParamKeyPattern);
+ oprot.writeFieldEnd();
+ }
+ if (struct.excludeParamKeyPattern != null) {
+ oprot.writeFieldBegin(EXCLUDE_PARAM_KEY_PATTERN_FIELD_DESC);
+ oprot.writeString(struct.excludeParamKeyPattern);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetPartitionsProjectionSpecTupleSchemeFactory implements SchemeFactory {
+ public GetPartitionsProjectionSpecTupleScheme getScheme() {
+ return new GetPartitionsProjectionSpecTupleScheme();
+ }
+ }
+
+ private static class GetPartitionsProjectionSpecTupleScheme extends TupleScheme<GetPartitionsProjectionSpec> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetPartitionsProjectionSpec struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetFieldList()) {
+ optionals.set(0);
+ }
+ if (struct.isSetIncludeParamKeyPattern()) {
+ optionals.set(1);
+ }
+ if (struct.isSetExcludeParamKeyPattern()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetFieldList()) {
+ {
+ oprot.writeI32(struct.fieldList.size());
+ for (String _iter972 : struct.fieldList)
+ {
+ oprot.writeString(_iter972);
+ }
+ }
+ }
+ if (struct.isSetIncludeParamKeyPattern()) {
+ oprot.writeString(struct.includeParamKeyPattern);
+ }
+ if (struct.isSetExcludeParamKeyPattern()) {
+ oprot.writeString(struct.excludeParamKeyPattern);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetPartitionsProjectionSpec struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list973 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.fieldList = new ArrayList<String>(_list973.size);
+ String _elem974;
+ for (int _i975 = 0; _i975 < _list973.size; ++_i975)
+ {
+ _elem974 = iprot.readString();
+ struct.fieldList.add(_elem974);
+ }
+ }
+ struct.setFieldListIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.includeParamKeyPattern = iprot.readString();
+ struct.setIncludeParamKeyPatternIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.excludeParamKeyPattern = iprot.readString();
+ struct.setExcludeParamKeyPatternIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/44ef91a6/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsRequest.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsRequest.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsRequest.java
new file mode 100644
index 0000000..6aa8de8
--- /dev/null
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPartitionsRequest.java
@@ -0,0 +1,1188 @@
+/**
+ * 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.hadoop.hive.metastore.api;
+
+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)")
+@org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class GetPartitionsRequest implements org.apache.thrift.TBase<GetPartitionsRequest, GetPartitionsRequest._Fields>, java.io.Serializable, Cloneable, Comparable<GetPartitionsRequest> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPartitionsRequest");
+
+ private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField TBL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tblName", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField WITH_AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("withAuth", org.apache.thrift.protocol.TType.BOOL, (short)4);
+ private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)5);
+ private static final org.apache.thrift.protocol.TField GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("groupNames", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField PROJECTION_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("projectionSpec", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField FILTER_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("filterSpec", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetPartitionsRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetPartitionsRequestTupleSchemeFactory());
+ }
+
+ private String catName; // optional
+ private String dbName; // required
+ private String tblName; // required
+ private boolean withAuth; // optional
+ private String user; // optional
+ private List<String> groupNames; // optional
+ private GetPartitionsProjectionSpec projectionSpec; // required
+ private GetPartitionsFilterSpec filterSpec; // 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 {
+ CAT_NAME((short)1, "catName"),
+ DB_NAME((short)2, "dbName"),
+ TBL_NAME((short)3, "tblName"),
+ WITH_AUTH((short)4, "withAuth"),
+ USER((short)5, "user"),
+ GROUP_NAMES((short)6, "groupNames"),
+ PROJECTION_SPEC((short)7, "projectionSpec"),
+ FILTER_SPEC((short)8, "filterSpec");
+
+ 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: // CAT_NAME
+ return CAT_NAME;
+ case 2: // DB_NAME
+ return DB_NAME;
+ case 3: // TBL_NAME
+ return TBL_NAME;
+ case 4: // WITH_AUTH
+ return WITH_AUTH;
+ case 5: // USER
+ return USER;
+ case 6: // GROUP_NAMES
+ return GROUP_NAMES;
+ case 7: // PROJECTION_SPEC
+ return PROJECTION_SPEC;
+ case 8: // FILTER_SPEC
+ return FILTER_SPEC;
+ 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 __WITHAUTH_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.CAT_NAME,_Fields.WITH_AUTH,_Fields.USER,_Fields.GROUP_NAMES};
+ 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.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tblName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.WITH_AUTH, new org.apache.thrift.meta_data.FieldMetaData("withAuth", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("groupNames", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ tmpMap.put(_Fields.PROJECTION_SPEC, new org.apache.thrift.meta_data.FieldMetaData("projectionSpec", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPartitionsProjectionSpec.class)));
+ tmpMap.put(_Fields.FILTER_SPEC, new org.apache.thrift.meta_data.FieldMetaData("filterSpec", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetPartitionsFilterSpec.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPartitionsRequest.class, metaDataMap);
+ }
+
+ public GetPartitionsRequest() {
+ }
+
+ public GetPartitionsRequest(
+ String dbName,
+ String tblName,
+ GetPartitionsProjectionSpec projectionSpec,
+ GetPartitionsFilterSpec filterSpec)
+ {
+ this();
+ this.dbName = dbName;
+ this.tblName = tblName;
+ this.projectionSpec = projectionSpec;
+ this.filterSpec = filterSpec;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetPartitionsRequest(GetPartitionsRequest other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetCatName()) {
+ this.catName = other.catName;
+ }
+ if (other.isSetDbName()) {
+ this.dbName = other.dbName;
+ }
+ if (other.isSetTblName()) {
+ this.tblName = other.tblName;
+ }
+ this.withAuth = other.withAuth;
+ if (other.isSetUser()) {
+ this.user = other.user;
+ }
+ if (other.isSetGroupNames()) {
+ List<String> __this__groupNames = new ArrayList<String>(other.groupNames);
+ this.groupNames = __this__groupNames;
+ }
+ if (other.isSetProjectionSpec()) {
+ this.projectionSpec = new GetPartitionsProjectionSpec(other.projectionSpec);
+ }
+ if (other.isSetFilterSpec()) {
+ this.filterSpec = new GetPartitionsFilterSpec(other.filterSpec);
+ }
+ }
+
+ public GetPartitionsRequest deepCopy() {
+ return new GetPartitionsRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ this.catName = null;
+ this.dbName = null;
+ this.tblName = null;
+ setWithAuthIsSet(false);
+ this.withAuth = false;
+ this.user = null;
+ this.groupNames = null;
+ this.projectionSpec = null;
+ this.filterSpec = null;
+ }
+
+ public String getCatName() {
+ return this.catName;
+ }
+
+ public void setCatName(String catName) {
+ this.catName = catName;
+ }
+
+ public void unsetCatName() {
+ this.catName = null;
+ }
+
+ /** Returns true if field catName is set (has been assigned a value) and false otherwise */
+ public boolean isSetCatName() {
+ return this.catName != null;
+ }
+
+ public void setCatNameIsSet(boolean value) {
+ if (!value) {
+ this.catName = null;
+ }
+ }
+
+ public String getDbName() {
+ return this.dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ public void unsetDbName() {
+ this.dbName = null;
+ }
+
+ /** Returns true if field dbName is set (has been assigned a value) and false otherwise */
+ public boolean isSetDbName() {
+ return this.dbName != null;
+ }
+
+ public void setDbNameIsSet(boolean value) {
+ if (!value) {
+ this.dbName = null;
+ }
+ }
+
+ public String getTblName() {
+ return this.tblName;
+ }
+
+ public void setTblName(String tblName) {
+ this.tblName = tblName;
+ }
+
+ public void unsetTblName() {
+ this.tblName = null;
+ }
+
+ /** Returns true if field tblName is set (has been assigned a value) and false otherwise */
+ public boolean isSetTblName() {
+ return this.tblName != null;
+ }
+
+ public void setTblNameIsSet(boolean value) {
+ if (!value) {
+ this.tblName = null;
+ }
+ }
+
+ public boolean isWithAuth() {
+ return this.withAuth;
+ }
+
+ public void setWithAuth(boolean withAuth) {
+ this.withAuth = withAuth;
+ setWithAuthIsSet(true);
+ }
+
+ public void unsetWithAuth() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WITHAUTH_ISSET_ID);
+ }
+
+ /** Returns true if field withAuth is set (has been assigned a value) and false otherwise */
+ public boolean isSetWithAuth() {
+ return EncodingUtils.testBit(__isset_bitfield, __WITHAUTH_ISSET_ID);
+ }
+
+ public void setWithAuthIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WITHAUTH_ISSET_ID, value);
+ }
+
+ public String getUser() {
+ return this.user;
+ }
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ public void unsetUser() {
+ this.user = null;
+ }
+
+ /** Returns true if field user is set (has been assigned a value) and false otherwise */
+ public boolean isSetUser() {
+ return this.user != null;
+ }
+
+ public void setUserIsSet(boolean value) {
+ if (!value) {
+ this.user = null;
+ }
+ }
+
+ public int getGroupNamesSize() {
+ return (this.groupNames == null) ? 0 : this.groupNames.size();
+ }
+
+ public java.util.Iterator<String> getGroupNamesIterator() {
+ return (this.groupNames == null) ? null : this.groupNames.iterator();
+ }
+
+ public void addToGroupNames(String elem) {
+ if (this.groupNames == null) {
+ this.groupNames = new ArrayList<String>();
+ }
+ this.groupNames.add(elem);
+ }
+
+ public List<String> getGroupNames() {
+ return this.groupNames;
+ }
+
+ public void setGroupNames(List<String> groupNames) {
+ this.groupNames = groupNames;
+ }
+
+ public void unsetGroupNames() {
+ this.groupNames = null;
+ }
+
+ /** Returns true if field groupNames is set (has been assigned a value) and false otherwise */
+ public boolean isSetGroupNames() {
+ return this.groupNames != null;
+ }
+
+ public void setGroupNamesIsSet(boolean value) {
+ if (!value) {
+ this.groupNames = null;
+ }
+ }
+
+ public GetPartitionsProjectionSpec getProjectionSpec() {
+ return this.projectionSpec;
+ }
+
+ public void setProjectionSpec(GetPartitionsProjectionSpec projectionSpec) {
+ this.projectionSpec = projectionSpec;
+ }
+
+ public void unsetProjectionSpec() {
+ this.projectionSpec = null;
+ }
+
+ /** Returns true if field projectionSpec is set (has been assigned a value) and false otherwise */
+ public boolean isSetProjectionSpec() {
+ return this.projectionSpec != null;
+ }
+
+ public void setProjectionSpecIsSet(boolean value) {
+ if (!value) {
+ this.projectionSpec = null;
+ }
+ }
+
+ public GetPartitionsFilterSpec getFilterSpec() {
+ return this.filterSpec;
+ }
+
+ public void setFilterSpec(GetPartitionsFilterSpec filterSpec) {
+ this.filterSpec = filterSpec;
+ }
+
+ public void unsetFilterSpec() {
+ this.filterSpec = null;
+ }
+
+ /** Returns true if field filterSpec is set (has been assigned a value) and false otherwise */
+ public boolean isSetFilterSpec() {
+ return this.filterSpec != null;
+ }
+
+ public void setFilterSpecIsSet(boolean value) {
+ if (!value) {
+ this.filterSpec = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case CAT_NAME:
+ if (value == null) {
+ unsetCatName();
+ } else {
+ setCatName((String)value);
+ }
+ break;
+
+ case DB_NAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case TBL_NAME:
+ if (value == null) {
+ unsetTblName();
+ } else {
+ setTblName((String)value);
+ }
+ break;
+
+ case WITH_AUTH:
+ if (value == null) {
+ unsetWithAuth();
+ } else {
+ setWithAuth((Boolean)value);
+ }
+ break;
+
+ case USER:
+ if (value == null) {
+ unsetUser();
+ } else {
+ setUser((String)value);
+ }
+ break;
+
+ case GROUP_NAMES:
+ if (value == null) {
+ unsetGroupNames();
+ } else {
+ setGroupNames((List<String>)value);
+ }
+ break;
+
+ case PROJECTION_SPEC:
+ if (value == null) {
+ unsetProjectionSpec();
+ } else {
+ setProjectionSpec((GetPartitionsProjectionSpec)value);
+ }
+ break;
+
+ case FILTER_SPEC:
+ if (value == null) {
+ unsetFilterSpec();
+ } else {
+ setFilterSpec((GetPartitionsFilterSpec)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case CAT_NAME:
+ return getCatName();
+
+ case DB_NAME:
+ return getDbName();
+
+ case TBL_NAME:
+ return getTblName();
+
+ case WITH_AUTH:
+ return isWithAuth();
+
+ case USER:
+ return getUser();
+
+ case GROUP_NAMES:
+ return getGroupNames();
+
+ case PROJECTION_SPEC:
+ return getProjectionSpec();
+
+ case FILTER_SPEC:
+ return getFilterSpec();
+
+ }
+ 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 CAT_NAME:
+ return isSetCatName();
+ case DB_NAME:
+ return isSetDbName();
+ case TBL_NAME:
+ return isSetTblName();
+ case WITH_AUTH:
+ return isSetWithAuth();
+ case USER:
+ return isSetUser();
+ case GROUP_NAMES:
+ return isSetGroupNames();
+ case PROJECTION_SPEC:
+ return isSetProjectionSpec();
+ case FILTER_SPEC:
+ return isSetFilterSpec();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetPartitionsRequest)
+ return this.equals((GetPartitionsRequest)that);
+ return false;
+ }
+
+ public boolean equals(GetPartitionsRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_catName = true && this.isSetCatName();
+ boolean that_present_catName = true && that.isSetCatName();
+ if (this_present_catName || that_present_catName) {
+ if (!(this_present_catName && that_present_catName))
+ return false;
+ if (!this.catName.equals(that.catName))
+ return false;
+ }
+
+ boolean this_present_dbName = true && this.isSetDbName();
+ boolean that_present_dbName = true && that.isSetDbName();
+ if (this_present_dbName || that_present_dbName) {
+ if (!(this_present_dbName && that_present_dbName))
+ return false;
+ if (!this.dbName.equals(that.dbName))
+ return false;
+ }
+
+ boolean this_present_tblName = true && this.isSetTblName();
+ boolean that_present_tblName = true && that.isSetTblName();
+ if (this_present_tblName || that_present_tblName) {
+ if (!(this_present_tblName && that_present_tblName))
+ return false;
+ if (!this.tblName.equals(that.tblName))
+ return false;
+ }
+
+ boolean this_present_withAuth = true && this.isSetWithAuth();
+ boolean that_present_withAuth = true && that.isSetWithAuth();
+ if (this_present_withAuth || that_present_withAuth) {
+ if (!(this_present_withAuth && that_present_withAuth))
+ return false;
+ if (this.withAuth != that.withAuth)
+ return false;
+ }
+
+ boolean this_present_user = true && this.isSetUser();
+ boolean that_present_user = true && that.isSetUser();
+ if (this_present_user || that_present_user) {
+ if (!(this_present_user && that_present_user))
+ return false;
+ if (!this.user.equals(that.user))
+ return false;
+ }
+
+ boolean this_present_groupNames = true && this.isSetGroupNames();
+ boolean that_present_groupNames = true && that.isSetGroupNames();
+ if (this_present_groupNames || that_present_groupNames) {
+ if (!(this_present_groupNames && that_present_groupNames))
+ return false;
+ if (!this.groupNames.equals(that.groupNames))
+ return false;
+ }
+
+ boolean this_present_projectionSpec = true && this.isSetProjectionSpec();
+ boolean that_present_projectionSpec = true && that.isSetProjectionSpec();
+ if (this_present_projectionSpec || that_present_projectionSpec) {
+ if (!(this_present_projectionSpec && that_present_projectionSpec))
+ return false;
+ if (!this.projectionSpec.equals(that.projectionSpec))
+ return false;
+ }
+
+ boolean this_present_filterSpec = true && this.isSetFilterSpec();
+ boolean that_present_filterSpec = true && that.isSetFilterSpec();
+ if (this_present_filterSpec || that_present_filterSpec) {
+ if (!(this_present_filterSpec && that_present_filterSpec))
+ return false;
+ if (!this.filterSpec.equals(that.filterSpec))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_catName = true && (isSetCatName());
+ list.add(present_catName);
+ if (present_catName)
+ list.add(catName);
+
+ boolean present_dbName = true && (isSetDbName());
+ list.add(present_dbName);
+ if (present_dbName)
+ list.add(dbName);
+
+ boolean present_tblName = true && (isSetTblName());
+ list.add(present_tblName);
+ if (present_tblName)
+ list.add(tblName);
+
+ boolean present_withAuth = true && (isSetWithAuth());
+ list.add(present_withAuth);
+ if (present_withAuth)
+ list.add(withAuth);
+
+ boolean present_user = true && (isSetUser());
+ list.add(present_user);
+ if (present_user)
+ list.add(user);
+
+ boolean present_groupNames = true && (isSetGroupNames());
+ list.add(present_groupNames);
+ if (present_groupNames)
+ list.add(groupNames);
+
+ boolean present_projectionSpec = true && (isSetProjectionSpec());
+ list.add(present_projectionSpec);
+ if (present_projectionSpec)
+ list.add(projectionSpec);
+
+ boolean present_filterSpec = true && (isSetFilterSpec());
+ list.add(present_filterSpec);
+ if (present_filterSpec)
+ list.add(filterSpec);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(GetPartitionsRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetCatName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDbName()).compareTo(other.isSetDbName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDbName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dbName, other.dbName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTblName()).compareTo(other.isSetTblName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTblName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tblName, other.tblName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWithAuth()).compareTo(other.isSetWithAuth());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWithAuth()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.withAuth, other.withAuth);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUser()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetGroupNames()).compareTo(other.isSetGroupNames());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetGroupNames()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupNames, other.groupNames);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetProjectionSpec()).compareTo(other.isSetProjectionSpec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetProjectionSpec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projectionSpec, other.projectionSpec);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetFilterSpec()).compareTo(other.isSetFilterSpec());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetFilterSpec()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterSpec, other.filterSpec);
+ 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("GetPartitionsRequest(");
+ boolean first = true;
+
+ if (isSetCatName()) {
+ sb.append("catName:");
+ if (this.catName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.catName);
+ }
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("dbName:");
+ if (this.dbName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dbName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tblName:");
+ if (this.tblName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tblName);
+ }
+ first = false;
+ if (isSetWithAuth()) {
+ if (!first) sb.append(", ");
+ sb.append("withAuth:");
+ sb.append(this.withAuth);
+ first = false;
+ }
+ if (isSetUser()) {
+ if (!first) sb.append(", ");
+ sb.append("user:");
+ if (this.user == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.user);
+ }
+ first = false;
+ }
+ if (isSetGroupNames()) {
+ if (!first) sb.append(", ");
+ sb.append("groupNames:");
+ if (this.groupNames == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.groupNames);
+ }
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("projectionSpec:");
+ if (this.projectionSpec == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.projectionSpec);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("filterSpec:");
+ if (this.filterSpec == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.filterSpec);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ if (projectionSpec != null) {
+ projectionSpec.validate();
+ }
+ if (filterSpec != null) {
+ filterSpec.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 GetPartitionsRequestStandardSchemeFactory implements SchemeFactory {
+ public GetPartitionsRequestStandardScheme getScheme() {
+ return new GetPartitionsRequestStandardScheme();
+ }
+ }
+
+ private static class GetPartitionsRequestStandardScheme extends StandardScheme<GetPartitionsRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPartitionsRequest 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: // CAT_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.catName = iprot.readString();
+ struct.setCatNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TBL_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tblName = iprot.readString();
+ struct.setTblNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // WITH_AUTH
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.withAuth = iprot.readBool();
+ struct.setWithAuthIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // USER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.user = iprot.readString();
+ struct.setUserIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // GROUP_NAMES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list992 = iprot.readListBegin();
+ struct.groupNames = new ArrayList<String>(_list992.size);
+ String _elem993;
+ for (int _i994 = 0; _i994 < _list992.size; ++_i994)
+ {
+ _elem993 = iprot.readString();
+ struct.groupNames.add(_elem993);
+ }
+ iprot.readListEnd();
+ }
+ struct.setGroupNamesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // PROJECTION_SPEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.projectionSpec = new GetPartitionsProjectionSpec();
+ struct.projectionSpec.read(iprot);
+ struct.setProjectionSpecIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // FILTER_SPEC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.filterSpec = new GetPartitionsFilterSpec();
+ struct.filterSpec.read(iprot);
+ struct.setFilterSpecIsSet(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, GetPartitionsRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.catName != null) {
+ if (struct.isSetCatName()) {
+ oprot.writeFieldBegin(CAT_NAME_FIELD_DESC);
+ oprot.writeString(struct.catName);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tblName != null) {
+ oprot.writeFieldBegin(TBL_NAME_FIELD_DESC);
+ oprot.writeString(struct.tblName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetWithAuth()) {
+ oprot.writeFieldBegin(WITH_AUTH_FIELD_DESC);
+ oprot.writeBool(struct.withAuth);
+ oprot.writeFieldEnd();
+ }
+ if (struct.user != null) {
+ if (struct.isSetUser()) {
+ oprot.writeFieldBegin(USER_FIELD_DESC);
+ oprot.writeString(struct.user);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.groupNames != null) {
+ if (struct.isSetGroupNames()) {
+ oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.groupNames.size()));
+ for (String _iter995 : struct.groupNames)
+ {
+ oprot.writeString(_iter995);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.projectionSpec != null) {
+ oprot.writeFieldBegin(PROJECTION_SPEC_FIELD_DESC);
+ struct.projectionSpec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.filterSpec != null) {
+ oprot.writeFieldBegin(FILTER_SPEC_FIELD_DESC);
+ struct.filterSpec.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetPartitionsRequestTupleSchemeFactory implements SchemeFactory {
+ public GetPartitionsRequestTupleScheme getScheme() {
+ return new GetPartitionsRequestTupleScheme();
+ }
+ }
+
+ private static class GetPartitionsRequestTupleScheme extends TupleScheme<GetPartitionsRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetPartitionsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetCatName()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDbName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetTblName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetWithAuth()) {
+ optionals.set(3);
+ }
+ if (struct.isSetUser()) {
+ optionals.set(4);
+ }
+ if (struct.isSetGroupNames()) {
+ optionals.set(5);
+ }
+ if (struct.isSetProjectionSpec()) {
+ optionals.set(6);
+ }
+ if (struct.isSetFilterSpec()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetCatName()) {
+ oprot.writeString(struct.catName);
+ }
+ if (struct.isSetDbName()) {
+ oprot.writeString(struct.dbName);
+ }
+ if (struct.isSetTblName()) {
+ oprot.writeString(struct.tblName);
+ }
+ if (struct.isSetWithAuth()) {
+ oprot.writeBool(struct.withAuth);
+ }
+ if (struct.isSetUser()) {
+ oprot.writeString(struct.user);
+ }
+ if (struct.isSetGroupNames()) {
+ {
+ oprot.writeI32(struct.groupNames.size());
+ for (String _iter996 : struct.groupNames)
+ {
+ oprot.writeString(_iter996);
+ }
+ }
+ }
+ if (struct.isSetProjectionSpec()) {
+ struct.projectionSpec.write(oprot);
+ }
+ if (struct.isSetFilterSpec()) {
+ struct.filterSpec.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetPartitionsRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ struct.catName = iprot.readString();
+ struct.setCatNameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.tblName = iprot.readString();
+ struct.setTblNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.withAuth = iprot.readBool();
+ struct.setWithAuthIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.user = iprot.readString();
+ struct.setUserIsSet(true);
+ }
+ if (incoming.get(5)) {
+ {
+ org.apache.thrift.protocol.TList _list997 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.groupNames = new ArrayList<String>(_list997.size);
+ String _elem998;
+ for (int _i999 = 0; _i999 < _list997.size; ++_i999)
+ {
+ _elem998 = iprot.readString();
+ struct.groupNames.add(_elem998);
+ }
+ }
+ struct.setGroupNamesIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.projectionSpec = new GetPartitionsProjectionSpec();
+ struct.projectionSpec.read(iprot);
+ struct.setProjectionSpecIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.filterSpec = new GetPartitionsFilterSpec();
+ struct.filterSpec.read(iprot);
+ struct.setFilterSpecIsSet(true);
+ }
+ }
+ }
+
+}
+