Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D7FBD200BE2 for ; Thu, 1 Dec 2016 02:17:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D6704160B13; Thu, 1 Dec 2016 01:17:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B7C7A160B21 for ; Thu, 1 Dec 2016 02:17:18 +0100 (CET) Received: (qmail 14021 invoked by uid 500); 1 Dec 2016 01:17:17 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 13906 invoked by uid 99); 1 Dec 2016 01:17:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2016 01:17:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 445F5E9411; Thu, 1 Dec 2016 01:17:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ekoifman@apache.org To: commits@hive.apache.org Date: Thu, 01 Dec 2016 01:17:17 -0000 Message-Id: <04e97c9cbeb240528ba2392338f13d10@git.apache.org> In-Reply-To: <9446e143ac944b41b2438bfb24db0abb@git.apache.org> References: <9446e143ac944b41b2438bfb24db0abb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/8] hive git commit: HIVE-15202 Concurrent compactions for the same partition may generate malformed folder structure (Eugene Koifman, reviewed by Wei Zheng) archived-at: Thu, 01 Dec 2016 01:17:21 -0000 http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 317da4b..d41a99c 100644 --- a/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ b/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -324,6 +324,8 @@ public class ThriftHiveMetastore { public void compact(CompactionRequest rqst) throws org.apache.thrift.TException; + public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException; + public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException; public void add_dynamic_partitions(AddDynamicPartitions rqst) throws NoSuchTxnException, TxnAbortedException, org.apache.thrift.TException; @@ -632,6 +634,8 @@ public class ThriftHiveMetastore { public void compact(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void add_dynamic_partitions(AddDynamicPartitions rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -4804,6 +4808,29 @@ public class ThriftHiveMetastore { return; } + public CompactionResponse compact2(CompactionRequest rqst) throws org.apache.thrift.TException + { + send_compact2(rqst); + return recv_compact2(); + } + + public void send_compact2(CompactionRequest rqst) throws org.apache.thrift.TException + { + compact2_args args = new compact2_args(); + args.setRqst(rqst); + sendBase("compact2", args); + } + + public CompactionResponse recv_compact2() throws org.apache.thrift.TException + { + compact2_result result = new compact2_result(); + receiveBase(result, "compact2"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "compact2 failed: unknown result"); + } + public ShowCompactResponse show_compact(ShowCompactRequest rqst) throws org.apache.thrift.TException { send_show_compact(rqst); @@ -10080,6 +10107,38 @@ public class ThriftHiveMetastore { } } + public void compact2(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + compact2_call method_call = new compact2_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class compact2_call extends org.apache.thrift.async.TAsyncMethodCall { + private CompactionRequest rqst; + public compact2_call(CompactionRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.rqst = rqst; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact2", org.apache.thrift.protocol.TMessageType.CALL, 0)); + compact2_args args = new compact2_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public CompactionResponse getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_compact2(); + } + } + public void show_compact(ShowCompactRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); show_compact_call method_call = new show_compact_call(rqst, resultHandler, this, ___protocolFactory, ___transport); @@ -10580,6 +10639,7 @@ public class ThriftHiveMetastore { processMap.put("heartbeat", new heartbeat()); processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); processMap.put("compact", new compact()); + processMap.put("compact2", new compact2()); processMap.put("show_compact", new show_compact()); processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); processMap.put("get_next_notification", new get_next_notification()); @@ -14244,6 +14304,26 @@ public class ThriftHiveMetastore { } } + public static class compact2 extends org.apache.thrift.ProcessFunction { + public compact2() { + super("compact2"); + } + + public compact2_args getEmptyArgsInstance() { + return new compact2_args(); + } + + protected boolean isOneway() { + return false; + } + + public compact2_result getResult(I iface, compact2_args args) throws org.apache.thrift.TException { + compact2_result result = new compact2_result(); + result.success = iface.compact2(args.rqst); + return result; + } + } + public static class show_compact extends org.apache.thrift.ProcessFunction { public show_compact() { super("show_compact"); @@ -14624,6 +14704,7 @@ public class ThriftHiveMetastore { processMap.put("heartbeat", new heartbeat()); processMap.put("heartbeat_txn_range", new heartbeat_txn_range()); processMap.put("compact", new compact()); + processMap.put("compact2", new compact2()); processMap.put("show_compact", new show_compact()); processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); processMap.put("get_next_notification", new get_next_notification()); @@ -23317,6 +23398,57 @@ public class ThriftHiveMetastore { } } + public static class compact2 extends org.apache.thrift.AsyncProcessFunction { + public compact2() { + super("compact2"); + } + + public compact2_args getEmptyArgsInstance() { + return new compact2_args(); + } + + public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback() { + public void onComplete(CompactionResponse o) { + compact2_result result = new compact2_result(); + result.success = o; + try { + fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + return; + } catch (Exception e) { + LOGGER.error("Exception writing to internal frame buffer", e); + } + fb.close(); + } + public void onError(Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TBase msg; + compact2_result result = new compact2_result(); + { + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + return; + } catch (Exception ex) { + LOGGER.error("Exception writing to internal frame buffer", ex); + } + fb.close(); + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, compact2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + iface.compact2(args.rqst,resultHandler); + } + } + public static class show_compact extends org.apache.thrift.AsyncProcessFunction { public show_compact() { super("show_compact"); @@ -170424,86 +170556,759 @@ public class ThriftHiveMetastore { return _fieldName; } } - - // isset id assignments + + // 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); + } + + public heartbeat_txn_range_result() { + } + + public heartbeat_txn_range_result( + HeartbeatTxnRangeResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public heartbeat_txn_range_result(heartbeat_txn_range_result other) { + if (other.isSetSuccess()) { + this.success = new HeartbeatTxnRangeResponse(other.success); + } + } + + public heartbeat_txn_range_result deepCopy() { + return new heartbeat_txn_range_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public HeartbeatTxnRangeResponse getSuccess() { + return this.success; + } + + public void setSuccess(HeartbeatTxnRangeResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((HeartbeatTxnRangeResponse)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + 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 SUCCESS: + return isSetSuccess(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof heartbeat_txn_range_result) + return this.equals((heartbeat_txn_range_result)that); + return false; + } + + public boolean equals(heartbeat_txn_range_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(heartbeat_txn_range_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + 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("heartbeat_txn_range_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + 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 (success != null) { + success.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 { + 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 heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultStandardScheme getScheme() { + return new heartbeat_txn_range_resultStandardScheme(); + } + } + + private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_result 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 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(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, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { + public heartbeat_txn_range_resultTupleScheme getScheme() { + return new heartbeat_txn_range_resultTupleScheme(); + } + } + + private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new HeartbeatTxnRangeResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + + public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + + private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + } + + private CompactionRequest rqst; // 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 { + RQST((short)1, "rqst"); + + private static final Map byName = new HashMap(); + + 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: // RQST + return RQST; + 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.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + } + + public compact_args() { + } + + public compact_args( + CompactionRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on other. + */ + public compact_args(compact_args other) { + if (other.isSetRqst()) { + this.rqst = new CompactionRequest(other.rqst); + } + } + + public compact_args deepCopy() { + return new compact_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public CompactionRequest getRqst() { + return this.rqst; + } + + public void setRqst(CompactionRequest rqst) { + this.rqst = rqst; + } + + public void unsetRqst() { + this.rqst = null; + } + + /** Returns true if field rqst is set (has been assigned a value) and false otherwise */ + public boolean isSetRqst() { + return this.rqst != null; + } + + public void setRqstIsSet(boolean value) { + if (!value) { + this.rqst = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case RQST: + if (value == null) { + unsetRqst(); + } else { + setRqst((CompactionRequest)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case RQST: + return getRqst(); + + } + 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 RQST: + return isSetRqst(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_args) + return this.equals((compact_args)that); + return false; + } + + public boolean equals(compact_args that) { + if (that == null) + return false; + + boolean this_present_rqst = true && this.isSetRqst(); + boolean that_present_rqst = true && that.isSetRqst(); + if (this_present_rqst || that_present_rqst) { + if (!(this_present_rqst && that_present_rqst)) + return false; + if (!this.rqst.equals(that.rqst)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List list = new ArrayList(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetRqst()).compareTo(other.isSetRqst()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRqst()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rqst, other.rqst); + 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("compact_args("); + boolean first = true; + + sb.append("rqst:"); + if (this.rqst == null) { + sb.append("null"); + } else { + sb.append(this.rqst); + } + 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 (rqst != null) { + rqst.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 { + 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 compact_argsStandardSchemeFactory implements SchemeFactory { + public compact_argsStandardScheme getScheme() { + return new compact_argsStandardScheme(); + } + } + + private static class compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args 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: // RQST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(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, compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.rqst != null) { + oprot.writeFieldBegin(RQST_FIELD_DESC); + struct.rqst.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_argsTupleSchemeFactory implements SchemeFactory { + public compact_argsTupleScheme getScheme() { + return new compact_argsTupleScheme(); + } + } + + private static class compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRqst()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRqst()) { + struct.rqst.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new CompactionRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + 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) { + 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; + } + } public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HeartbeatTxnRangeResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(heartbeat_txn_range_result.class, metaDataMap); - } - - public heartbeat_txn_range_result() { + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); } - public heartbeat_txn_range_result( - HeartbeatTxnRangeResponse success) - { - this(); - this.success = success; + public compact_result() { } /** * Performs a deep copy on other. */ - public heartbeat_txn_range_result(heartbeat_txn_range_result other) { - if (other.isSetSuccess()) { - this.success = new HeartbeatTxnRangeResponse(other.success); - } + public compact_result(compact_result other) { } - public heartbeat_txn_range_result deepCopy() { - return new heartbeat_txn_range_result(this); + public compact_result deepCopy() { + return new compact_result(this); } @Override public void clear() { - this.success = null; - } - - public HeartbeatTxnRangeResponse getSuccess() { - return this.success; - } - - public void setSuccess(HeartbeatTxnRangeResponse success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } } public void setFieldValue(_Fields field, Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((HeartbeatTxnRangeResponse)value); - } - break; - } } public Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return getSuccess(); - } throw new IllegalStateException(); } @@ -170515,8 +171320,6 @@ public class ThriftHiveMetastore { } switch (field) { - case SUCCESS: - return isSetSuccess(); } throw new IllegalStateException(); } @@ -170525,24 +171328,15 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof heartbeat_txn_range_result) - return this.equals((heartbeat_txn_range_result)that); + if (that instanceof compact_result) + return this.equals((compact_result)that); return false; } - public boolean equals(heartbeat_txn_range_result that) { + public boolean equals(compact_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - return true; } @@ -170550,32 +171344,17 @@ public class ThriftHiveMetastore { public int hashCode() { List list = new ArrayList(); - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - return list.hashCode(); } @Override - public int compareTo(heartbeat_txn_range_result other) { + public int compareTo(compact_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } return 0; } @@ -170593,16 +171372,9 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("heartbeat_txn_range_result("); + StringBuilder sb = new StringBuilder("compact_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; sb.append(")"); return sb.toString(); } @@ -170610,9 +171382,6 @@ public class ThriftHiveMetastore { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity - if (success != null) { - success.validate(); - } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -170631,15 +171400,15 @@ public class ThriftHiveMetastore { } } - private static class heartbeat_txn_range_resultStandardSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultStandardScheme getScheme() { - return new heartbeat_txn_range_resultStandardScheme(); + private static class compact_resultStandardSchemeFactory implements SchemeFactory { + public compact_resultStandardScheme getScheme() { + return new compact_resultStandardScheme(); } } - private static class heartbeat_txn_range_resultStandardScheme extends StandardScheme { + private static class compact_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -170649,15 +171418,6 @@ public class ThriftHiveMetastore { break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new HeartbeatTxnRangeResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -170667,65 +171427,46 @@ public class ThriftHiveMetastore { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class heartbeat_txn_range_resultTupleSchemeFactory implements SchemeFactory { - public heartbeat_txn_range_resultTupleScheme getScheme() { - return new heartbeat_txn_range_resultTupleScheme(); + private static class compact_resultTupleSchemeFactory implements SchemeFactory { + public compact_resultTupleScheme getScheme() { + return new compact_resultTupleScheme(); } } - private static class heartbeat_txn_range_resultTupleScheme extends TupleScheme { + private static class compact_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, heartbeat_txn_range_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.success = new HeartbeatTxnRangeResponse(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } } } } - public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + public static class compact2_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_args"); private static final org.apache.thrift.protocol.TField RQST_FIELD_DESC = new org.apache.thrift.protocol.TField("rqst", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + schemes.put(StandardScheme.class, new compact2_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_argsTupleSchemeFactory()); } private CompactionRequest rqst; // required @@ -170795,13 +171536,13 @@ public class ThriftHiveMetastore { tmpMap.put(_Fields.RQST, new org.apache.thrift.meta_data.FieldMetaData("rqst", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_args.class, metaDataMap); } - public compact_args() { + public compact2_args() { } - public compact_args( + public compact2_args( CompactionRequest rqst) { this(); @@ -170811,14 +171552,14 @@ public class ThriftHiveMetastore { /** * Performs a deep copy on other. */ - public compact_args(compact_args other) { + public compact2_args(compact2_args other) { if (other.isSetRqst()) { this.rqst = new CompactionRequest(other.rqst); } } - public compact_args deepCopy() { - return new compact_args(this); + public compact2_args deepCopy() { + return new compact2_args(this); } @Override @@ -170888,12 +171629,12 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact_args) - return this.equals((compact_args)that); + if (that instanceof compact2_args) + return this.equals((compact2_args)that); return false; } - public boolean equals(compact_args that) { + public boolean equals(compact2_args that) { if (that == null) return false; @@ -170922,7 +171663,7 @@ public class ThriftHiveMetastore { } @Override - public int compareTo(compact_args other) { + public int compareTo(compact2_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -170956,7 +171697,7 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("compact_args("); + StringBuilder sb = new StringBuilder("compact2_args("); boolean first = true; sb.append("rqst:"); @@ -170994,15 +171735,15 @@ public class ThriftHiveMetastore { } } - private static class compact_argsStandardSchemeFactory implements SchemeFactory { - public compact_argsStandardScheme getScheme() { - return new compact_argsStandardScheme(); + private static class compact2_argsStandardSchemeFactory implements SchemeFactory { + public compact2_argsStandardScheme getScheme() { + return new compact2_argsStandardScheme(); } } - private static class compact_argsStandardScheme extends StandardScheme { + private static class compact2_argsStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -171030,7 +171771,7 @@ public class ThriftHiveMetastore { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_args struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -171045,16 +171786,16 @@ public class ThriftHiveMetastore { } - private static class compact_argsTupleSchemeFactory implements SchemeFactory { - public compact_argsTupleScheme getScheme() { - return new compact_argsTupleScheme(); + private static class compact2_argsTupleSchemeFactory implements SchemeFactory { + public compact2_argsTupleScheme getScheme() { + return new compact2_argsTupleScheme(); } } - private static class compact_argsTupleScheme extends TupleScheme { + private static class compact2_argsTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRqst()) { @@ -171067,7 +171808,7 @@ public class ThriftHiveMetastore { } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -171080,20 +171821,22 @@ public class ThriftHiveMetastore { } - public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + public static class compact2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact2_result"); + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { - schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); + schemes.put(StandardScheme.class, new compact2_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact2_resultTupleSchemeFactory()); } + private CompactionResponse success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; + SUCCESS((short)0, "success"); private static final Map byName = new HashMap(); @@ -171108,6 +171851,8 @@ public class ThriftHiveMetastore { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; default: return null; } @@ -171146,37 +171891,86 @@ public class ThriftHiveMetastore { 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CompactionResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact2_result.class, metaDataMap); } - public compact_result() { + public compact2_result() { + } + + public compact2_result( + CompactionResponse success) + { + this(); + this.success = success; } /** * Performs a deep copy on other. */ - public compact_result(compact_result other) { + public compact2_result(compact2_result other) { + if (other.isSetSuccess()) { + this.success = new CompactionResponse(other.success); + } } - public compact_result deepCopy() { - return new compact_result(this); + public compact2_result deepCopy() { + return new compact2_result(this); } @Override public void clear() { + this.success = null; + } + + public CompactionResponse getSuccess() { + return this.success; + } + + public void setSuccess(CompactionResponse success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } } public void setFieldValue(_Fields field, Object value) { switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((CompactionResponse)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return getSuccess(); + } throw new IllegalStateException(); } @@ -171188,6 +171982,8 @@ public class ThriftHiveMetastore { } switch (field) { + case SUCCESS: + return isSetSuccess(); } throw new IllegalStateException(); } @@ -171196,15 +171992,24 @@ public class ThriftHiveMetastore { public boolean equals(Object that) { if (that == null) return false; - if (that instanceof compact_result) - return this.equals((compact_result)that); + if (that instanceof compact2_result) + return this.equals((compact2_result)that); return false; } - public boolean equals(compact_result that) { + public boolean equals(compact2_result that) { if (that == null) return false; + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + return true; } @@ -171212,17 +172017,32 @@ public class ThriftHiveMetastore { public int hashCode() { List list = new ArrayList(); + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + return list.hashCode(); } @Override - public int compareTo(compact_result other) { + public int compareTo(compact2_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -171240,9 +172060,16 @@ public class ThriftHiveMetastore { @Override public String toString() { - StringBuilder sb = new StringBuilder("compact_result("); + StringBuilder sb = new StringBuilder("compact2_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; sb.append(")"); return sb.toString(); } @@ -171250,6 +172077,9 @@ public class ThriftHiveMetastore { public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity + if (success != null) { + success.validate(); + } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { @@ -171268,15 +172098,15 @@ public class ThriftHiveMetastore { } } - private static class compact_resultStandardSchemeFactory implements SchemeFactory { - public compact_resultStandardScheme getScheme() { - return new compact_resultStandardScheme(); + private static class compact2_resultStandardSchemeFactory implements SchemeFactory { + public compact2_resultStandardScheme getScheme() { + return new compact2_resultStandardScheme(); } } - private static class compact_resultStandardScheme extends StandardScheme { + private static class compact2_resultStandardScheme extends StandardScheme { - public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol iprot, compact2_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -171286,6 +172116,15 @@ public class ThriftHiveMetastore { break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -171295,32 +172134,51 @@ public class ThriftHiveMetastore { struct.validate(); } - public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol oprot, compact2_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class compact_resultTupleSchemeFactory implements SchemeFactory { - public compact_resultTupleScheme getScheme() { - return new compact_resultTupleScheme(); + private static class compact2_resultTupleSchemeFactory implements SchemeFactory { + public compact2_resultTupleScheme getScheme() { + return new compact2_resultTupleScheme(); } } - private static class compact_resultTupleScheme extends TupleScheme { + private static class compact2_resultTupleScheme extends TupleScheme { @Override - public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + public void write(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } } @Override - public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + public void read(org.apache.thrift.protocol.TProtocol prot, compact2_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new CompactionResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php index e5abb66..0087205 100644 --- a/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ b/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -1131,6 +1131,11 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf { */ public function compact(\metastore\CompactionRequest $rqst); /** + * @param \metastore\CompactionRequest $rqst + * @return \metastore\CompactionResponse + */ + public function compact2(\metastore\CompactionRequest $rqst); + /** * @param \metastore\ShowCompactRequest $rqst * @return \metastore\ShowCompactResponse */ @@ -9266,6 +9271,57 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas return; } + public function compact2(\metastore\CompactionRequest $rqst) + { + $this->send_compact2($rqst); + return $this->recv_compact2(); + } + + public function send_compact2(\metastore\CompactionRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_compact2_args(); + $args->rqst = $rqst; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'compact2', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('compact2', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_compact2() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_compact2_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \metastore\ThriftHiveMetastore_compact2_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("compact2 failed: unknown result"); + } + public function show_compact(\metastore\ShowCompactRequest $rqst) { $this->send_show_compact($rqst); @@ -43126,6 +43182,166 @@ class ThriftHiveMetastore_compact_result { } +class ThriftHiveMetastore_compact2_args { + static $_TSPEC; + + /** + * @var \metastore\CompactionRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact2_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->rqst = new \metastore\CompactionRequest(); + $xfer += $this->rqst->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_compact2_args'); + if ($this->rqst !== null) { + if (!is_object($this->rqst)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rqst', TType::STRUCT, 1); + $xfer += $this->rqst->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHiveMetastore_compact2_result { + static $_TSPEC; + + /** + * @var \metastore\CompactionResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\CompactionResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_compact2_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \metastore\CompactionResponse(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_compact2_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class ThriftHiveMetastore_show_compact_args { static $_TSPEC; http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-php/metastore/Types.php ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-php/metastore/Types.php b/metastore/src/gen/thrift/gen-php/metastore/Types.php index ecb6254..b9af4ef 100644 --- a/metastore/src/gen/thrift/gen-php/metastore/Types.php +++ b/metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -14673,6 +14673,127 @@ class CompactionRequest { } +class CompactionResponse { + static $_TSPEC; + + /** + * @var int + */ + public $id = null; + /** + * @var string + */ + public $state = null; + /** + * @var bool + */ + public $accepted = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'state', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'accepted', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + if (isset($vals['accepted'])) { + $this->accepted = $vals['accepted']; + } + } + } + + public function getName() { + return 'CompactionResponse'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->state); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->accepted); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('CompactionResponse'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 1); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::STRING, 2); + $xfer += $output->writeString($this->state); + $xfer += $output->writeFieldEnd(); + } + if ($this->accepted !== null) { + $xfer += $output->writeFieldBegin('accepted', TType::BOOL, 3); + $xfer += $output->writeBool($this->accepted); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class ShowCompactRequest { static $_TSPEC; @@ -14774,6 +14895,10 @@ class ShowCompactResponseElement { * @var string */ public $hadoopJobId = "None"; + /** + * @var int + */ + public $id = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -14826,6 +14951,10 @@ class ShowCompactResponseElement { 'var' => 'hadoopJobId', 'type' => TType::STRING, ), + 13 => array( + 'var' => 'id', + 'type' => TType::I64, + ), ); } if (is_array($vals)) { @@ -14865,6 +14994,9 @@ class ShowCompactResponseElement { if (isset($vals['hadoopJobId'])) { $this->hadoopJobId = $vals['hadoopJobId']; } + if (isset($vals['id'])) { + $this->id = $vals['id']; + } } } @@ -14971,6 +15103,13 @@ class ShowCompactResponseElement { $xfer += $input->skip($ftype); } break; + case 13: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -15044,6 +15183,11 @@ class ShowCompactResponseElement { $xfer += $output->writeString($this->hadoopJobId); $xfer += $output->writeFieldEnd(); } + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 13); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote index 81bebd8..5c24707 100755 --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -165,6 +165,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' void heartbeat(HeartbeatRequest ids)') print(' HeartbeatTxnRangeResponse heartbeat_txn_range(HeartbeatTxnRangeRequest txns)') print(' void compact(CompactionRequest rqst)') + print(' CompactionResponse compact2(CompactionRequest rqst)') print(' ShowCompactResponse show_compact(ShowCompactRequest rqst)') print(' void add_dynamic_partitions(AddDynamicPartitions rqst)') print(' NotificationEventResponse get_next_notification(NotificationEventRequest rqst)') @@ -1091,6 +1092,12 @@ elif cmd == 'compact': sys.exit(1) pp.pprint(client.compact(eval(args[0]),)) +elif cmd == 'compact2': + if len(args) != 1: + print('compact2 requires 1 args') + sys.exit(1) + pp.pprint(client.compact2(eval(args[0]),)) + elif cmd == 'show_compact': if len(args) != 1: print('show_compact requires 1 args') http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py index dfebd90..bc51b75 100644 --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -1154,6 +1154,13 @@ class Iface(fb303.FacebookService.Iface): """ pass + def compact2(self, rqst): + """ + Parameters: + - rqst + """ + pass + def show_compact(self, rqst): """ Parameters: @@ -6391,6 +6398,37 @@ class Client(fb303.FacebookService.Client, Iface): iprot.readMessageEnd() return + def compact2(self, rqst): + """ + Parameters: + - rqst + """ + self.send_compact2(rqst) + return self.recv_compact2() + + def send_compact2(self, rqst): + self._oprot.writeMessageBegin('compact2', TMessageType.CALL, self._seqid) + args = compact2_args() + args.rqst = rqst + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact2(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact2_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "compact2 failed: unknown result") + def show_compact(self, rqst): """ Parameters: @@ -6867,6 +6905,7 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor): self._processMap["heartbeat"] = Processor.process_heartbeat self._processMap["heartbeat_txn_range"] = Processor.process_heartbeat_txn_range self._processMap["compact"] = Processor.process_compact + self._processMap["compact2"] = Processor.process_compact2 self._processMap["show_compact"] = Processor.process_show_compact self._processMap["add_dynamic_partitions"] = Processor.process_add_dynamic_partitions self._processMap["get_next_notification"] = Processor.process_get_next_notification @@ -10392,6 +10431,25 @@ class Processor(fb303.FacebookService.Processor, Iface, TProcessor): oprot.writeMessageEnd() oprot.trans.flush() + def process_compact2(self, seqid, iprot, oprot): + args = compact2_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact2_result() + try: + result.success = self._handler.compact2(args.rqst) + msg_type = TMessageType.REPLY + except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): + raise + except Exception as ex: + msg_type = TMessageType.EXCEPTION + logging.exception(ex) + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("compact2", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + def process_show_compact(self, seqid, iprot, oprot): args = show_compact_args() args.read(iprot) @@ -34979,6 +35037,137 @@ class compact_result: def __ne__(self, other): return not (self == other) +class compact2_args: + """ + Attributes: + - rqst + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'rqst', (CompactionRequest, CompactionRequest.thrift_spec), None, ), # 1 + ) + + def __init__(self, rqst=None,): + self.rqst = rqst + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.rqst = CompactionRequest() + self.rqst.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact2_args') + if self.rqst is not None: + oprot.writeFieldBegin('rqst', TType.STRUCT, 1) + self.rqst.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.rqst) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact2_result: + """ + Attributes: + - success + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (CompactionResponse, CompactionResponse.thrift_spec), None, ), # 0 + ) + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = CompactionResponse() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact2_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.success) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class show_compact_args: """ Attributes: http://git-wip-us.apache.org/repos/asf/hive/blob/7b24ff74/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py ---------------------------------------------------------------------- diff --git a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py index d420f06..21c0390 100644 --- a/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ b/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -10185,6 +10185,103 @@ class CompactionRequest: def __ne__(self, other): return not (self == other) +class CompactionResponse: + """ + Attributes: + - id + - state + - accepted + """ + + thrift_spec = ( + None, # 0 + (1, TType.I64, 'id', None, None, ), # 1 + (2, TType.STRING, 'state', None, None, ), # 2 + (3, TType.BOOL, 'accepted', None, None, ), # 3 + ) + + def __init__(self, id=None, state=None, accepted=None,): + self.id = id + self.state = state + self.accepted = accepted + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.state = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.accepted = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('CompactionResponse') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 1) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.state is not None: + oprot.writeFieldBegin('state', TType.STRING, 2) + oprot.writeString(self.state) + oprot.writeFieldEnd() + if self.accepted is not None: + oprot.writeFieldBegin('accepted', TType.BOOL, 3) + oprot.writeBool(self.accepted) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.id is None: + raise TProtocol.TProtocolException(message='Required field id is unset!') + if self.state is None: + raise TProtocol.TProtocolException(message='Required field state is unset!') + if self.accepted is None: + raise TProtocol.TProtocolException(message='Required field accepted is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.id) + value = (value * 31) ^ hash(self.state) + value = (value * 31) ^ hash(self.accepted) + return value + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class ShowCompactRequest: thrift_spec = ( @@ -10246,6 +10343,7 @@ class ShowCompactResponseElement: - metaInfo - endTime - hadoopJobId + - id """ thrift_spec = ( @@ -10262,9 +10360,10 @@ class ShowCompactResponseElement: (10, TType.STRING, 'metaInfo', None, None, ), # 10 (11, TType.I64, 'endTime', None, None, ), # 11 (12, TType.STRING, 'hadoopJobId', None, "None", ), # 12 + (13, TType.I64, 'id', None, None, ), # 13 ) - def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId=thrift_spec[12][4],): + def __init__(self, dbname=None, tablename=None, partitionname=None, type=None, state=None, workerid=None, start=None, runAs=None, hightestTxnId=None, metaInfo=None, endTime=None, hadoopJobId=thrift_spec[12][4], id=None,): self.dbname = dbname self.tablename = tablename self.partitionname = partitionname @@ -10277,6 +10376,7 @@ class ShowCompactResponseElement: self.metaInfo = metaInfo self.endTime = endTime self.hadoopJobId = hadoopJobId + self.id = id def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -10347,6 +10447,11 @@ class ShowCompactResponseElement: self.hadoopJobId = iprot.readString() else: iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -10405,6 +10510,10 @@ class ShowCompactResponseElement: oprot.writeFieldBegin('hadoopJobId', TType.STRING, 12) oprot.writeString(self.hadoopJobId) oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 13) + oprot.writeI64(self.id) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -10434,6 +10543,7 @@ class ShowCompactResponseElement: value = (value * 31) ^ hash(self.metaInfo) value = (value * 31) ^ hash(self.endTime) value = (value * 31) ^ hash(self.hadoopJobId) + value = (value * 31) ^ hash(self.id) return value def __repr__(self):