From 1768062f7b5f069a5a1b6a55218e6195f5e8f66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Rohde=20D=C3=B8ssing?= Date: Tue, 10 Jul 2018 15:56:34 +0200 Subject: [PATCH 1/3] STORM-2947: Remove deprecated field and method from Thrift --- .../storm/generated/ClusterSummary.java | 124 +- .../org/apache/storm/generated/Nimbus.java | 2519 +++++------------ storm-client/src/py/storm/Nimbus-remote | 7 - storm-client/src/py/storm/Nimbus.py | 201 -- storm-client/src/py/storm/ttypes.py | 24 +- storm-client/src/storm.thrift | 8 +- .../java/org/apache/storm/LocalCluster.java | 5 - .../apache/storm/daemon/nimbus/Nimbus.java | 23 - 8 files changed, 785 insertions(+), 2126 deletions(-) diff --git a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java index 3ab05cac9e7..400e06d6937 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java @@ -29,24 +29,21 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase supervisors; // required - private int nimbus_uptime_secs; // optional private java.util.List topologies; // required private java.util.List nimbuses; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { SUPERVISORS((short)1, "supervisors"), - NIMBUS_UPTIME_SECS((short)2, "nimbus_uptime_secs"), - TOPOLOGIES((short)3, "topologies"), - NIMBUSES((short)4, "nimbuses"); + TOPOLOGIES((short)2, "topologies"), + NIMBUSES((short)3, "nimbuses"); private static final java.util.Map byName = new java.util.HashMap(); @@ -63,11 +60,9 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SUPERVISORS return SUPERVISORS; - case 2: // NIMBUS_UPTIME_SECS - return NIMBUS_UPTIME_SECS; - case 3: // TOPOLOGIES + case 2: // TOPOLOGIES return TOPOLOGIES; - case 4: // NIMBUSES + case 3: // NIMBUSES return NIMBUSES; default: return null; @@ -109,17 +104,12 @@ public java.lang.String getFieldName() { } // isset id assignments - private static final int __NIMBUS_UPTIME_SECS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.NIMBUS_UPTIME_SECS}; public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUPERVISORS, new org.apache.storm.thrift.meta_data.FieldMetaData("supervisors", org.apache.storm.thrift.TFieldRequirementType.REQUIRED, new org.apache.storm.thrift.meta_data.ListMetaData(org.apache.storm.thrift.protocol.TType.LIST, new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, SupervisorSummary.class)))); - tmpMap.put(_Fields.NIMBUS_UPTIME_SECS, new org.apache.storm.thrift.meta_data.FieldMetaData("nimbus_uptime_secs", org.apache.storm.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.I32))); tmpMap.put(_Fields.TOPOLOGIES, new org.apache.storm.thrift.meta_data.FieldMetaData("topologies", org.apache.storm.thrift.TFieldRequirementType.REQUIRED, new org.apache.storm.thrift.meta_data.ListMetaData(org.apache.storm.thrift.protocol.TType.LIST, new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, TopologySummary.class)))); @@ -131,8 +121,6 @@ public java.lang.String getFieldName() { } public ClusterSummary() { - this.nimbus_uptime_secs = 0; - } public ClusterSummary( @@ -150,7 +138,6 @@ public ClusterSummary( * Performs a deep copy on other. */ public ClusterSummary(ClusterSummary other) { - __isset_bitfield = other.__isset_bitfield; if (other.is_set_supervisors()) { java.util.List __this__supervisors = new java.util.ArrayList(other.supervisors.size()); for (SupervisorSummary other_element : other.supervisors) { @@ -158,7 +145,6 @@ public ClusterSummary(ClusterSummary other) { } this.supervisors = __this__supervisors; } - this.nimbus_uptime_secs = other.nimbus_uptime_secs; if (other.is_set_topologies()) { java.util.List __this__topologies = new java.util.ArrayList(other.topologies.size()); for (TopologySummary other_element : other.topologies) { @@ -182,8 +168,6 @@ public ClusterSummary deepCopy() { @Override public void clear() { this.supervisors = null; - this.nimbus_uptime_secs = 0; - this.topologies = null; this.nimbuses = null; } @@ -226,28 +210,6 @@ public void set_supervisors_isSet(boolean value) { } } - public int get_nimbus_uptime_secs() { - return this.nimbus_uptime_secs; - } - - public void set_nimbus_uptime_secs(int nimbus_uptime_secs) { - this.nimbus_uptime_secs = nimbus_uptime_secs; - set_nimbus_uptime_secs_isSet(true); - } - - public void unset_nimbus_uptime_secs() { - __isset_bitfield = org.apache.storm.thrift.EncodingUtils.clearBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID); - } - - /** Returns true if field nimbus_uptime_secs is set (has been assigned a value) and false otherwise */ - public boolean is_set_nimbus_uptime_secs() { - return org.apache.storm.thrift.EncodingUtils.testBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID); - } - - public void set_nimbus_uptime_secs_isSet(boolean value) { - __isset_bitfield = org.apache.storm.thrift.EncodingUtils.setBit(__isset_bitfield, __NIMBUS_UPTIME_SECS_ISSET_ID, value); - } - public int get_topologies_size() { return (this.topologies == null) ? 0 : this.topologies.size(); } @@ -334,14 +296,6 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } break; - case NIMBUS_UPTIME_SECS: - if (value == null) { - unset_nimbus_uptime_secs(); - } else { - set_nimbus_uptime_secs((java.lang.Integer)value); - } - break; - case TOPOLOGIES: if (value == null) { unset_topologies(); @@ -366,9 +320,6 @@ public java.lang.Object getFieldValue(_Fields field) { case SUPERVISORS: return get_supervisors(); - case NIMBUS_UPTIME_SECS: - return get_nimbus_uptime_secs(); - case TOPOLOGIES: return get_topologies(); @@ -388,8 +339,6 @@ public boolean isSet(_Fields field) { switch (field) { case SUPERVISORS: return is_set_supervisors(); - case NIMBUS_UPTIME_SECS: - return is_set_nimbus_uptime_secs(); case TOPOLOGIES: return is_set_topologies(); case NIMBUSES: @@ -422,15 +371,6 @@ public boolean equals(ClusterSummary that) { return false; } - boolean this_present_nimbus_uptime_secs = true && this.is_set_nimbus_uptime_secs(); - boolean that_present_nimbus_uptime_secs = true && that.is_set_nimbus_uptime_secs(); - if (this_present_nimbus_uptime_secs || that_present_nimbus_uptime_secs) { - if (!(this_present_nimbus_uptime_secs && that_present_nimbus_uptime_secs)) - return false; - if (this.nimbus_uptime_secs != that.nimbus_uptime_secs) - return false; - } - boolean this_present_topologies = true && this.is_set_topologies(); boolean that_present_topologies = true && that.is_set_topologies(); if (this_present_topologies || that_present_topologies) { @@ -460,10 +400,6 @@ public int hashCode() { if (is_set_supervisors()) hashCode = hashCode * 8191 + supervisors.hashCode(); - hashCode = hashCode * 8191 + ((is_set_nimbus_uptime_secs()) ? 131071 : 524287); - if (is_set_nimbus_uptime_secs()) - hashCode = hashCode * 8191 + nimbus_uptime_secs; - hashCode = hashCode * 8191 + ((is_set_topologies()) ? 131071 : 524287); if (is_set_topologies()) hashCode = hashCode * 8191 + topologies.hashCode(); @@ -493,16 +429,6 @@ public int compareTo(ClusterSummary other) { return lastComparison; } } - lastComparison = java.lang.Boolean.valueOf(is_set_nimbus_uptime_secs()).compareTo(other.is_set_nimbus_uptime_secs()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_nimbus_uptime_secs()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.nimbus_uptime_secs, other.nimbus_uptime_secs); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = java.lang.Boolean.valueOf(is_set_topologies()).compareTo(other.is_set_topologies()); if (lastComparison != 0) { return lastComparison; @@ -550,12 +476,6 @@ public java.lang.String toString() { sb.append(this.supervisors); } first = false; - if (is_set_nimbus_uptime_secs()) { - if (!first) sb.append(", "); - sb.append("nimbus_uptime_secs:"); - sb.append(this.nimbus_uptime_secs); - first = false; - } if (!first) sb.append(", "); sb.append("topologies:"); if (this.topologies == null) { @@ -603,8 +523,6 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.storm.thrift.TException te) { throw new java.io.IOException(te); @@ -648,15 +566,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, ClusterSummar org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // NIMBUS_UPTIME_SECS - if (schemeField.type == org.apache.storm.thrift.protocol.TType.I32) { - struct.nimbus_uptime_secs = iprot.readI32(); - struct.set_nimbus_uptime_secs_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // TOPOLOGIES + case 2: // TOPOLOGIES if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) { { org.apache.storm.thrift.protocol.TList _list139 = iprot.readListBegin(); @@ -675,7 +585,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, ClusterSummar org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // NIMBUSES + case 3: // NIMBUSES if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) { { org.apache.storm.thrift.protocol.TList _list142 = iprot.readListBegin(); @@ -719,11 +629,6 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, ClusterSumma } oprot.writeFieldEnd(); } - if (struct.is_set_nimbus_uptime_secs()) { - oprot.writeFieldBegin(NIMBUS_UPTIME_SECS_FIELD_DESC); - oprot.writeI32(struct.nimbus_uptime_secs); - oprot.writeFieldEnd(); - } if (struct.topologies != null) { oprot.writeFieldBegin(TOPOLOGIES_FIELD_DESC); { @@ -786,14 +691,6 @@ public void write(org.apache.storm.thrift.protocol.TProtocol prot, ClusterSummar _iter150.write(oprot); } } - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_nimbus_uptime_secs()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.is_set_nimbus_uptime_secs()) { - oprot.writeI32(struct.nimbus_uptime_secs); - } } @Override @@ -835,11 +732,6 @@ public void read(org.apache.storm.thrift.protocol.TProtocol prot, ClusterSummary } } struct.set_nimbuses_isSet(true); - java.util.BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.nimbus_uptime_secs = iprot.readI32(); - struct.set_nimbus_uptime_secs_isSet(true); - } } } diff --git a/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java b/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java index de9a3b3224a..47bc7fcade9 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java +++ b/storm-client/src/jvm/org/apache/storm/generated/Nimbus.java @@ -101,8 +101,6 @@ public interface Iface { public void finishFileUpload(java.lang.String location) throws AuthorizationException, org.apache.storm.thrift.TException; - public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.storm.thrift.TException; - public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.storm.thrift.TException; public java.lang.String getNimbusConf() throws AuthorizationException, org.apache.storm.thrift.TException; @@ -237,8 +235,6 @@ public interface AsyncIface { public void finishFileUpload(java.lang.String location, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException; - public void beginFileDownload(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException; - public void downloadChunk(java.lang.String id, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException; public void getNimbusConf(org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException; @@ -1093,32 +1089,6 @@ public void recv_finishFileUpload() throws AuthorizationException, org.apache.st return; } - public java.lang.String beginFileDownload(java.lang.String file) throws AuthorizationException, org.apache.storm.thrift.TException - { - send_beginFileDownload(file); - return recv_beginFileDownload(); - } - - public void send_beginFileDownload(java.lang.String file) throws org.apache.storm.thrift.TException - { - beginFileDownload_args args = new beginFileDownload_args(); - args.set_file(file); - sendBase("beginFileDownload", args); - } - - public java.lang.String recv_beginFileDownload() throws AuthorizationException, org.apache.storm.thrift.TException - { - beginFileDownload_result result = new beginFileDownload_result(); - receiveBase(result, "beginFileDownload"); - if (result.is_set_success()) { - return result.success; - } - if (result.aze != null) { - throw result.aze; - } - throw new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result"); - } - public java.nio.ByteBuffer downloadChunk(java.lang.String id) throws AuthorizationException, org.apache.storm.thrift.TException { send_downloadChunk(id); @@ -2700,38 +2670,6 @@ public Void getResult() throws AuthorizationException, org.apache.storm.thrift.T } } - public void beginFileDownload(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - checkReady(); - beginFileDownload_call method_call = new beginFileDownload_call(file, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class beginFileDownload_call extends org.apache.storm.thrift.async.TAsyncMethodCall { - private java.lang.String file; - public beginFileDownload_call(java.lang.String file, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler, org.apache.storm.thrift.async.TAsyncClient client, org.apache.storm.thrift.protocol.TProtocolFactory protocolFactory, org.apache.storm.thrift.transport.TNonblockingTransport transport) throws org.apache.storm.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.file = file; - } - - public void write_args(org.apache.storm.thrift.protocol.TProtocol prot) throws org.apache.storm.thrift.TException { - prot.writeMessageBegin(new org.apache.storm.thrift.protocol.TMessage("beginFileDownload", org.apache.storm.thrift.protocol.TMessageType.CALL, 0)); - beginFileDownload_args args = new beginFileDownload_args(); - args.set_file(file); - args.write(prot); - prot.writeMessageEnd(); - } - - public java.lang.String getResult() throws AuthorizationException, org.apache.storm.thrift.TException { - if (getState() != org.apache.storm.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new java.lang.IllegalStateException("Method call not finished!"); - } - org.apache.storm.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.storm.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.storm.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_beginFileDownload(); - } - } - public void downloadChunk(java.lang.String id, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { checkReady(); downloadChunk_call method_call = new downloadChunk_call(id, resultHandler, this, ___protocolFactory, ___transport); @@ -3430,7 +3368,6 @@ protected Processor(I iface, java.util.Map extends org.apache.storm.thrift.ProcessFunction { - public beginFileDownload() { - super("beginFileDownload"); - } - - public beginFileDownload_args getEmptyArgsInstance() { - return new beginFileDownload_args(); - } - - protected boolean isOneway() { - return false; - } - - @Override - protected boolean handleRuntimeExceptions() { - return false; - } - - public beginFileDownload_result getResult(I iface, beginFileDownload_args args) throws org.apache.storm.thrift.TException { - beginFileDownload_result result = new beginFileDownload_result(); - try { - result.success = iface.beginFileDownload(args.file); - } catch (AuthorizationException aze) { - result.aze = aze; - } - return result; - } - } - public static class downloadChunk extends org.apache.storm.thrift.ProcessFunction { public downloadChunk() { super("downloadChunk"); @@ -5014,7 +4922,6 @@ protected AsyncProcessor(I iface, java.util.Map extends org.apache.storm.thrift.AsyncProcessFunction { - public beginFileDownload() { - super("beginFileDownload"); + public static class downloadChunk extends org.apache.storm.thrift.AsyncProcessFunction { + public downloadChunk() { + super("downloadChunk"); + } + + public downloadChunk_args getEmptyArgsInstance() { + return new downloadChunk_args(); + } + + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.storm.thrift.AsyncProcessFunction fcall = this; + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(java.nio.ByteBuffer o) { + downloadChunk_result result = new downloadChunk_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.storm.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; + org.apache.storm.thrift.TSerializable msg; + downloadChunk_result result = new downloadChunk_result(); + if (e instanceof AuthorizationException) { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.storm.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.storm.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, downloadChunk_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.downloadChunk(args.id,resultHandler); + } + } + + public static class getNimbusConf extends org.apache.storm.thrift.AsyncProcessFunction { + public getNimbusConf() { + super("getNimbusConf"); } - public beginFileDownload_args getEmptyArgsInstance() { - return new beginFileDownload_args(); + public getNimbusConf_args getEmptyArgsInstance() { + return new getNimbusConf_args(); } public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; return new org.apache.storm.thrift.async.AsyncMethodCallback() { public void onComplete(java.lang.String o) { - beginFileDownload_result result = new beginFileDownload_result(); + getNimbusConf_result result = new getNimbusConf_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7063,7 +7035,7 @@ public void onComplete(java.lang.String o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - beginFileDownload_result result = new beginFileDownload_result(); + getNimbusConf_result result = new getNimbusConf_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); @@ -7095,25 +7067,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, beginFileDownload_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.beginFileDownload(args.file,resultHandler); + public void start(I iface, getNimbusConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getNimbusConf(resultHandler); } } - public static class downloadChunk extends org.apache.storm.thrift.AsyncProcessFunction { - public downloadChunk() { - super("downloadChunk"); + public static class getClusterInfo extends org.apache.storm.thrift.AsyncProcessFunction { + public getClusterInfo() { + super("getClusterInfo"); } - public downloadChunk_args getEmptyArgsInstance() { - return new downloadChunk_args(); + public getClusterInfo_args getEmptyArgsInstance() { + return new getClusterInfo_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(java.nio.ByteBuffer o) { - downloadChunk_result result = new downloadChunk_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(ClusterSummary o) { + getClusterInfo_result result = new getClusterInfo_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7128,7 +7100,7 @@ public void onComplete(java.nio.ByteBuffer o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - downloadChunk_result result = new downloadChunk_result(); + getClusterInfo_result result = new getClusterInfo_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); @@ -7160,25 +7132,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, downloadChunk_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.downloadChunk(args.id,resultHandler); + public void start(I iface, getClusterInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getClusterInfo(resultHandler); } } - public static class getNimbusConf extends org.apache.storm.thrift.AsyncProcessFunction { - public getNimbusConf() { - super("getNimbusConf"); + public static class getLeader extends org.apache.storm.thrift.AsyncProcessFunction { + public getLeader() { + super("getLeader"); } - public getNimbusConf_args getEmptyArgsInstance() { - return new getNimbusConf_args(); + public getLeader_args getEmptyArgsInstance() { + return new getLeader_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(java.lang.String o) { - getNimbusConf_result result = new getNimbusConf_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(NimbusSummary o) { + getLeader_result result = new getLeader_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7193,7 +7165,7 @@ public void onComplete(java.lang.String o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getNimbusConf_result result = new getNimbusConf_result(); + getLeader_result result = new getLeader_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); @@ -7225,26 +7197,27 @@ protected boolean isOneway() { return false; } - public void start(I iface, getNimbusConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getNimbusConf(resultHandler); + public void start(I iface, getLeader_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getLeader(resultHandler); } } - public static class getClusterInfo extends org.apache.storm.thrift.AsyncProcessFunction { - public getClusterInfo() { - super("getClusterInfo"); + public static class isTopologyNameAllowed extends org.apache.storm.thrift.AsyncProcessFunction { + public isTopologyNameAllowed() { + super("isTopologyNameAllowed"); } - public getClusterInfo_args getEmptyArgsInstance() { - return new getClusterInfo_args(); + public isTopologyNameAllowed_args getEmptyArgsInstance() { + return new isTopologyNameAllowed_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(ClusterSummary o) { - getClusterInfo_result result = new getClusterInfo_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(java.lang.Boolean o) { + isTopologyNameAllowed_result result = new isTopologyNameAllowed_result(); result.success = o; + result.set_success_isSet(true); try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.storm.thrift.transport.TTransportException e) { @@ -7258,7 +7231,7 @@ public void onComplete(ClusterSummary o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getClusterInfo_result result = new getClusterInfo_result(); + isTopologyNameAllowed_result result = new isTopologyNameAllowed_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); @@ -7290,25 +7263,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getClusterInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getClusterInfo(resultHandler); + public void start(I iface, isTopologyNameAllowed_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.isTopologyNameAllowed(args.name,resultHandler); } } - public static class getLeader extends org.apache.storm.thrift.AsyncProcessFunction { - public getLeader() { - super("getLeader"); + public static class getTopologyInfo extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopologyInfo() { + super("getTopologyInfo"); } - public getLeader_args getEmptyArgsInstance() { - return new getLeader_args(); + public getTopologyInfo_args getEmptyArgsInstance() { + return new getTopologyInfo_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(NimbusSummary o) { - getLeader_result result = new getLeader_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(TopologyInfo o) { + getTopologyInfo_result result = new getTopologyInfo_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7323,8 +7296,150 @@ public void onComplete(NimbusSummary o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getLeader_result result = new getLeader_result(); - if (e instanceof AuthorizationException) { + getTopologyInfo_result result = new getTopologyInfo_result(); + if (e instanceof NotAliveException) { + result.e = (NotAliveException) e; + result.set_e_isSet(true); + msg = result; + } else if (e instanceof AuthorizationException) { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.storm.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.storm.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTopologyInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopologyInfo(args.id,resultHandler); + } + } + + public static class getTopologyInfoWithOpts extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopologyInfoWithOpts() { + super("getTopologyInfoWithOpts"); + } + + public getTopologyInfoWithOpts_args getEmptyArgsInstance() { + return new getTopologyInfoWithOpts_args(); + } + + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.storm.thrift.AsyncProcessFunction fcall = this; + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(TopologyInfo o) { + getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.storm.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; + org.apache.storm.thrift.TSerializable msg; + getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result(); + if (e instanceof NotAliveException) { + result.e = (NotAliveException) e; + result.set_e_isSet(true); + msg = result; + } else if (e instanceof AuthorizationException) { + result.aze = (AuthorizationException) e; + result.set_aze_isSet(true); + msg = result; + } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.storm.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.storm.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getTopologyInfoWithOpts_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopologyInfoWithOpts(args.id, args.options,resultHandler); + } + } + + public static class getTopologyPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopologyPageInfo() { + super("getTopologyPageInfo"); + } + + public getTopologyPageInfo_args getEmptyArgsInstance() { + return new getTopologyPageInfo_args(); + } + + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.storm.thrift.AsyncProcessFunction fcall = this; + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(TopologyPageInfo o) { + getTopologyPageInfo_result result = new getTopologyPageInfo_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.storm.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; + org.apache.storm.thrift.TSerializable msg; + getTopologyPageInfo_result result = new getTopologyPageInfo_result(); + if (e instanceof NotAliveException) { + result.e = (NotAliveException) e; + result.set_e_isSet(true); + msg = result; + } else if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7355,27 +7470,26 @@ protected boolean isOneway() { return false; } - public void start(I iface, getLeader_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getLeader(resultHandler); + public void start(I iface, getTopologyPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopologyPageInfo(args.id, args.window, args.is_include_sys,resultHandler); } } - public static class isTopologyNameAllowed extends org.apache.storm.thrift.AsyncProcessFunction { - public isTopologyNameAllowed() { - super("isTopologyNameAllowed"); + public static class getSupervisorPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { + public getSupervisorPageInfo() { + super("getSupervisorPageInfo"); } - public isTopologyNameAllowed_args getEmptyArgsInstance() { - return new isTopologyNameAllowed_args(); + public getSupervisorPageInfo_args getEmptyArgsInstance() { + return new getSupervisorPageInfo_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(java.lang.Boolean o) { - isTopologyNameAllowed_result result = new isTopologyNameAllowed_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(SupervisorPageInfo o) { + getSupervisorPageInfo_result result = new getSupervisorPageInfo_result(); result.success = o; - result.set_success_isSet(true); try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.storm.thrift.transport.TTransportException e) { @@ -7389,8 +7503,12 @@ public void onComplete(java.lang.Boolean o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - isTopologyNameAllowed_result result = new isTopologyNameAllowed_result(); - if (e instanceof AuthorizationException) { + getSupervisorPageInfo_result result = new getSupervisorPageInfo_result(); + if (e instanceof NotAliveException) { + result.e = (NotAliveException) e; + result.set_e_isSet(true); + msg = result; + } else if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7421,25 +7539,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, isTopologyNameAllowed_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.isTopologyNameAllowed(args.name,resultHandler); + public void start(I iface, getSupervisorPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getSupervisorPageInfo(args.id, args.host, args.is_include_sys,resultHandler); } } - public static class getTopologyInfo extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopologyInfo() { - super("getTopologyInfo"); + public static class getComponentPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { + public getComponentPageInfo() { + super("getComponentPageInfo"); } - public getTopologyInfo_args getEmptyArgsInstance() { - return new getTopologyInfo_args(); + public getComponentPageInfo_args getEmptyArgsInstance() { + return new getComponentPageInfo_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(TopologyInfo o) { - getTopologyInfo_result result = new getTopologyInfo_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(ComponentPageInfo o) { + getComponentPageInfo_result result = new getComponentPageInfo_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7454,7 +7572,7 @@ public void onComplete(TopologyInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopologyInfo_result result = new getTopologyInfo_result(); + getComponentPageInfo_result result = new getComponentPageInfo_result(); if (e instanceof NotAliveException) { result.e = (NotAliveException) e; result.set_e_isSet(true); @@ -7490,25 +7608,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getTopologyInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopologyInfo(args.id,resultHandler); + public void start(I iface, getComponentPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getComponentPageInfo(args.topology_id, args.component_id, args.window, args.is_include_sys,resultHandler); } } - public static class getTopologyInfoWithOpts extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopologyInfoWithOpts() { - super("getTopologyInfoWithOpts"); + public static class getTopologyConf extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopologyConf() { + super("getTopologyConf"); } - public getTopologyInfoWithOpts_args getEmptyArgsInstance() { - return new getTopologyInfoWithOpts_args(); + public getTopologyConf_args getEmptyArgsInstance() { + return new getTopologyConf_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(TopologyInfo o) { - getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(java.lang.String o) { + getTopologyConf_result result = new getTopologyConf_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7523,7 +7641,7 @@ public void onComplete(TopologyInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopologyInfoWithOpts_result result = new getTopologyInfoWithOpts_result(); + getTopologyConf_result result = new getTopologyConf_result(); if (e instanceof NotAliveException) { result.e = (NotAliveException) e; result.set_e_isSet(true); @@ -7559,25 +7677,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getTopologyInfoWithOpts_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopologyInfoWithOpts(args.id, args.options,resultHandler); + public void start(I iface, getTopologyConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopologyConf(args.id,resultHandler); } } - public static class getTopologyPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopologyPageInfo() { - super("getTopologyPageInfo"); + public static class getTopology extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopology() { + super("getTopology"); } - public getTopologyPageInfo_args getEmptyArgsInstance() { - return new getTopologyPageInfo_args(); + public getTopology_args getEmptyArgsInstance() { + return new getTopology_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(TopologyPageInfo o) { - getTopologyPageInfo_result result = new getTopologyPageInfo_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(StormTopology o) { + getTopology_result result = new getTopology_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7592,7 +7710,7 @@ public void onComplete(TopologyPageInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopologyPageInfo_result result = new getTopologyPageInfo_result(); + getTopology_result result = new getTopology_result(); if (e instanceof NotAliveException) { result.e = (NotAliveException) e; result.set_e_isSet(true); @@ -7628,25 +7746,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getTopologyPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopologyPageInfo(args.id, args.window, args.is_include_sys,resultHandler); + public void start(I iface, getTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopology(args.id,resultHandler); } } - public static class getSupervisorPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { - public getSupervisorPageInfo() { - super("getSupervisorPageInfo"); + public static class getUserTopology extends org.apache.storm.thrift.AsyncProcessFunction { + public getUserTopology() { + super("getUserTopology"); } - public getSupervisorPageInfo_args getEmptyArgsInstance() { - return new getSupervisorPageInfo_args(); + public getUserTopology_args getEmptyArgsInstance() { + return new getUserTopology_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(SupervisorPageInfo o) { - getSupervisorPageInfo_result result = new getSupervisorPageInfo_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(StormTopology o) { + getUserTopology_result result = new getUserTopology_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7661,7 +7779,7 @@ public void onComplete(SupervisorPageInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getSupervisorPageInfo_result result = new getSupervisorPageInfo_result(); + getUserTopology_result result = new getUserTopology_result(); if (e instanceof NotAliveException) { result.e = (NotAliveException) e; result.set_e_isSet(true); @@ -7697,25 +7815,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getSupervisorPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getSupervisorPageInfo(args.id, args.host, args.is_include_sys,resultHandler); + public void start(I iface, getUserTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getUserTopology(args.id,resultHandler); } } - public static class getComponentPageInfo extends org.apache.storm.thrift.AsyncProcessFunction { - public getComponentPageInfo() { - super("getComponentPageInfo"); + public static class getTopologyHistory extends org.apache.storm.thrift.AsyncProcessFunction { + public getTopologyHistory() { + super("getTopologyHistory"); } - public getComponentPageInfo_args getEmptyArgsInstance() { - return new getComponentPageInfo_args(); + public getTopologyHistory_args getEmptyArgsInstance() { + return new getTopologyHistory_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(ComponentPageInfo o) { - getComponentPageInfo_result result = new getComponentPageInfo_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(TopologyHistoryInfo o) { + getTopologyHistory_result result = new getTopologyHistory_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7730,12 +7848,8 @@ public void onComplete(ComponentPageInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getComponentPageInfo_result result = new getComponentPageInfo_result(); - if (e instanceof NotAliveException) { - result.e = (NotAliveException) e; - result.set_e_isSet(true); - msg = result; - } else if (e instanceof AuthorizationException) { + getTopologyHistory_result result = new getTopologyHistory_result(); + if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7766,25 +7880,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getComponentPageInfo_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getComponentPageInfo(args.topology_id, args.component_id, args.window, args.is_include_sys,resultHandler); + public void start(I iface, getTopologyHistory_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getTopologyHistory(args.user,resultHandler); } } - public static class getTopologyConf extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopologyConf() { - super("getTopologyConf"); + public static class getOwnerResourceSummaries extends org.apache.storm.thrift.AsyncProcessFunction> { + public getOwnerResourceSummaries() { + super("getOwnerResourceSummaries"); } - public getTopologyConf_args getEmptyArgsInstance() { - return new getTopologyConf_args(); + public getOwnerResourceSummaries_args getEmptyArgsInstance() { + return new getOwnerResourceSummaries_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(java.lang.String o) { - getTopologyConf_result result = new getTopologyConf_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback>() { + public void onComplete(java.util.List o) { + getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7799,12 +7913,8 @@ public void onComplete(java.lang.String o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopologyConf_result result = new getTopologyConf_result(); - if (e instanceof NotAliveException) { - result.e = (NotAliveException) e; - result.set_e_isSet(true); - msg = result; - } else if (e instanceof AuthorizationException) { + getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result(); + if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7835,25 +7945,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getTopologyConf_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopologyConf(args.id,resultHandler); + public void start(I iface, getOwnerResourceSummaries_args args, org.apache.storm.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.storm.thrift.TException { + iface.getOwnerResourceSummaries(args.owner,resultHandler); } } - public static class getTopology extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopology() { - super("getTopology"); + public static class getSupervisorAssignments extends org.apache.storm.thrift.AsyncProcessFunction { + public getSupervisorAssignments() { + super("getSupervisorAssignments"); } - public getTopology_args getEmptyArgsInstance() { - return new getTopology_args(); + public getSupervisorAssignments_args getEmptyArgsInstance() { + return new getSupervisorAssignments_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(StormTopology o) { - getTopology_result result = new getTopology_result(); + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(SupervisorAssignments o) { + getSupervisorAssignments_result result = new getSupervisorAssignments_result(); result.success = o; try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); @@ -7868,12 +7978,8 @@ public void onComplete(StormTopology o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopology_result result = new getTopology_result(); - if (e instanceof NotAliveException) { - result.e = (NotAliveException) e; - result.set_e_isSet(true); - msg = result; - } else if (e instanceof AuthorizationException) { + getSupervisorAssignments_result result = new getSupervisorAssignments_result(); + if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7904,26 +8010,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopology(args.id,resultHandler); + public void start(I iface, getSupervisorAssignments_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.getSupervisorAssignments(args.node,resultHandler); } } - public static class getUserTopology extends org.apache.storm.thrift.AsyncProcessFunction { - public getUserTopology() { - super("getUserTopology"); + public static class sendSupervisorWorkerHeartbeats extends org.apache.storm.thrift.AsyncProcessFunction { + public sendSupervisorWorkerHeartbeats() { + super("sendSupervisorWorkerHeartbeats"); } - public getUserTopology_args getEmptyArgsInstance() { - return new getUserTopology_args(); + public sendSupervisorWorkerHeartbeats_args getEmptyArgsInstance() { + return new sendSupervisorWorkerHeartbeats_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(StormTopology o) { - getUserTopology_result result = new getUserTopology_result(); - result.success = o; + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(Void o) { + sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result(); try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.storm.thrift.transport.TTransportException e) { @@ -7937,12 +8042,8 @@ public void onComplete(StormTopology o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getUserTopology_result result = new getUserTopology_result(); - if (e instanceof NotAliveException) { - result.e = (NotAliveException) e; - result.set_e_isSet(true); - msg = result; - } else if (e instanceof AuthorizationException) { + sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result(); + if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); msg = result; @@ -7973,26 +8074,25 @@ protected boolean isOneway() { return false; } - public void start(I iface, getUserTopology_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getUserTopology(args.id,resultHandler); + public void start(I iface, sendSupervisorWorkerHeartbeats_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { + iface.sendSupervisorWorkerHeartbeats(args.heartbeats,resultHandler); } } - public static class getTopologyHistory extends org.apache.storm.thrift.AsyncProcessFunction { - public getTopologyHistory() { - super("getTopologyHistory"); + public static class sendSupervisorWorkerHeartbeat extends org.apache.storm.thrift.AsyncProcessFunction { + public sendSupervisorWorkerHeartbeat() { + super("sendSupervisorWorkerHeartbeat"); } - public getTopologyHistory_args getEmptyArgsInstance() { - return new getTopologyHistory_args(); + public sendSupervisorWorkerHeartbeat_args getEmptyArgsInstance() { + return new sendSupervisorWorkerHeartbeat_args(); } - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(TopologyHistoryInfo o) { - getTopologyHistory_result result = new getTopologyHistory_result(); - result.success = o; + return new org.apache.storm.thrift.async.AsyncMethodCallback() { + public void onComplete(Void o) { + sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result(); try { fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.storm.thrift.transport.TTransportException e) { @@ -8006,272 +8106,14 @@ public void onComplete(TopologyHistoryInfo o) { public void onError(java.lang.Exception e) { byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; org.apache.storm.thrift.TSerializable msg; - getTopologyHistory_result result = new getTopologyHistory_result(); + sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result(); if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(true); - msg = result; - } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.storm.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.storm.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getTopologyHistory_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getTopologyHistory(args.user,resultHandler); - } - } - - public static class getOwnerResourceSummaries extends org.apache.storm.thrift.AsyncProcessFunction> { - public getOwnerResourceSummaries() { - super("getOwnerResourceSummaries"); - } - - public getOwnerResourceSummaries_args getEmptyArgsInstance() { - return new getOwnerResourceSummaries_args(); - } - - public org.apache.storm.thrift.async.AsyncMethodCallback> getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback>() { - public void onComplete(java.util.List o) { - getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.storm.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; - org.apache.storm.thrift.TSerializable msg; - getOwnerResourceSummaries_result result = new getOwnerResourceSummaries_result(); - if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.storm.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.storm.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getOwnerResourceSummaries_args args, org.apache.storm.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.storm.thrift.TException { - iface.getOwnerResourceSummaries(args.owner,resultHandler); - } - } - - public static class getSupervisorAssignments extends org.apache.storm.thrift.AsyncProcessFunction { - public getSupervisorAssignments() { - super("getSupervisorAssignments"); - } - - public getSupervisorAssignments_args getEmptyArgsInstance() { - return new getSupervisorAssignments_args(); - } - - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(SupervisorAssignments o) { - getSupervisorAssignments_result result = new getSupervisorAssignments_result(); - result.success = o; - try { - fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.storm.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; - org.apache.storm.thrift.TSerializable msg; - getSupervisorAssignments_result result = new getSupervisorAssignments_result(); - if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.storm.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.storm.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getSupervisorAssignments_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.getSupervisorAssignments(args.node,resultHandler); - } - } - - public static class sendSupervisorWorkerHeartbeats extends org.apache.storm.thrift.AsyncProcessFunction { - public sendSupervisorWorkerHeartbeats() { - super("sendSupervisorWorkerHeartbeats"); - } - - public sendSupervisorWorkerHeartbeats_args getEmptyArgsInstance() { - return new sendSupervisorWorkerHeartbeats_args(); - } - - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(Void o) { - sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result(); - try { - fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.storm.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; - org.apache.storm.thrift.TSerializable msg; - sendSupervisorWorkerHeartbeats_result result = new sendSupervisorWorkerHeartbeats_result(); - if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { - _LOGGER.error("TTransportException inside handler", e); - fb.close(); - return; - } else if (e instanceof org.apache.storm.thrift.TApplicationException) { - _LOGGER.error("TApplicationException inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.storm.thrift.TApplicationException)e; - } else { - _LOGGER.error("Exception inside handler", e); - msgType = org.apache.storm.thrift.protocol.TMessageType.EXCEPTION; - msg = new org.apache.storm.thrift.TApplicationException(org.apache.storm.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - } catch (java.lang.Exception ex) { - _LOGGER.error("Exception writing to internal frame buffer", ex); - fb.close(); - } - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, sendSupervisorWorkerHeartbeats_args args, org.apache.storm.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.storm.thrift.TException { - iface.sendSupervisorWorkerHeartbeats(args.heartbeats,resultHandler); - } - } - - public static class sendSupervisorWorkerHeartbeat extends org.apache.storm.thrift.AsyncProcessFunction { - public sendSupervisorWorkerHeartbeat() { - super("sendSupervisorWorkerHeartbeat"); - } - - public sendSupervisorWorkerHeartbeat_args getEmptyArgsInstance() { - return new sendSupervisorWorkerHeartbeat_args(); - } - - public org.apache.storm.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.storm.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { - final org.apache.storm.thrift.AsyncProcessFunction fcall = this; - return new org.apache.storm.thrift.async.AsyncMethodCallback() { - public void onComplete(Void o) { - sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result(); - try { - fcall.sendResponse(fb, result, org.apache.storm.thrift.protocol.TMessageType.REPLY,seqid); - } catch (org.apache.storm.thrift.transport.TTransportException e) { - _LOGGER.error("TTransportException writing to internal frame buffer", e); - fb.close(); - } catch (java.lang.Exception e) { - _LOGGER.error("Exception writing to internal frame buffer", e); - onError(e); - } - } - public void onError(java.lang.Exception e) { - byte msgType = org.apache.storm.thrift.protocol.TMessageType.REPLY; - org.apache.storm.thrift.TSerializable msg; - sendSupervisorWorkerHeartbeat_result result = new sendSupervisorWorkerHeartbeat_result(); - if (e instanceof AuthorizationException) { - result.aze = (AuthorizationException) e; - result.set_aze_isSet(true); - msg = result; - } else if (e instanceof NotAliveException) { - result.e = (NotAliveException) e; - result.set_e_isSet(true); + msg = result; + } else if (e instanceof NotAliveException) { + result.e = (NotAliveException) e; + result.set_e_isSet(true); msg = result; } else if (e instanceof org.apache.storm.thrift.transport.TTransportException) { _LOGGER.error("TTransportException inside handler", e); @@ -33279,909 +33121,14 @@ public void set_aze_isSet(boolean value) { public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unset_success(); - } else { - set_success((java.lang.String)value); - } - break; - - case AZE: - if (value == null) { - unset_aze(); - } else { - set_aze((AuthorizationException)value); - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return get_success(); - - case AZE: - return get_aze(); - - } - throw new java.lang.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 java.lang.IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return is_set_success(); - case AZE: - return is_set_aze(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof beginFileUpload_result) - return this.equals((beginFileUpload_result)that); - return false; - } - - public boolean equals(beginFileUpload_result that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_success = true && this.is_set_success(); - boolean that_present_success = true && that.is_set_success(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_aze = true && this.is_set_aze(); - boolean that_present_aze = true && that.is_set_aze(); - if (this_present_aze || that_present_aze) { - if (!(this_present_aze && that_present_aze)) - return false; - if (!this.aze.equals(that.aze)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287); - if (is_set_success()) - hashCode = hashCode * 8191 + success.hashCode(); - - hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287); - if (is_set_aze()) - hashCode = hashCode * 8191 + aze.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(beginFileUpload_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_success()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_aze()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.aze, other.aze); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.storm.thrift.protocol.TProtocol iprot) throws org.apache.storm.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.apache.storm.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFileUpload_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("aze:"); - if (this.aze == null) { - sb.append("null"); - } else { - sb.append(this.aze); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.storm.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.storm.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.storm.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class beginFileUpload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileUpload_resultStandardScheme getScheme() { - return new beginFileUpload_resultStandardScheme(); - } - } - - private static class beginFileUpload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.set_success_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // AZE - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRUCT) { - struct.aze = new AuthorizationException(); - struct.aze.read(iprot); - struct.set_aze_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - struct.validate(); - } - - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } - if (struct.aze != null) { - oprot.writeFieldBegin(AZE_FIELD_DESC); - struct.aze.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class beginFileUpload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileUpload_resultTupleScheme getScheme() { - return new beginFileUpload_resultTupleScheme(); - } - } - - private static class beginFileUpload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_success()) { - optionals.set(0); - } - if (struct.is_set_aze()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.is_set_success()) { - oprot.writeString(struct.success); - } - if (struct.is_set_aze()) { - struct.aze.write(oprot); - } - } - - @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.set_success_isSet(true); - } - if (incoming.get(1)) { - struct.aze = new AuthorizationException(); - struct.aze.read(iprot); - struct.set_aze_isSet(true); - } - } - } - - private static S scheme(org.apache.storm.thrift.protocol.TProtocol proto) { - return (org.apache.storm.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class uploadChunk_args implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("uploadChunk_args"); - - private static final org.apache.storm.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("location", org.apache.storm.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.storm.thrift.protocol.TField CHUNK_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("chunk", org.apache.storm.thrift.protocol.TType.STRING, (short)2); - - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new uploadChunk_argsStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new uploadChunk_argsTupleSchemeFactory(); - - private java.lang.String location; // required - private java.nio.ByteBuffer chunk; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { - LOCATION((short)1, "location"), - CHUNK((short)2, "chunk"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.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: // LOCATION - return LOCATION; - case 2: // CHUNK - return CHUNK; - 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 java.lang.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(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LOCATION, new org.apache.storm.thrift.meta_data.FieldMetaData("location", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, - new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CHUNK, new org.apache.storm.thrift.meta_data.FieldMetaData("chunk", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, - new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING , true))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap); - } - - public uploadChunk_args() { - } - - public uploadChunk_args( - java.lang.String location, - java.nio.ByteBuffer chunk) - { - this(); - this.location = location; - this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); - } - - /** - * Performs a deep copy on other. - */ - public uploadChunk_args(uploadChunk_args other) { - if (other.is_set_location()) { - this.location = other.location; - } - if (other.is_set_chunk()) { - this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(other.chunk); - } - } - - public uploadChunk_args deepCopy() { - return new uploadChunk_args(this); - } - - @Override - public void clear() { - this.location = null; - this.chunk = null; - } - - public java.lang.String get_location() { - return this.location; - } - - public void set_location(java.lang.String location) { - this.location = location; - } - - public void unset_location() { - this.location = null; - } - - /** Returns true if field location is set (has been assigned a value) and false otherwise */ - public boolean is_set_location() { - return this.location != null; - } - - public void set_location_isSet(boolean value) { - if (!value) { - this.location = null; - } - } - - public byte[] get_chunk() { - set_chunk(org.apache.storm.thrift.TBaseHelper.rightSize(chunk)); - return chunk == null ? null : chunk.array(); - } - - public java.nio.ByteBuffer buffer_for_chunk() { - return org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); - } - - public void set_chunk(byte[] chunk) { - this.chunk = chunk == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(chunk.clone()); - } - - public void set_chunk(java.nio.ByteBuffer chunk) { - this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); - } - - public void unset_chunk() { - this.chunk = null; - } - - /** Returns true if field chunk is set (has been assigned a value) and false otherwise */ - public boolean is_set_chunk() { - return this.chunk != null; - } - - public void set_chunk_isSet(boolean value) { - if (!value) { - this.chunk = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { - case LOCATION: - if (value == null) { - unset_location(); - } else { - set_location((java.lang.String)value); - } - break; - - case CHUNK: - if (value == null) { - unset_chunk(); - } else { - if (value instanceof byte[]) { - set_chunk((byte[])value); - } else { - set_chunk((java.nio.ByteBuffer)value); - } - } - break; - - } - } - - public java.lang.Object getFieldValue(_Fields field) { - switch (field) { - case LOCATION: - return get_location(); - - case CHUNK: - return get_chunk(); - - } - throw new java.lang.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 java.lang.IllegalArgumentException(); - } - - switch (field) { - case LOCATION: - return is_set_location(); - case CHUNK: - return is_set_chunk(); - } - throw new java.lang.IllegalStateException(); - } - - @Override - public boolean equals(java.lang.Object that) { - if (that == null) - return false; - if (that instanceof uploadChunk_args) - return this.equals((uploadChunk_args)that); - return false; - } - - public boolean equals(uploadChunk_args that) { - if (that == null) - return false; - if (this == that) - return true; - - boolean this_present_location = true && this.is_set_location(); - boolean that_present_location = true && that.is_set_location(); - if (this_present_location || that_present_location) { - if (!(this_present_location && that_present_location)) - return false; - if (!this.location.equals(that.location)) - return false; - } - - boolean this_present_chunk = true && this.is_set_chunk(); - boolean that_present_chunk = true && that.is_set_chunk(); - if (this_present_chunk || that_present_chunk) { - if (!(this_present_chunk && that_present_chunk)) - return false; - if (!this.chunk.equals(that.chunk)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - int hashCode = 1; - - hashCode = hashCode * 8191 + ((is_set_location()) ? 131071 : 524287); - if (is_set_location()) - hashCode = hashCode * 8191 + location.hashCode(); - - hashCode = hashCode * 8191 + ((is_set_chunk()) ? 131071 : 524287); - if (is_set_chunk()) - hashCode = hashCode * 8191 + chunk.hashCode(); - - return hashCode; - } - - @Override - public int compareTo(uploadChunk_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = java.lang.Boolean.valueOf(is_set_location()).compareTo(other.is_set_location()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_location()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.location, other.location); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = java.lang.Boolean.valueOf(is_set_chunk()).compareTo(other.is_set_chunk()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_chunk()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.chunk, other.chunk); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.storm.thrift.protocol.TProtocol iprot) throws org.apache.storm.thrift.TException { - scheme(iprot).read(iprot, this); - } - - public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.apache.storm.thrift.TException { - scheme(oprot).write(oprot, this); - } - - @Override - public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("uploadChunk_args("); - boolean first = true; - - sb.append("location:"); - if (this.location == null) { - sb.append("null"); - } else { - sb.append(this.location); - } - first = false; - if (!first) sb.append(", "); - sb.append("chunk:"); - if (this.chunk == null) { - sb.append("null"); - } else { - org.apache.storm.thrift.TBaseHelper.toString(this.chunk, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.storm.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.storm.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { - try { - read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.storm.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class uploadChunk_argsStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public uploadChunk_argsStandardScheme getScheme() { - return new uploadChunk_argsStandardScheme(); - } - } - - private static class uploadChunk_argsStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // LOCATION - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { - struct.location = iprot.readString(); - struct.set_location_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CHUNK - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { - struct.chunk = iprot.readBinary(); - struct.set_chunk_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - struct.validate(); - } - - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.location != null) { - oprot.writeFieldBegin(LOCATION_FIELD_DESC); - oprot.writeString(struct.location); - oprot.writeFieldEnd(); - } - if (struct.chunk != null) { - oprot.writeFieldBegin(CHUNK_FIELD_DESC); - oprot.writeBinary(struct.chunk); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class uploadChunk_argsTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public uploadChunk_argsTupleScheme getScheme() { - return new uploadChunk_argsTupleScheme(); - } - } - - private static class uploadChunk_argsTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { - - @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_location()) { - optionals.set(0); - } - if (struct.is_set_chunk()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.is_set_location()) { - oprot.writeString(struct.location); - } - if (struct.is_set_chunk()) { - oprot.writeBinary(struct.chunk); - } - } - - @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { - org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.location = iprot.readString(); - struct.set_location_isSet(true); - } - if (incoming.get(1)) { - struct.chunk = iprot.readBinary(); - struct.set_chunk_isSet(true); - } - } - } - - private static S scheme(org.apache.storm.thrift.protocol.TProtocol proto) { - return (org.apache.storm.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); - } - } - - public static class uploadChunk_result implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("uploadChunk_result"); - - private static final org.apache.storm.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("aze", org.apache.storm.thrift.protocol.TType.STRUCT, (short)1); - - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new uploadChunk_resultStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new uploadChunk_resultTupleSchemeFactory(); - - private AuthorizationException aze; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { - AZE((short)1, "aze"); - - private static final java.util.Map byName = new java.util.HashMap(); - - static { - for (_Fields field : java.util.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: // AZE - return AZE; - 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 java.lang.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(java.lang.String name) { - return byName.get(name); - } - - private final short _thriftId; - private final java.lang.String _fieldName; - - _Fields(short thriftId, java.lang.String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public java.lang.String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap; - static { - java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.AZE, new org.apache.storm.thrift.meta_data.FieldMetaData("aze", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, - new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, AuthorizationException.class))); - metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap); - } - - public uploadChunk_result() { - } - - public uploadChunk_result( - AuthorizationException aze) - { - this(); - this.aze = aze; - } - - /** - * Performs a deep copy on other. - */ - public uploadChunk_result(uploadChunk_result other) { - if (other.is_set_aze()) { - this.aze = new AuthorizationException(other.aze); - } - } - - public uploadChunk_result deepCopy() { - return new uploadChunk_result(this); - } - - @Override - public void clear() { - this.aze = null; - } - - public AuthorizationException get_aze() { - return this.aze; - } - - public void set_aze(AuthorizationException aze) { - this.aze = aze; - } - - public void unset_aze() { - this.aze = null; - } - - /** Returns true if field aze is set (has been assigned a value) and false otherwise */ - public boolean is_set_aze() { - return this.aze != null; - } - - public void set_aze_isSet(boolean value) { - if (!value) { - this.aze = null; - } - } - - public void setFieldValue(_Fields field, java.lang.Object value) { - switch (field) { + case SUCCESS: + if (value == null) { + unset_success(); + } else { + set_success((java.lang.String)value); + } + break; + case AZE: if (value == null) { unset_aze(); @@ -34195,6 +33142,9 @@ public void setFieldValue(_Fields field, java.lang.Object value) { public java.lang.Object getFieldValue(_Fields field) { switch (field) { + case SUCCESS: + return get_success(); + case AZE: return get_aze(); @@ -34209,6 +33159,8 @@ public boolean isSet(_Fields field) { } switch (field) { + case SUCCESS: + return is_set_success(); case AZE: return is_set_aze(); } @@ -34219,17 +33171,26 @@ public boolean isSet(_Fields field) { public boolean equals(java.lang.Object that) { if (that == null) return false; - if (that instanceof uploadChunk_result) - return this.equals((uploadChunk_result)that); + if (that instanceof beginFileUpload_result) + return this.equals((beginFileUpload_result)that); return false; } - public boolean equals(uploadChunk_result that) { + public boolean equals(beginFileUpload_result that) { if (that == null) return false; if (this == that) return true; + boolean this_present_success = true && this.is_set_success(); + boolean that_present_success = true && that.is_set_success(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + boolean this_present_aze = true && this.is_set_aze(); boolean that_present_aze = true && that.is_set_aze(); if (this_present_aze || that_present_aze) { @@ -34246,6 +33207,10 @@ public boolean equals(uploadChunk_result that) { public int hashCode() { int hashCode = 1; + hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287); + if (is_set_success()) + hashCode = hashCode * 8191 + success.hashCode(); + hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287); if (is_set_aze()) hashCode = hashCode * 8191 + aze.hashCode(); @@ -34254,13 +33219,23 @@ public int hashCode() { } @Override - public int compareTo(uploadChunk_result other) { + public int compareTo(beginFileUpload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); + if (lastComparison != 0) { + return lastComparison; + } + if (is_set_success()) { + lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; @@ -34288,9 +33263,17 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.a @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("uploadChunk_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFileUpload_result("); boolean first = true; + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); sb.append("aze:"); if (this.aze == null) { sb.append("null"); @@ -34323,15 +33306,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class uploadChunk_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public uploadChunk_resultStandardScheme getScheme() { - return new uploadChunk_resultStandardScheme(); + private static class beginFileUpload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public beginFileUpload_resultStandardScheme getScheme() { + return new beginFileUpload_resultStandardScheme(); } } - private static class uploadChunk_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { + private static class beginFileUpload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -34341,6 +33324,14 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_r break; } switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { + struct.success = iprot.readString(); + struct.set_success_isSet(true); + } else { + org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 1: // AZE if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRUCT) { struct.aze = new AuthorizationException(); @@ -34359,10 +33350,15 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_r struct.validate(); } - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(struct.success); + oprot.writeFieldEnd(); + } if (struct.aze != null) { oprot.writeFieldBegin(AZE_FIELD_DESC); struct.aze.write(oprot); @@ -34374,32 +33370,42 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, uploadChunk_ } - private static class uploadChunk_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public uploadChunk_resultTupleScheme getScheme() { - return new uploadChunk_resultTupleScheme(); + private static class beginFileUpload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public beginFileUpload_resultTupleScheme getScheme() { + return new beginFileUpload_resultTupleScheme(); } } - private static class uploadChunk_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { + private static class beginFileUpload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_aze()) { + if (struct.is_set_success()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.is_set_aze()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.is_set_success()) { + oprot.writeString(struct.success); + } if (struct.is_set_aze()) { struct.aze.write(oprot); } } @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol prot, beginFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { + struct.success = iprot.readString(); + struct.set_success_isSet(true); + } + if (incoming.get(1)) { struct.aze = new AuthorizationException(); struct.aze.read(iprot); struct.set_aze_isSet(true); @@ -34412,19 +33418,22 @@ private static S scheme(org.a } } - public static class finishFileUpload_args implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("finishFileUpload_args"); + public static class uploadChunk_args implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("uploadChunk_args"); private static final org.apache.storm.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("location", org.apache.storm.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.storm.thrift.protocol.TField CHUNK_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("chunk", org.apache.storm.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new finishFileUpload_argsStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new finishFileUpload_argsTupleSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new uploadChunk_argsStandardSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new uploadChunk_argsTupleSchemeFactory(); private java.lang.String location; // required + private java.nio.ByteBuffer chunk; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { - LOCATION((short)1, "location"); + LOCATION((short)1, "location"), + CHUNK((short)2, "chunk"); private static final java.util.Map byName = new java.util.HashMap(); @@ -34441,6 +33450,8 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // LOCATION return LOCATION; + case 2: // CHUNK + return CHUNK; default: return null; } @@ -34486,36 +33497,44 @@ public java.lang.String getFieldName() { java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.LOCATION, new org.apache.storm.thrift.meta_data.FieldMetaData("location", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.CHUNK, new org.apache.storm.thrift.meta_data.FieldMetaData("chunk", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, + new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING , true))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap); + org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_args.class, metaDataMap); } - public finishFileUpload_args() { + public uploadChunk_args() { } - public finishFileUpload_args( - java.lang.String location) + public uploadChunk_args( + java.lang.String location, + java.nio.ByteBuffer chunk) { this(); this.location = location; + this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); } /** * Performs a deep copy on other. */ - public finishFileUpload_args(finishFileUpload_args other) { + public uploadChunk_args(uploadChunk_args other) { if (other.is_set_location()) { this.location = other.location; } + if (other.is_set_chunk()) { + this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(other.chunk); + } } - public finishFileUpload_args deepCopy() { - return new finishFileUpload_args(this); + public uploadChunk_args deepCopy() { + return new uploadChunk_args(this); } @Override public void clear() { this.location = null; + this.chunk = null; } public java.lang.String get_location() { @@ -34541,6 +33560,38 @@ public void set_location_isSet(boolean value) { } } + public byte[] get_chunk() { + set_chunk(org.apache.storm.thrift.TBaseHelper.rightSize(chunk)); + return chunk == null ? null : chunk.array(); + } + + public java.nio.ByteBuffer buffer_for_chunk() { + return org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); + } + + public void set_chunk(byte[] chunk) { + this.chunk = chunk == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(chunk.clone()); + } + + public void set_chunk(java.nio.ByteBuffer chunk) { + this.chunk = org.apache.storm.thrift.TBaseHelper.copyBinary(chunk); + } + + public void unset_chunk() { + this.chunk = null; + } + + /** Returns true if field chunk is set (has been assigned a value) and false otherwise */ + public boolean is_set_chunk() { + return this.chunk != null; + } + + public void set_chunk_isSet(boolean value) { + if (!value) { + this.chunk = null; + } + } + public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case LOCATION: @@ -34551,6 +33602,18 @@ public void setFieldValue(_Fields field, java.lang.Object value) { } break; + case CHUNK: + if (value == null) { + unset_chunk(); + } else { + if (value instanceof byte[]) { + set_chunk((byte[])value); + } else { + set_chunk((java.nio.ByteBuffer)value); + } + } + break; + } } @@ -34559,6 +33622,9 @@ public java.lang.Object getFieldValue(_Fields field) { case LOCATION: return get_location(); + case CHUNK: + return get_chunk(); + } throw new java.lang.IllegalStateException(); } @@ -34572,6 +33638,8 @@ public boolean isSet(_Fields field) { switch (field) { case LOCATION: return is_set_location(); + case CHUNK: + return is_set_chunk(); } throw new java.lang.IllegalStateException(); } @@ -34580,12 +33648,12 @@ public boolean isSet(_Fields field) { public boolean equals(java.lang.Object that) { if (that == null) return false; - if (that instanceof finishFileUpload_args) - return this.equals((finishFileUpload_args)that); + if (that instanceof uploadChunk_args) + return this.equals((uploadChunk_args)that); return false; } - public boolean equals(finishFileUpload_args that) { + public boolean equals(uploadChunk_args that) { if (that == null) return false; if (this == that) @@ -34600,6 +33668,15 @@ public boolean equals(finishFileUpload_args that) { return false; } + boolean this_present_chunk = true && this.is_set_chunk(); + boolean that_present_chunk = true && that.is_set_chunk(); + if (this_present_chunk || that_present_chunk) { + if (!(this_present_chunk && that_present_chunk)) + return false; + if (!this.chunk.equals(that.chunk)) + return false; + } + return true; } @@ -34611,11 +33688,15 @@ public int hashCode() { if (is_set_location()) hashCode = hashCode * 8191 + location.hashCode(); + hashCode = hashCode * 8191 + ((is_set_chunk()) ? 131071 : 524287); + if (is_set_chunk()) + hashCode = hashCode * 8191 + chunk.hashCode(); + return hashCode; } @Override - public int compareTo(finishFileUpload_args other) { + public int compareTo(uploadChunk_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -34632,6 +33713,16 @@ public int compareTo(finishFileUpload_args other) { return lastComparison; } } + lastComparison = java.lang.Boolean.valueOf(is_set_chunk()).compareTo(other.is_set_chunk()); + if (lastComparison != 0) { + return lastComparison; + } + if (is_set_chunk()) { + lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.chunk, other.chunk); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -34649,7 +33740,7 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.a @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("finishFileUpload_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("uploadChunk_args("); boolean first = true; sb.append("location:"); @@ -34659,6 +33750,14 @@ public java.lang.String toString() { sb.append(this.location); } first = false; + if (!first) sb.append(", "); + sb.append("chunk:"); + if (this.chunk == null) { + sb.append("null"); + } else { + org.apache.storm.thrift.TBaseHelper.toString(this.chunk, sb); + } + first = false; sb.append(")"); return sb.toString(); } @@ -34684,15 +33783,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class finishFileUpload_argsStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public finishFileUpload_argsStandardScheme getScheme() { - return new finishFileUpload_argsStandardScheme(); + private static class uploadChunk_argsStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public uploadChunk_argsStandardScheme getScheme() { + return new uploadChunk_argsStandardScheme(); } } - private static class finishFileUpload_argsStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { + private static class uploadChunk_argsStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -34710,6 +33809,14 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpl org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 2: // CHUNK + if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { + struct.chunk = iprot.readBinary(); + struct.set_chunk_isSet(true); + } else { + org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -34719,7 +33826,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpl struct.validate(); } - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol oprot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -34728,41 +33835,56 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUp oprot.writeString(struct.location); oprot.writeFieldEnd(); } + if (struct.chunk != null) { + oprot.writeFieldBegin(CHUNK_FIELD_DESC); + oprot.writeBinary(struct.chunk); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } } - private static class finishFileUpload_argsTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public finishFileUpload_argsTupleScheme getScheme() { - return new finishFileUpload_argsTupleScheme(); + private static class uploadChunk_argsTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public uploadChunk_argsTupleScheme getScheme() { + return new uploadChunk_argsTupleScheme(); } } - private static class finishFileUpload_argsTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { + private static class uploadChunk_argsTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_location()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.is_set_chunk()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.is_set_location()) { oprot.writeString(struct.location); } + if (struct.is_set_chunk()) { + oprot.writeBinary(struct.chunk); + } } @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.location = iprot.readString(); struct.set_location_isSet(true); } + if (incoming.get(1)) { + struct.chunk = iprot.readBinary(); + struct.set_chunk_isSet(true); + } } } @@ -34771,13 +33893,13 @@ private static S scheme(org.a } } - public static class finishFileUpload_result implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("finishFileUpload_result"); + public static class uploadChunk_result implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("uploadChunk_result"); private static final org.apache.storm.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("aze", org.apache.storm.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new finishFileUpload_resultStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new finishFileUpload_resultTupleSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new uploadChunk_resultStandardSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new uploadChunk_resultTupleSchemeFactory(); private AuthorizationException aze; // required @@ -34846,13 +33968,13 @@ public java.lang.String getFieldName() { tmpMap.put(_Fields.AZE, new org.apache.storm.thrift.meta_data.FieldMetaData("aze", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, AuthorizationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap); + org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(uploadChunk_result.class, metaDataMap); } - public finishFileUpload_result() { + public uploadChunk_result() { } - public finishFileUpload_result( + public uploadChunk_result( AuthorizationException aze) { this(); @@ -34862,14 +33984,14 @@ public finishFileUpload_result( /** * Performs a deep copy on other. */ - public finishFileUpload_result(finishFileUpload_result other) { + public uploadChunk_result(uploadChunk_result other) { if (other.is_set_aze()) { this.aze = new AuthorizationException(other.aze); } } - public finishFileUpload_result deepCopy() { - return new finishFileUpload_result(this); + public uploadChunk_result deepCopy() { + return new uploadChunk_result(this); } @Override @@ -34939,12 +34061,12 @@ public boolean isSet(_Fields field) { public boolean equals(java.lang.Object that) { if (that == null) return false; - if (that instanceof finishFileUpload_result) - return this.equals((finishFileUpload_result)that); + if (that instanceof uploadChunk_result) + return this.equals((uploadChunk_result)that); return false; } - public boolean equals(finishFileUpload_result that) { + public boolean equals(uploadChunk_result that) { if (that == null) return false; if (this == that) @@ -34974,7 +34096,7 @@ public int hashCode() { } @Override - public int compareTo(finishFileUpload_result other) { + public int compareTo(uploadChunk_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } @@ -35008,7 +34130,7 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.a @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("finishFileUpload_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("uploadChunk_result("); boolean first = true; sb.append("aze:"); @@ -35043,15 +34165,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class finishFileUpload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public finishFileUpload_resultStandardScheme getScheme() { - return new finishFileUpload_resultStandardScheme(); + private static class uploadChunk_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public uploadChunk_resultStandardScheme getScheme() { + return new uploadChunk_resultStandardScheme(); } } - private static class finishFileUpload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { + private static class uploadChunk_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol iprot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -35079,7 +34201,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpl struct.validate(); } - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol oprot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); @@ -35094,16 +34216,16 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUp } - private static class finishFileUpload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public finishFileUpload_resultTupleScheme getScheme() { - return new finishFileUpload_resultTupleScheme(); + private static class uploadChunk_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public uploadChunk_resultTupleScheme getScheme() { + return new uploadChunk_resultTupleScheme(); } } - private static class finishFileUpload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { + private static class uploadChunk_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_aze()) { @@ -35116,7 +34238,7 @@ public void write(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpl } @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol prot, uploadChunk_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { @@ -35132,19 +34254,19 @@ private static S scheme(org.a } } - public static class beginFileDownload_args implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("beginFileDownload_args"); + public static class finishFileUpload_args implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("finishFileUpload_args"); - private static final org.apache.storm.thrift.protocol.TField FILE_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("file", org.apache.storm.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.storm.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("location", org.apache.storm.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new beginFileDownload_argsStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new beginFileDownload_argsTupleSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new finishFileUpload_argsStandardSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new finishFileUpload_argsTupleSchemeFactory(); - private java.lang.String file; // required + private java.lang.String location; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { - FILE((short)1, "file"); + LOCATION((short)1, "location"); private static final java.util.Map byName = new java.util.HashMap(); @@ -35159,8 +34281,8 @@ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // FILE - return FILE; + case 1: // LOCATION + return LOCATION; default: return null; } @@ -35204,70 +34326,70 @@ public java.lang.String getFieldName() { public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FILE, new org.apache.storm.thrift.meta_data.FieldMetaData("file", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LOCATION, new org.apache.storm.thrift.meta_data.FieldMetaData("location", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_args.class, metaDataMap); + org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_args.class, metaDataMap); } - public beginFileDownload_args() { + public finishFileUpload_args() { } - public beginFileDownload_args( - java.lang.String file) + public finishFileUpload_args( + java.lang.String location) { this(); - this.file = file; + this.location = location; } /** * Performs a deep copy on other. */ - public beginFileDownload_args(beginFileDownload_args other) { - if (other.is_set_file()) { - this.file = other.file; + public finishFileUpload_args(finishFileUpload_args other) { + if (other.is_set_location()) { + this.location = other.location; } } - public beginFileDownload_args deepCopy() { - return new beginFileDownload_args(this); + public finishFileUpload_args deepCopy() { + return new finishFileUpload_args(this); } @Override public void clear() { - this.file = null; + this.location = null; } - public java.lang.String get_file() { - return this.file; + public java.lang.String get_location() { + return this.location; } - public void set_file(java.lang.String file) { - this.file = file; + public void set_location(java.lang.String location) { + this.location = location; } - public void unset_file() { - this.file = null; + public void unset_location() { + this.location = null; } - /** Returns true if field file is set (has been assigned a value) and false otherwise */ - public boolean is_set_file() { - return this.file != null; + /** Returns true if field location is set (has been assigned a value) and false otherwise */ + public boolean is_set_location() { + return this.location != null; } - public void set_file_isSet(boolean value) { + public void set_location_isSet(boolean value) { if (!value) { - this.file = null; + this.location = null; } } public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { - case FILE: + case LOCATION: if (value == null) { - unset_file(); + unset_location(); } else { - set_file((java.lang.String)value); + set_location((java.lang.String)value); } break; @@ -35276,8 +34398,8 @@ public void setFieldValue(_Fields field, java.lang.Object value) { public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case FILE: - return get_file(); + case LOCATION: + return get_location(); } throw new java.lang.IllegalStateException(); @@ -35290,8 +34412,8 @@ public boolean isSet(_Fields field) { } switch (field) { - case FILE: - return is_set_file(); + case LOCATION: + return is_set_location(); } throw new java.lang.IllegalStateException(); } @@ -35300,23 +34422,23 @@ public boolean isSet(_Fields field) { public boolean equals(java.lang.Object that) { if (that == null) return false; - if (that instanceof beginFileDownload_args) - return this.equals((beginFileDownload_args)that); + if (that instanceof finishFileUpload_args) + return this.equals((finishFileUpload_args)that); return false; } - public boolean equals(beginFileDownload_args that) { + public boolean equals(finishFileUpload_args that) { if (that == null) return false; if (this == that) return true; - boolean this_present_file = true && this.is_set_file(); - boolean that_present_file = true && that.is_set_file(); - if (this_present_file || that_present_file) { - if (!(this_present_file && that_present_file)) + boolean this_present_location = true && this.is_set_location(); + boolean that_present_location = true && that.is_set_location(); + if (this_present_location || that_present_location) { + if (!(this_present_location && that_present_location)) return false; - if (!this.file.equals(that.file)) + if (!this.location.equals(that.location)) return false; } @@ -35327,27 +34449,27 @@ public boolean equals(beginFileDownload_args that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((is_set_file()) ? 131071 : 524287); - if (is_set_file()) - hashCode = hashCode * 8191 + file.hashCode(); + hashCode = hashCode * 8191 + ((is_set_location()) ? 131071 : 524287); + if (is_set_location()) + hashCode = hashCode * 8191 + location.hashCode(); return hashCode; } @Override - public int compareTo(beginFileDownload_args other) { + public int compareTo(finishFileUpload_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(is_set_file()).compareTo(other.is_set_file()); + lastComparison = java.lang.Boolean.valueOf(is_set_location()).compareTo(other.is_set_location()); if (lastComparison != 0) { return lastComparison; } - if (is_set_file()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.file, other.file); + if (is_set_location()) { + lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.location, other.location); if (lastComparison != 0) { return lastComparison; } @@ -35369,14 +34491,14 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.a @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFileDownload_args("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("finishFileUpload_args("); boolean first = true; - sb.append("file:"); - if (this.file == null) { + sb.append("location:"); + if (this.location == null) { sb.append("null"); } else { - sb.append(this.file); + sb.append(this.location); } first = false; sb.append(")"); @@ -35404,15 +34526,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class beginFileDownload_argsStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileDownload_argsStandardScheme getScheme() { - return new beginFileDownload_argsStandardScheme(); + private static class finishFileUpload_argsStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public finishFileUpload_argsStandardScheme getScheme() { + return new finishFileUpload_argsStandardScheme(); } } - private static class beginFileDownload_argsStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { + private static class finishFileUpload_argsStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDownload_args struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -35422,10 +34544,10 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDown break; } switch (schemeField.id) { - case 1: // FILE + case 1: // LOCATION if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { - struct.file = iprot.readString(); - struct.set_file_isSet(true); + struct.location = iprot.readString(); + struct.set_location_isSet(true); } else { org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -35439,13 +34561,13 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDown struct.validate(); } - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileDownload_args struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.file != null) { - oprot.writeFieldBegin(FILE_FIELD_DESC); - oprot.writeString(struct.file); + if (struct.location != null) { + oprot.writeFieldBegin(LOCATION_FIELD_DESC); + oprot.writeString(struct.location); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -35454,34 +34576,34 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileDow } - private static class beginFileDownload_argsTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileDownload_argsTupleScheme getScheme() { - return new beginFileDownload_argsTupleScheme(); + private static class finishFileUpload_argsTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public finishFileUpload_argsTupleScheme getScheme() { + return new finishFileUpload_argsTupleScheme(); } } - private static class beginFileDownload_argsTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { + private static class finishFileUpload_argsTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, beginFileDownload_args struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_file()) { + if (struct.is_set_location()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); - if (struct.is_set_file()) { - oprot.writeString(struct.file); + if (struct.is_set_location()) { + oprot.writeString(struct.location); } } @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, beginFileDownload_args struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_args struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.file = iprot.readString(); - struct.set_file_isSet(true); + struct.location = iprot.readString(); + struct.set_location_isSet(true); } } } @@ -35491,21 +34613,18 @@ private static S scheme(org.a } } - public static class beginFileDownload_result implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("beginFileDownload_result"); + public static class finishFileUpload_result implements org.apache.storm.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("finishFileUpload_result"); - private static final org.apache.storm.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("success", org.apache.storm.thrift.protocol.TType.STRING, (short)0); private static final org.apache.storm.thrift.protocol.TField AZE_FIELD_DESC = new org.apache.storm.thrift.protocol.TField("aze", org.apache.storm.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new beginFileDownload_resultStandardSchemeFactory(); - private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new beginFileDownload_resultTupleSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new finishFileUpload_resultStandardSchemeFactory(); + private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new finishFileUpload_resultTupleSchemeFactory(); - private java.lang.String success; // required private AuthorizationException aze; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), AZE((short)1, "aze"); private static final java.util.Map byName = new java.util.HashMap(); @@ -35521,8 +34640,6 @@ public enum _Fields implements org.apache.storm.thrift.TFieldIdEnum { */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; case 1: // AZE return AZE; default: @@ -35568,71 +34685,40 @@ public java.lang.String getFieldName() { public static final java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> metaDataMap; static { java.util.Map<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.storm.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.storm.thrift.meta_data.FieldMetaData("success", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, - new org.apache.storm.thrift.meta_data.FieldValueMetaData(org.apache.storm.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AZE, new org.apache.storm.thrift.meta_data.FieldMetaData("aze", org.apache.storm.thrift.TFieldRequirementType.DEFAULT, new org.apache.storm.thrift.meta_data.StructMetaData(org.apache.storm.thrift.protocol.TType.STRUCT, AuthorizationException.class))); metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); - org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(beginFileDownload_result.class, metaDataMap); + org.apache.storm.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finishFileUpload_result.class, metaDataMap); } - public beginFileDownload_result() { + public finishFileUpload_result() { } - public beginFileDownload_result( - java.lang.String success, + public finishFileUpload_result( AuthorizationException aze) { this(); - this.success = success; this.aze = aze; } /** * Performs a deep copy on other. */ - public beginFileDownload_result(beginFileDownload_result other) { - if (other.is_set_success()) { - this.success = other.success; - } + public finishFileUpload_result(finishFileUpload_result other) { if (other.is_set_aze()) { this.aze = new AuthorizationException(other.aze); } } - public beginFileDownload_result deepCopy() { - return new beginFileDownload_result(this); + public finishFileUpload_result deepCopy() { + return new finishFileUpload_result(this); } @Override public void clear() { - this.success = null; this.aze = null; } - public java.lang.String get_success() { - return this.success; - } - - public void set_success(java.lang.String success) { - this.success = success; - } - - public void unset_success() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean is_set_success() { - return this.success != null; - } - - public void set_success_isSet(boolean value) { - if (!value) { - this.success = null; - } - } - public AuthorizationException get_aze() { return this.aze; } @@ -35658,14 +34744,6 @@ public void set_aze_isSet(boolean value) { public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { - case SUCCESS: - if (value == null) { - unset_success(); - } else { - set_success((java.lang.String)value); - } - break; - case AZE: if (value == null) { unset_aze(); @@ -35679,9 +34757,6 @@ public void setFieldValue(_Fields field, java.lang.Object value) { public java.lang.Object getFieldValue(_Fields field) { switch (field) { - case SUCCESS: - return get_success(); - case AZE: return get_aze(); @@ -35696,8 +34771,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case SUCCESS: - return is_set_success(); case AZE: return is_set_aze(); } @@ -35708,26 +34781,17 @@ public boolean isSet(_Fields field) { public boolean equals(java.lang.Object that) { if (that == null) return false; - if (that instanceof beginFileDownload_result) - return this.equals((beginFileDownload_result)that); + if (that instanceof finishFileUpload_result) + return this.equals((finishFileUpload_result)that); return false; } - public boolean equals(beginFileDownload_result that) { + public boolean equals(finishFileUpload_result that) { if (that == null) return false; if (this == that) return true; - boolean this_present_success = true && this.is_set_success(); - boolean that_present_success = true && that.is_set_success(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - boolean this_present_aze = true && this.is_set_aze(); boolean that_present_aze = true && that.is_set_aze(); if (this_present_aze || that_present_aze) { @@ -35744,10 +34808,6 @@ public boolean equals(beginFileDownload_result that) { public int hashCode() { int hashCode = 1; - hashCode = hashCode * 8191 + ((is_set_success()) ? 131071 : 524287); - if (is_set_success()) - hashCode = hashCode * 8191 + success.hashCode(); - hashCode = hashCode * 8191 + ((is_set_aze()) ? 131071 : 524287); if (is_set_aze()) hashCode = hashCode * 8191 + aze.hashCode(); @@ -35756,23 +34816,13 @@ public int hashCode() { } @Override - public int compareTo(beginFileDownload_result other) { + public int compareTo(finishFileUpload_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; - lastComparison = java.lang.Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); - if (lastComparison != 0) { - return lastComparison; - } - if (is_set_success()) { - lastComparison = org.apache.storm.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = java.lang.Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; @@ -35800,17 +34850,9 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot) throws org.a @Override public java.lang.String toString() { - java.lang.StringBuilder sb = new java.lang.StringBuilder("beginFileDownload_result("); + java.lang.StringBuilder sb = new java.lang.StringBuilder("finishFileUpload_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); sb.append("aze:"); if (this.aze == null) { sb.append("null"); @@ -35843,15 +34885,15 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class beginFileDownload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileDownload_resultStandardScheme getScheme() { - return new beginFileDownload_resultStandardScheme(); + private static class finishFileUpload_resultStandardSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public finishFileUpload_resultStandardScheme getScheme() { + return new finishFileUpload_resultStandardScheme(); } } - private static class beginFileDownload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { + private static class finishFileUpload_resultStandardScheme extends org.apache.storm.thrift.scheme.StandardScheme { - public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDownload_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol iprot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) @@ -35861,14 +34903,6 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDown break; } switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRING) { - struct.success = iprot.readString(); - struct.set_success_isSet(true); - } else { - org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; case 1: // AZE if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRUCT) { struct.aze = new AuthorizationException(); @@ -35887,15 +34921,10 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, beginFileDown struct.validate(); } - public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileDownload_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol oprot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(struct.success); - oprot.writeFieldEnd(); - } if (struct.aze != null) { oprot.writeFieldBegin(AZE_FIELD_DESC); struct.aze.write(oprot); @@ -35907,42 +34936,32 @@ public void write(org.apache.storm.thrift.protocol.TProtocol oprot, beginFileDow } - private static class beginFileDownload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { - public beginFileDownload_resultTupleScheme getScheme() { - return new beginFileDownload_resultTupleScheme(); + private static class finishFileUpload_resultTupleSchemeFactory implements org.apache.storm.thrift.scheme.SchemeFactory { + public finishFileUpload_resultTupleScheme getScheme() { + return new finishFileUpload_resultTupleScheme(); } } - private static class beginFileDownload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { + private static class finishFileUpload_resultTupleScheme extends org.apache.storm.thrift.scheme.TupleScheme { @Override - public void write(org.apache.storm.thrift.protocol.TProtocol prot, beginFileDownload_result struct) throws org.apache.storm.thrift.TException { + public void write(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); - if (struct.is_set_success()) { - optionals.set(0); - } if (struct.is_set_aze()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.is_set_success()) { - oprot.writeString(struct.success); + optionals.set(0); } + oprot.writeBitSet(optionals, 1); if (struct.is_set_aze()) { struct.aze.write(oprot); } } @Override - public void read(org.apache.storm.thrift.protocol.TProtocol prot, beginFileDownload_result struct) throws org.apache.storm.thrift.TException { + public void read(org.apache.storm.thrift.protocol.TProtocol prot, finishFileUpload_result struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; - java.util.BitSet incoming = iprot.readBitSet(2); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { - struct.success = iprot.readString(); - struct.set_success_isSet(true); - } - if (incoming.get(1)) { struct.aze = new AuthorizationException(); struct.aze.read(iprot); struct.set_aze_isSet(true); diff --git a/storm-client/src/py/storm/Nimbus-remote b/storm-client/src/py/storm/Nimbus-remote index 3c35d1d71fc..a4a2c326da3 100644 --- a/storm-client/src/py/storm/Nimbus-remote +++ b/storm-client/src/py/storm/Nimbus-remote @@ -72,7 +72,6 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print(' string beginFileUpload()') print(' void uploadChunk(string location, string chunk)') print(' void finishFileUpload(string location)') - print(' string beginFileDownload(string file)') print(' string downloadChunk(string id)') print(' string getNimbusConf()') print(' ClusterSummary getClusterInfo()') @@ -352,12 +351,6 @@ elif cmd == 'finishFileUpload': sys.exit(1) pp.pprint(client.finishFileUpload(args[0],)) -elif cmd == 'beginFileDownload': - if len(args) != 1: - print('beginFileDownload requires 1 args') - sys.exit(1) - pp.pprint(client.beginFileDownload(args[0],)) - elif cmd == 'downloadChunk': if len(args) != 1: print('downloadChunk requires 1 args') diff --git a/storm-client/src/py/storm/Nimbus.py b/storm-client/src/py/storm/Nimbus.py index a4e64848e7c..363a03e1046 100644 --- a/storm-client/src/py/storm/Nimbus.py +++ b/storm-client/src/py/storm/Nimbus.py @@ -271,13 +271,6 @@ def finishFileUpload(self, location): """ pass - def beginFileDownload(self, file): - """ - Parameters: - - file - """ - pass - def downloadChunk(self, id): """ Parameters: @@ -1463,39 +1456,6 @@ def recv_finishFileUpload(self): raise result.aze return - def beginFileDownload(self, file): - """ - Parameters: - - file - """ - self.send_beginFileDownload(file) - return self.recv_beginFileDownload() - - def send_beginFileDownload(self, file): - self._oprot.writeMessageBegin('beginFileDownload', TMessageType.CALL, self._seqid) - args = beginFileDownload_args() - args.file = file - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_beginFileDownload(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = beginFileDownload_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.aze is not None: - raise result.aze - raise TApplicationException(TApplicationException.MISSING_RESULT, "beginFileDownload failed: unknown result") - def downloadChunk(self, id): """ Parameters: @@ -2214,7 +2174,6 @@ def __init__(self, handler): self._processMap["beginFileUpload"] = Processor.process_beginFileUpload self._processMap["uploadChunk"] = Processor.process_uploadChunk self._processMap["finishFileUpload"] = Processor.process_finishFileUpload - self._processMap["beginFileDownload"] = Processor.process_beginFileDownload self._processMap["downloadChunk"] = Processor.process_downloadChunk self._processMap["getNimbusConf"] = Processor.process_getNimbusConf self._processMap["getClusterInfo"] = Processor.process_getClusterInfo @@ -3079,32 +3038,6 @@ def process_finishFileUpload(self, seqid, iprot, oprot): oprot.writeMessageEnd() oprot.trans.flush() - def process_beginFileDownload(self, seqid, iprot, oprot): - args = beginFileDownload_args() - args.read(iprot) - iprot.readMessageEnd() - result = beginFileDownload_result() - try: - result.success = self._handler.beginFileDownload(args.file) - msg_type = TMessageType.REPLY - except TTransport.TTransportException: - raise - except AuthorizationException as aze: - msg_type = TMessageType.REPLY - result.aze = aze - except TApplicationException as ex: - logging.exception('TApplication exception in handler') - msg_type = TMessageType.EXCEPTION - result = ex - except Exception: - logging.exception('Unexpected exception in handler') - msg_type = TMessageType.EXCEPTION - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("beginFileDownload", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - def process_downloadChunk(self, seqid, iprot, oprot): args = downloadChunk_args() args.read(iprot) @@ -7922,140 +7855,6 @@ def __ne__(self, other): ) -class beginFileDownload_args(object): - """ - Attributes: - - file - """ - - - def __init__(self, file=None,): - self.file = file - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, [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.STRING: - self.file = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) - return - oprot.writeStructBegin('beginFileDownload_args') - if self.file is not None: - oprot.writeFieldBegin('file', TType.STRING, 1) - oprot.writeString(self.file.encode('utf-8') if sys.version_info[0] == 2 else self.file) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - 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) -all_structs.append(beginFileDownload_args) -beginFileDownload_args.thrift_spec = ( - None, # 0 - (1, TType.STRING, 'file', 'UTF8', None, ), # 1 -) - - -class beginFileDownload_result(object): - """ - Attributes: - - success - - aze - """ - - - def __init__(self, success=None, aze=None,): - self.success = success - self.aze = aze - - def read(self, iprot): - if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: - iprot._fast_decode(self, iprot, [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.STRING: - self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.aze = AuthorizationException() - self.aze.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot._fast_encode is not None and self.thrift_spec is not None: - oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) - return - oprot.writeStructBegin('beginFileDownload_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) - oprot.writeFieldEnd() - if self.aze is not None: - oprot.writeFieldBegin('aze', TType.STRUCT, 1) - self.aze.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.items()] - 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) -all_structs.append(beginFileDownload_result) -beginFileDownload_result.thrift_spec = ( - (0, TType.STRING, 'success', 'UTF8', None, ), # 0 - (1, TType.STRUCT, 'aze', [AuthorizationException, None], None, ), # 1 -) - - class downloadChunk_args(object): """ Attributes: diff --git a/storm-client/src/py/storm/ttypes.py b/storm-client/src/py/storm/ttypes.py index 0d7ea12ce82..e20c926f330 100644 --- a/storm-client/src/py/storm/ttypes.py +++ b/storm-client/src/py/storm/ttypes.py @@ -2600,15 +2600,13 @@ class ClusterSummary(object): """ Attributes: - supervisors - - nimbus_uptime_secs - topologies - nimbuses """ - def __init__(self, supervisors=None, nimbus_uptime_secs=0, topologies=None, nimbuses=None,): + def __init__(self, supervisors=None, topologies=None, nimbuses=None,): self.supervisors = supervisors - self.nimbus_uptime_secs = nimbus_uptime_secs self.topologies = topologies self.nimbuses = nimbuses @@ -2633,11 +2631,6 @@ def read(self, iprot): else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.I32: - self.nimbus_uptime_secs = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: if ftype == TType.LIST: self.topologies = [] (_etype130, _size127) = iprot.readListBegin() @@ -2648,7 +2641,7 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 4: + elif fid == 3: if ftype == TType.LIST: self.nimbuses = [] (_etype136, _size133) = iprot.readListBegin() @@ -2676,19 +2669,15 @@ def write(self, oprot): iter139.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() - if self.nimbus_uptime_secs is not None: - oprot.writeFieldBegin('nimbus_uptime_secs', TType.I32, 2) - oprot.writeI32(self.nimbus_uptime_secs) - oprot.writeFieldEnd() if self.topologies is not None: - oprot.writeFieldBegin('topologies', TType.LIST, 3) + oprot.writeFieldBegin('topologies', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.topologies)) for iter140 in self.topologies: iter140.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.nimbuses is not None: - oprot.writeFieldBegin('nimbuses', TType.LIST, 4) + oprot.writeFieldBegin('nimbuses', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.nimbuses)) for iter141 in self.nimbuses: iter141.write(oprot) @@ -10830,9 +10819,8 @@ def __ne__(self, other): ClusterSummary.thrift_spec = ( None, # 0 (1, TType.LIST, 'supervisors', (TType.STRUCT, [SupervisorSummary, None], False), None, ), # 1 - (2, TType.I32, 'nimbus_uptime_secs', None, 0, ), # 2 - (3, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 3 - (4, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 4 + (2, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 2 + (3, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 3 ) all_structs.append(ErrorInfo) ErrorInfo.thrift_spec = ( diff --git a/storm-client/src/storm.thrift b/storm-client/src/storm.thrift index 724c5b43b02..9997c8e11a0 100644 --- a/storm-client/src/storm.thrift +++ b/storm-client/src/storm.thrift @@ -206,10 +206,8 @@ struct NimbusSummary { struct ClusterSummary { 1: required list supervisors; - //@deprecated, please use nimbuses.uptime_secs instead. - 2: optional i32 nimbus_uptime_secs = 0; - 3: required list topologies; - 4: required list nimbuses; + 2: required list topologies; + 3: required list nimbuses; } struct ErrorInfo { @@ -760,8 +758,6 @@ service Nimbus { void uploadChunk(1: string location, 2: binary chunk) throws (1: AuthorizationException aze); void finishFileUpload(1: string location) throws (1: AuthorizationException aze); - //@deprecated beginBlobDownload does that - string beginFileDownload(1: string file) throws (1: AuthorizationException aze); //can stop downloading chunks when receive 0-length byte array back binary downloadChunk(1: string id) throws (1: AuthorizationException aze); diff --git a/storm-server/src/main/java/org/apache/storm/LocalCluster.java b/storm-server/src/main/java/org/apache/storm/LocalCluster.java index 0e314c9f026..02fbe63d484 100644 --- a/storm-server/src/main/java/org/apache/storm/LocalCluster.java +++ b/storm-server/src/main/java/org/apache/storm/LocalCluster.java @@ -874,11 +874,6 @@ public void finishFileUpload(String location) throws AuthorizationException, TEx //Just throw it away in local mode } - @Override - public String beginFileDownload(String file) throws AuthorizationException, TException { - throw new WrappedAuthorizationException("FILE DOWNLOAD NOT SUPPORTED IN LOCAL MODE"); - } - @Override public ByteBuffer downloadChunk(String id) throws AuthorizationException, TException { throw new WrappedAuthorizationException("FILE DOWNLOAD NOT SUPPORTED IN LOCAL MODE"); diff --git a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java index 3c167450961..5cd7d970f21 100644 --- a/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java +++ b/storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java @@ -236,7 +236,6 @@ public class Nimbus implements Iface, Shutdownable, DaemonCommon { private static final Meter beginFileUploadCalls = StormMetricsRegistry.registerMeter("nimbus:num-beginFileUpload-calls"); private static final Meter uploadChunkCalls = StormMetricsRegistry.registerMeter("nimbus:num-uploadChunk-calls"); private static final Meter finishFileUploadCalls = StormMetricsRegistry.registerMeter("nimbus:num-finishFileUpload-calls"); - private static final Meter beginFileDownloadCalls = StormMetricsRegistry.registerMeter("nimbus:num-beginFileDownload-calls"); private static final Meter downloadChunkCalls = StormMetricsRegistry.registerMeter("nimbus:num-downloadChunk-calls"); private static final Meter getNimbusConfCalls = StormMetricsRegistry.registerMeter("nimbus:num-getNimbusConf-calls"); private static final Meter getLogConfigCalls = StormMetricsRegistry.registerMeter("nimbus:num-getLogConfig-calls"); @@ -2692,7 +2691,6 @@ private ClusterSummary getClusterInfoImpl() throws Exception { } ClusterSummary ret = new ClusterSummary(summaries, topologySummaries, nimbuses); - ret.set_nimbus_uptime_secs(uptime); return ret; } @@ -3741,27 +3739,6 @@ public void finishFileUpload(String location) throws AuthorizationException, TEx } } - @SuppressWarnings("deprecation") - @Override - public String beginFileDownload(String file) throws AuthorizationException, TException { - try { - beginFileDownloadCalls.mark(); - checkAuthorization(null, null, "fileDownload"); - BufferInputStream is = new BufferInputStream(blobStore.getBlob(file, null), - ObjectReader.getInt(conf.get(Config.STORM_BLOBSTORE_INPUTSTREAM_BUFFER_SIZE_BYTES), - 65536)); - String id = Utils.uuid(); - downloaders.put(id, is); - return id; - } catch (Exception e) { - LOG.warn("begin file download exception.", e); - if (e instanceof TException) { - throw (TException) e; - } - throw new RuntimeException(e); - } - } - @SuppressWarnings("deprecation") @Override public ByteBuffer downloadChunk(String id) throws AuthorizationException, TException { From e0795f12113e722726f6d05ace7db8d1c496d86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Rohde=20D=C3=B8ssing?= Date: Thu, 12 Jul 2018 15:17:29 +0200 Subject: [PATCH 2/3] Fix test --- .../clj/org/apache/storm/security/auth/nimbus_auth_test.clj | 2 -- 1 file changed, 2 deletions(-) diff --git a/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj b/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj index a7697c29711..8b9e453dfb5 100644 --- a/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj +++ b/storm-core/test/clj/org/apache/storm/security/auth/nimbus_auth_test.clj @@ -125,7 +125,6 @@ (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil))) (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil))) - (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil))) (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil))) (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client))) (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client))) @@ -192,7 +191,6 @@ (is (thrown-cause? AuthorizationException (.uploadChunk nimbus_client nil nil))) (is (thrown-cause? AuthorizationException (.finishFileUpload nimbus_client nil))) - (is (thrown-cause? AuthorizationException (.beginFileDownload nimbus_client nil))) (is (thrown-cause? AuthorizationException (.downloadChunk nimbus_client nil))) (is (thrown-cause? AuthorizationException (.getNimbusConf nimbus_client))) (is (thrown-cause? AuthorizationException (.getClusterInfo nimbus_client))) From 950bd1819cbef92ea12d93d2fae9324895e667a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Rohde=20D=C3=B8ssing?= Date: Thu, 12 Jul 2018 19:28:59 +0200 Subject: [PATCH 3/3] Address review comments --- .../apache/storm/generated/ClusterSummary.java | 16 ++++++++-------- storm-client/src/py/storm/ttypes.py | 13 +++++++------ storm-client/src/storm.thrift | 10 +++++++--- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java index 400e06d6937..d5567a050dd 100644 --- a/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java +++ b/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java @@ -29,8 +29,8 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase byName = new java.util.HashMap(); @@ -60,9 +60,9 @@ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SUPERVISORS return SUPERVISORS; - case 2: // TOPOLOGIES + case 3: // TOPOLOGIES return TOPOLOGIES; - case 3: // NIMBUSES + case 4: // NIMBUSES return NIMBUSES; default: return null; @@ -566,7 +566,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, ClusterSummar org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TOPOLOGIES + case 3: // TOPOLOGIES if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) { { org.apache.storm.thrift.protocol.TList _list139 = iprot.readListBegin(); @@ -585,7 +585,7 @@ public void read(org.apache.storm.thrift.protocol.TProtocol iprot, ClusterSummar org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // NIMBUSES + case 4: // NIMBUSES if (schemeField.type == org.apache.storm.thrift.protocol.TType.LIST) { { org.apache.storm.thrift.protocol.TList _list142 = iprot.readListBegin(); diff --git a/storm-client/src/py/storm/ttypes.py b/storm-client/src/py/storm/ttypes.py index e20c926f330..16f35a4b912 100644 --- a/storm-client/src/py/storm/ttypes.py +++ b/storm-client/src/py/storm/ttypes.py @@ -2630,7 +2630,7 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 2: + elif fid == 3: if ftype == TType.LIST: self.topologies = [] (_etype130, _size127) = iprot.readListBegin() @@ -2641,7 +2641,7 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 3: + elif fid == 4: if ftype == TType.LIST: self.nimbuses = [] (_etype136, _size133) = iprot.readListBegin() @@ -2670,14 +2670,14 @@ def write(self, oprot): oprot.writeListEnd() oprot.writeFieldEnd() if self.topologies is not None: - oprot.writeFieldBegin('topologies', TType.LIST, 2) + oprot.writeFieldBegin('topologies', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.topologies)) for iter140 in self.topologies: iter140.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.nimbuses is not None: - oprot.writeFieldBegin('nimbuses', TType.LIST, 3) + oprot.writeFieldBegin('nimbuses', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.nimbuses)) for iter141 in self.nimbuses: iter141.write(oprot) @@ -10819,8 +10819,9 @@ def __ne__(self, other): ClusterSummary.thrift_spec = ( None, # 0 (1, TType.LIST, 'supervisors', (TType.STRUCT, [SupervisorSummary, None], False), None, ), # 1 - (2, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 2 - (3, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 3 + None, # 2 + (3, TType.LIST, 'topologies', (TType.STRUCT, [TopologySummary, None], False), None, ), # 3 + (4, TType.LIST, 'nimbuses', (TType.STRUCT, [NimbusSummary, None], False), None, ), # 4 ) all_structs.append(ErrorInfo) ErrorInfo.thrift_spec = ( diff --git a/storm-client/src/storm.thrift b/storm-client/src/storm.thrift index 9997c8e11a0..9753ff51af0 100644 --- a/storm-client/src/storm.thrift +++ b/storm-client/src/storm.thrift @@ -206,8 +206,9 @@ struct NimbusSummary { struct ClusterSummary { 1: required list supervisors; - 2: required list topologies; - 3: required list nimbuses; + //2: Removed. Do not reuse. + 3: required list topologies; + 4: required list nimbuses; } struct ErrorInfo { @@ -711,6 +712,9 @@ struct WorkerMetrics { } service Nimbus { + //Removed methods, be careful about reusing these names + //string beginFileDownload(1: string file) throws (1: AuthorizationException aze); + void submitTopology(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze); void submitTopologyWithOpts(1: string name, 2: string uploadedJarLocation, 3: string jsonConf, 4: StormTopology topology, 5: SubmitOptions options) throws (1: AlreadyAliveException e, 2: InvalidTopologyException ite, 3: AuthorizationException aze); void killTopology(1: string name) throws (1: NotAliveException e, 2: AuthorizationException aze); @@ -757,7 +761,7 @@ service Nimbus { string beginFileUpload() throws (1: AuthorizationException aze); void uploadChunk(1: string location, 2: binary chunk) throws (1: AuthorizationException aze); void finishFileUpload(1: string location) throws (1: AuthorizationException aze); - + //can stop downloading chunks when receive 0-length byte array back binary downloadChunk(1: string id) throws (1: AuthorizationException aze);