http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountRequest.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountRequest.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountRequest.java new file mode 100644 index 0000000..3644d6c --- /dev/null +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountRequest.java @@ -0,0 +1,488 @@ +/** + * 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)") +public class NotificationEventsCountRequest implements org.apache.thrift.TBase<NotificationEventsCountRequest, NotificationEventsCountRequest._Fields>, java.io.Serializable, Cloneable, Comparable<NotificationEventsCountRequest> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventsCountRequest"); + + private static final org.apache.thrift.protocol.TField FROM_EVENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fromEventId", org.apache.thrift.protocol.TType.I64, (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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotificationEventsCountRequestStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotificationEventsCountRequestTupleSchemeFactory()); + } + + private long fromEventId; // required + private String dbName; // 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 { + FROM_EVENT_ID((short)1, "fromEventId"), + DB_NAME((short)2, "dbName"); + + 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: // FROM_EVENT_ID + return FROM_EVENT_ID; + case 2: // DB_NAME + return DB_NAME; + 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 __FROMEVENTID_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FROM_EVENT_ID, new org.apache.thrift.meta_data.FieldMetaData("fromEventId", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventsCountRequest.class, metaDataMap); + } + + public NotificationEventsCountRequest() { + } + + public NotificationEventsCountRequest( + long fromEventId, + String dbName) + { + this(); + this.fromEventId = fromEventId; + setFromEventIdIsSet(true); + this.dbName = dbName; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public NotificationEventsCountRequest(NotificationEventsCountRequest other) { + __isset_bitfield = other.__isset_bitfield; + this.fromEventId = other.fromEventId; + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + } + + public NotificationEventsCountRequest deepCopy() { + return new NotificationEventsCountRequest(this); + } + + @Override + public void clear() { + setFromEventIdIsSet(false); + this.fromEventId = 0; + this.dbName = null; + } + + public long getFromEventId() { + return this.fromEventId; + } + + public void setFromEventId(long fromEventId) { + this.fromEventId = fromEventId; + setFromEventIdIsSet(true); + } + + public void unsetFromEventId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FROMEVENTID_ISSET_ID); + } + + /** Returns true if field fromEventId is set (has been assigned a value) and false otherwise */ + public boolean isSetFromEventId() { + return EncodingUtils.testBit(__isset_bitfield, __FROMEVENTID_ISSET_ID); + } + + public void setFromEventIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FROMEVENTID_ISSET_ID, value); + } + + 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 void setFieldValue(_Fields field, Object value) { + switch (field) { + case FROM_EVENT_ID: + if (value == null) { + unsetFromEventId(); + } else { + setFromEventId((Long)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FROM_EVENT_ID: + return getFromEventId(); + + case DB_NAME: + return getDbName(); + + } + 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 FROM_EVENT_ID: + return isSetFromEventId(); + case DB_NAME: + return isSetDbName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotificationEventsCountRequest) + return this.equals((NotificationEventsCountRequest)that); + return false; + } + + public boolean equals(NotificationEventsCountRequest that) { + if (that == null) + return false; + + boolean this_present_fromEventId = true; + boolean that_present_fromEventId = true; + if (this_present_fromEventId || that_present_fromEventId) { + if (!(this_present_fromEventId && that_present_fromEventId)) + return false; + if (this.fromEventId != that.fromEventId) + 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; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_fromEventId = true; + list.add(present_fromEventId); + if (present_fromEventId) + list.add(fromEventId); + + boolean present_dbName = true && (isSetDbName()); + list.add(present_dbName); + if (present_dbName) + list.add(dbName); + + return list.hashCode(); + } + + @Override + public int compareTo(NotificationEventsCountRequest other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetFromEventId()).compareTo(other.isSetFromEventId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFromEventId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromEventId, other.fromEventId); + 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; + } + } + 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("NotificationEventsCountRequest("); + boolean first = true; + + sb.append("fromEventId:"); + sb.append(this.fromEventId); + first = false; + if (!first) sb.append(", "); + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetFromEventId()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'fromEventId' is unset! Struct:" + toString()); + } + + if (!isSetDbName()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'dbName' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class NotificationEventsCountRequestStandardSchemeFactory implements SchemeFactory { + public NotificationEventsCountRequestStandardScheme getScheme() { + return new NotificationEventsCountRequestStandardScheme(); + } + } + + private static class NotificationEventsCountRequestStandardScheme extends StandardScheme<NotificationEventsCountRequest> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventsCountRequest 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: // FROM_EVENT_ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.fromEventId = iprot.readI64(); + struct.setFromEventIdIsSet(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; + 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, NotificationEventsCountRequest struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FROM_EVENT_ID_FIELD_DESC); + oprot.writeI64(struct.fromEventId); + oprot.writeFieldEnd(); + if (struct.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(struct.dbName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotificationEventsCountRequestTupleSchemeFactory implements SchemeFactory { + public NotificationEventsCountRequestTupleScheme getScheme() { + return new NotificationEventsCountRequestTupleScheme(); + } + } + + private static class NotificationEventsCountRequestTupleScheme extends TupleScheme<NotificationEventsCountRequest> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventsCountRequest struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.fromEventId); + oprot.writeString(struct.dbName); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventsCountRequest struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.fromEventId = iprot.readI64(); + struct.setFromEventIdIsSet(true); + struct.dbName = iprot.readString(); + struct.setDbNameIsSet(true); + } + } + +} +
http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountResponse.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountResponse.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountResponse.java new file mode 100644 index 0000000..1ddee44 --- /dev/null +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NotificationEventsCountResponse.java @@ -0,0 +1,387 @@ +/** + * 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)") +public class NotificationEventsCountResponse implements org.apache.thrift.TBase<NotificationEventsCountResponse, NotificationEventsCountResponse._Fields>, java.io.Serializable, Cloneable, Comparable<NotificationEventsCountResponse> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NotificationEventsCountResponse"); + + private static final org.apache.thrift.protocol.TField EVENTS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("eventsCount", org.apache.thrift.protocol.TType.I64, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new NotificationEventsCountResponseStandardSchemeFactory()); + schemes.put(TupleScheme.class, new NotificationEventsCountResponseTupleSchemeFactory()); + } + + private long eventsCount; // 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 { + EVENTS_COUNT((short)1, "eventsCount"); + + 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: // EVENTS_COUNT + return EVENTS_COUNT; + 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 __EVENTSCOUNT_ISSET_ID = 0; + private byte __isset_bitfield = 0; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.EVENTS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("eventsCount", org.apache.thrift.TFieldRequirementType.REQUIRED, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NotificationEventsCountResponse.class, metaDataMap); + } + + public NotificationEventsCountResponse() { + } + + public NotificationEventsCountResponse( + long eventsCount) + { + this(); + this.eventsCount = eventsCount; + setEventsCountIsSet(true); + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public NotificationEventsCountResponse(NotificationEventsCountResponse other) { + __isset_bitfield = other.__isset_bitfield; + this.eventsCount = other.eventsCount; + } + + public NotificationEventsCountResponse deepCopy() { + return new NotificationEventsCountResponse(this); + } + + @Override + public void clear() { + setEventsCountIsSet(false); + this.eventsCount = 0; + } + + public long getEventsCount() { + return this.eventsCount; + } + + public void setEventsCount(long eventsCount) { + this.eventsCount = eventsCount; + setEventsCountIsSet(true); + } + + public void unsetEventsCount() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EVENTSCOUNT_ISSET_ID); + } + + /** Returns true if field eventsCount is set (has been assigned a value) and false otherwise */ + public boolean isSetEventsCount() { + return EncodingUtils.testBit(__isset_bitfield, __EVENTSCOUNT_ISSET_ID); + } + + public void setEventsCountIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EVENTSCOUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EVENTS_COUNT: + if (value == null) { + unsetEventsCount(); + } else { + setEventsCount((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EVENTS_COUNT: + return getEventsCount(); + + } + 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 EVENTS_COUNT: + return isSetEventsCount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof NotificationEventsCountResponse) + return this.equals((NotificationEventsCountResponse)that); + return false; + } + + public boolean equals(NotificationEventsCountResponse that) { + if (that == null) + return false; + + boolean this_present_eventsCount = true; + boolean that_present_eventsCount = true; + if (this_present_eventsCount || that_present_eventsCount) { + if (!(this_present_eventsCount && that_present_eventsCount)) + return false; + if (this.eventsCount != that.eventsCount) + return false; + } + + return true; + } + + @Override + public int hashCode() { + List<Object> list = new ArrayList<Object>(); + + boolean present_eventsCount = true; + list.add(present_eventsCount); + if (present_eventsCount) + list.add(eventsCount); + + return list.hashCode(); + } + + @Override + public int compareTo(NotificationEventsCountResponse other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetEventsCount()).compareTo(other.isSetEventsCount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEventsCount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventsCount, other.eventsCount); + 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("NotificationEventsCountResponse("); + boolean first = true; + + sb.append("eventsCount:"); + sb.append(this.eventsCount); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + if (!isSetEventsCount()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'eventsCount' is unset! Struct:" + toString()); + } + + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bitfield = 0; + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class NotificationEventsCountResponseStandardSchemeFactory implements SchemeFactory { + public NotificationEventsCountResponseStandardScheme getScheme() { + return new NotificationEventsCountResponseStandardScheme(); + } + } + + private static class NotificationEventsCountResponseStandardScheme extends StandardScheme<NotificationEventsCountResponse> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, NotificationEventsCountResponse 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: // EVENTS_COUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.eventsCount = iprot.readI64(); + struct.setEventsCountIsSet(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, NotificationEventsCountResponse struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(EVENTS_COUNT_FIELD_DESC); + oprot.writeI64(struct.eventsCount); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class NotificationEventsCountResponseTupleSchemeFactory implements SchemeFactory { + public NotificationEventsCountResponseTupleScheme getScheme() { + return new NotificationEventsCountResponseTupleScheme(); + } + } + + private static class NotificationEventsCountResponseTupleScheme extends TupleScheme<NotificationEventsCountResponse> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, NotificationEventsCountResponse struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + oprot.writeI64(struct.eventsCount); + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, NotificationEventsCountResponse struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + struct.eventsCount = iprot.readI64(); + struct.setEventsCountIsSet(true); + } + } + +} + http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 541cbb9..47335b4 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -344,6 +344,8 @@ public class ThriftHiveMetastore { public CurrentNotificationEventId get_current_notificationEventId() throws org.apache.thrift.TException; + public NotificationEventsCountResponse get_notification_events_count(NotificationEventsCountRequest rqst) throws org.apache.thrift.TException; + public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException; public void flushCache() throws org.apache.thrift.TException; @@ -668,6 +670,8 @@ public class ThriftHiveMetastore { public void get_current_notificationEventId(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void get_notification_events_count(NotificationEventsCountRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; public void flushCache(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; @@ -5090,6 +5094,29 @@ public class ThriftHiveMetastore { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_current_notificationEventId failed: unknown result"); } + public NotificationEventsCountResponse get_notification_events_count(NotificationEventsCountRequest rqst) throws org.apache.thrift.TException + { + send_get_notification_events_count(rqst); + return recv_get_notification_events_count(); + } + + public void send_get_notification_events_count(NotificationEventsCountRequest rqst) throws org.apache.thrift.TException + { + get_notification_events_count_args args = new get_notification_events_count_args(); + args.setRqst(rqst); + sendBase("get_notification_events_count", args); + } + + public NotificationEventsCountResponse recv_get_notification_events_count() throws org.apache.thrift.TException + { + get_notification_events_count_result result = new get_notification_events_count_result(); + receiveBase(result, "get_notification_events_count"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_notification_events_count failed: unknown result"); + } + public FireEventResponse fire_listener_event(FireEventRequest rqst) throws org.apache.thrift.TException { send_fire_listener_event(rqst); @@ -10652,6 +10679,38 @@ public class ThriftHiveMetastore { } } + public void get_notification_events_count(NotificationEventsCountRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_notification_events_count_call method_call = new get_notification_events_count_call(rqst, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_notification_events_count_call extends org.apache.thrift.async.TAsyncMethodCall { + private NotificationEventsCountRequest rqst; + public get_notification_events_count_call(NotificationEventsCountRequest 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("get_notification_events_count", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_notification_events_count_args args = new get_notification_events_count_args(); + args.setRqst(rqst); + args.write(prot); + prot.writeMessageEnd(); + } + + public NotificationEventsCountResponse 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_get_notification_events_count(); + } + } + public void fire_listener_event(FireEventRequest rqst, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); fire_listener_event_call method_call = new fire_listener_event_call(rqst, resultHandler, this, ___protocolFactory, ___transport); @@ -11098,6 +11157,7 @@ public class ThriftHiveMetastore { processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); processMap.put("get_next_notification", new get_next_notification()); processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); + processMap.put("get_notification_events_count", new get_notification_events_count()); processMap.put("fire_listener_event", new fire_listener_event()); processMap.put("flushCache", new flushCache()); processMap.put("cm_recycle", new cm_recycle()); @@ -14994,6 +15054,26 @@ public class ThriftHiveMetastore { } } + public static class get_notification_events_count<I extends Iface> extends org.apache.thrift.ProcessFunction<I, get_notification_events_count_args> { + public get_notification_events_count() { + super("get_notification_events_count"); + } + + public get_notification_events_count_args getEmptyArgsInstance() { + return new get_notification_events_count_args(); + } + + protected boolean isOneway() { + return false; + } + + public get_notification_events_count_result getResult(I iface, get_notification_events_count_args args) throws org.apache.thrift.TException { + get_notification_events_count_result result = new get_notification_events_count_result(); + result.success = iface.get_notification_events_count(args.rqst); + return result; + } + } + public static class fire_listener_event<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fire_listener_event_args> { public fire_listener_event() { super("fire_listener_event"); @@ -15346,6 +15426,7 @@ public class ThriftHiveMetastore { processMap.put("add_dynamic_partitions", new add_dynamic_partitions()); processMap.put("get_next_notification", new get_next_notification()); processMap.put("get_current_notificationEventId", new get_current_notificationEventId()); + processMap.put("get_notification_events_count", new get_notification_events_count()); processMap.put("fire_listener_event", new fire_listener_event()); processMap.put("flushCache", new flushCache()); processMap.put("cm_recycle", new cm_recycle()); @@ -24604,6 +24685,57 @@ public class ThriftHiveMetastore { } } + public static class get_notification_events_count<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_notification_events_count_args, NotificationEventsCountResponse> { + public get_notification_events_count() { + super("get_notification_events_count"); + } + + public get_notification_events_count_args getEmptyArgsInstance() { + return new get_notification_events_count_args(); + } + + public AsyncMethodCallback<NotificationEventsCountResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new AsyncMethodCallback<NotificationEventsCountResponse>() { + public void onComplete(NotificationEventsCountResponse o) { + get_notification_events_count_result result = new get_notification_events_count_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; + get_notification_events_count_result result = new get_notification_events_count_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, get_notification_events_count_args args, org.apache.thrift.async.AsyncMethodCallback<NotificationEventsCountResponse> resultHandler) throws TException { + iface.get_notification_events_count(args.rqst,resultHandler); + } + } + public static class fire_listener_event<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fire_listener_event_args, FireEventResponse> { public fire_listener_event() { super("fire_listener_event"); @@ -180954,6 +181086,732 @@ public class ThriftHiveMetastore { } + public static class get_notification_events_count_args implements org.apache.thrift.TBase<get_notification_events_count_args, get_notification_events_count_args._Fields>, java.io.Serializable, Cloneable, Comparable<get_notification_events_count_args> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_notification_events_count_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_notification_events_count_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_notification_events_count_argsTupleSchemeFactory()); + } + + private NotificationEventsCountRequest 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<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: // 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, NotificationEventsCountRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_notification_events_count_args.class, metaDataMap); + } + + public get_notification_events_count_args() { + } + + public get_notification_events_count_args( + NotificationEventsCountRequest rqst) + { + this(); + this.rqst = rqst; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public get_notification_events_count_args(get_notification_events_count_args other) { + if (other.isSetRqst()) { + this.rqst = new NotificationEventsCountRequest(other.rqst); + } + } + + public get_notification_events_count_args deepCopy() { + return new get_notification_events_count_args(this); + } + + @Override + public void clear() { + this.rqst = null; + } + + public NotificationEventsCountRequest getRqst() { + return this.rqst; + } + + public void setRqst(NotificationEventsCountRequest 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((NotificationEventsCountRequest)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 get_notification_events_count_args) + return this.equals((get_notification_events_count_args)that); + return false; + } + + public boolean equals(get_notification_events_count_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<Object> list = new ArrayList<Object>(); + + boolean present_rqst = true && (isSetRqst()); + list.add(present_rqst); + if (present_rqst) + list.add(rqst); + + return list.hashCode(); + } + + @Override + public int compareTo(get_notification_events_count_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("get_notification_events_count_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 get_notification_events_count_argsStandardSchemeFactory implements SchemeFactory { + public get_notification_events_count_argsStandardScheme getScheme() { + return new get_notification_events_count_argsStandardScheme(); + } + } + + private static class get_notification_events_count_argsStandardScheme extends StandardScheme<get_notification_events_count_args> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_notification_events_count_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 NotificationEventsCountRequest(); + 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, get_notification_events_count_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 get_notification_events_count_argsTupleSchemeFactory implements SchemeFactory { + public get_notification_events_count_argsTupleScheme getScheme() { + return new get_notification_events_count_argsTupleScheme(); + } + } + + private static class get_notification_events_count_argsTupleScheme extends TupleScheme<get_notification_events_count_args> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_notification_events_count_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, get_notification_events_count_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.rqst = new NotificationEventsCountRequest(); + struct.rqst.read(iprot); + struct.setRqstIsSet(true); + } + } + } + + } + + public static class get_notification_events_count_result implements org.apache.thrift.TBase<get_notification_events_count_result, get_notification_events_count_result._Fields>, java.io.Serializable, Cloneable, Comparable<get_notification_events_count_result> { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_notification_events_count_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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_notification_events_count_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_notification_events_count_resultTupleSchemeFactory()); + } + + private NotificationEventsCountResponse 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<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 0: // SUCCESS + return SUCCESS; + 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.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, NotificationEventsCountResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_notification_events_count_result.class, metaDataMap); + } + + public get_notification_events_count_result() { + } + + public get_notification_events_count_result( + NotificationEventsCountResponse success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public get_notification_events_count_result(get_notification_events_count_result other) { + if (other.isSetSuccess()) { + this.success = new NotificationEventsCountResponse(other.success); + } + } + + public get_notification_events_count_result deepCopy() { + return new get_notification_events_count_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + public NotificationEventsCountResponse getSuccess() { + return this.success; + } + + public void setSuccess(NotificationEventsCountResponse 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((NotificationEventsCountResponse)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 get_notification_events_count_result) + return this.equals((get_notification_events_count_result)that); + return false; + } + + public boolean equals(get_notification_events_count_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<Object> list = new ArrayList<Object>(); + + boolean present_success = true && (isSetSuccess()); + list.add(present_success); + if (present_success) + list.add(success); + + return list.hashCode(); + } + + @Override + public int compareTo(get_notification_events_count_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("get_notification_events_count_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 get_notification_events_count_resultStandardSchemeFactory implements SchemeFactory { + public get_notification_events_count_resultStandardScheme getScheme() { + return new get_notification_events_count_resultStandardScheme(); + } + } + + private static class get_notification_events_count_resultStandardScheme extends StandardScheme<get_notification_events_count_result> { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_notification_events_count_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 NotificationEventsCountResponse(); + 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, get_notification_events_count_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 get_notification_events_count_resultTupleSchemeFactory implements SchemeFactory { + public get_notification_events_count_resultTupleScheme getScheme() { + return new get_notification_events_count_resultTupleScheme(); + } + } + + private static class get_notification_events_count_resultTupleScheme extends TupleScheme<get_notification_events_count_result> { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_notification_events_count_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, get_notification_events_count_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = new NotificationEventsCountResponse(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + } + } + + } + public static class fire_listener_event_args implements org.apache.thrift.TBase<fire_listener_event_args, fire_listener_event_args._Fields>, java.io.Serializable, Cloneable, Comparable<fire_listener_event_args> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_listener_event_args"); http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php b/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php index cc5e120..644def0 100644 --- a/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php +++ b/standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php @@ -1191,6 +1191,11 @@ interface ThriftHiveMetastoreIf extends \FacebookServiceIf { */ public function get_current_notificationEventId(); /** + * @param \metastore\NotificationEventsCountRequest $rqst + * @return \metastore\NotificationEventsCountResponse + */ + public function get_notification_events_count(\metastore\NotificationEventsCountRequest $rqst); + /** * @param \metastore\FireEventRequest $rqst * @return \metastore\FireEventResponse */ @@ -9851,6 +9856,57 @@ class ThriftHiveMetastoreClient extends \FacebookServiceClient implements \metas throw new \Exception("get_current_notificationEventId failed: unknown result"); } + public function get_notification_events_count(\metastore\NotificationEventsCountRequest $rqst) + { + $this->send_get_notification_events_count($rqst); + return $this->recv_get_notification_events_count(); + } + + public function send_get_notification_events_count(\metastore\NotificationEventsCountRequest $rqst) + { + $args = new \metastore\ThriftHiveMetastore_get_notification_events_count_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_, 'get_notification_events_count', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_notification_events_count', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_notification_events_count() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\metastore\ThriftHiveMetastore_get_notification_events_count_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_get_notification_events_count_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("get_notification_events_count failed: unknown result"); + } + public function fire_listener_event(\metastore\FireEventRequest $rqst) { $this->send_fire_listener_event($rqst); @@ -45514,6 +45570,166 @@ class ThriftHiveMetastore_get_current_notificationEventId_result { } +class ThriftHiveMetastore_get_notification_events_count_args { + static $_TSPEC; + + /** + * @var \metastore\NotificationEventsCountRequest + */ + public $rqst = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + -1 => array( + 'var' => 'rqst', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotificationEventsCountRequest', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['rqst'])) { + $this->rqst = $vals['rqst']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_notification_events_count_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\NotificationEventsCountRequest(); + $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_get_notification_events_count_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_get_notification_events_count_result { + static $_TSPEC; + + /** + * @var \metastore\NotificationEventsCountResponse + */ + public $success = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => '\metastore\NotificationEventsCountResponse', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_notification_events_count_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\NotificationEventsCountResponse(); + $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_get_notification_events_count_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_fire_listener_event_args { static $_TSPEC; http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php index aff783e..f0f0a57 100644 --- a/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php +++ b/standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php @@ -17075,6 +17075,179 @@ class CurrentNotificationEventId { } +class NotificationEventsCountRequest { + static $_TSPEC; + + /** + * @var int + */ + public $fromEventId = null; + /** + * @var string + */ + public $dbName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fromEventId', + 'type' => TType::I64, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fromEventId'])) { + $this->fromEventId = $vals['fromEventId']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + } + } + + public function getName() { + return 'NotificationEventsCountRequest'; + } + + 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->fromEventId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } 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('NotificationEventsCountRequest'); + if ($this->fromEventId !== null) { + $xfer += $output->writeFieldBegin('fromEventId', TType::I64, 1); + $xfer += $output->writeI64($this->fromEventId); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class NotificationEventsCountResponse { + static $_TSPEC; + + /** + * @var int + */ + public $eventsCount = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'eventsCount', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['eventsCount'])) { + $this->eventsCount = $vals['eventsCount']; + } + } + } + + public function getName() { + return 'NotificationEventsCountResponse'; + } + + 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->eventsCount); + } 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('NotificationEventsCountResponse'); + if ($this->eventsCount !== null) { + $xfer += $output->writeFieldBegin('eventsCount', TType::I64, 1); + $xfer += $output->writeI64($this->eventsCount); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + class InsertEventRequestData { static $_TSPEC; http://git-wip-us.apache.org/repos/asf/hive/blob/70cb7f0b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote index 46dcac9..14527e6 100755 --- a/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ b/standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -175,6 +175,7 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' void add_dynamic_partitions(AddDynamicPartitions rqst)') print(' NotificationEventResponse get_next_notification(NotificationEventRequest rqst)') print(' CurrentNotificationEventId get_current_notificationEventId()') + print(' NotificationEventsCountResponse get_notification_events_count(NotificationEventsCountRequest rqst)') print(' FireEventResponse fire_listener_event(FireEventRequest rqst)') print(' void flushCache()') print(' CmRecycleResponse cm_recycle(CmRecycleRequest request)') @@ -1159,6 +1160,12 @@ elif cmd == 'get_current_notificationEventId': sys.exit(1) pp.pprint(client.get_current_notificationEventId()) +elif cmd == 'get_notification_events_count': + if len(args) != 1: + print('get_notification_events_count requires 1 args') + sys.exit(1) + pp.pprint(client.get_notification_events_count(eval(args[0]),)) + elif cmd == 'fire_listener_event': if len(args) != 1: print('fire_listener_event requires 1 args')
