storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [3/6] storm git commit: STORM-2947: Remove deprecated field and method from Thrift
Date Mon, 30 Jul 2018 18:22:51 GMT
STORM-2947: Remove deprecated field and method from Thrift


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1768062f
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1768062f
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1768062f

Branch: refs/heads/master
Commit: 1768062f7b5f069a5a1b6a55218e6195f5e8f66a
Parents: 2d7c7d3
Author: Stig Rohde Døssing <srdo@apache.org>
Authored: Tue Jul 10 15:56:34 2018 +0200
Committer: Stig Rohde Døssing <srdo@apache.org>
Committed: Thu Jul 12 15:07:58 2018 +0200

----------------------------------------------------------------------
 .../apache/storm/generated/ClusterSummary.java  |  124 +-
 .../jvm/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 -
 .../org/apache/storm/daemon/nimbus/Nimbus.java  |   23 -
 8 files changed, 785 insertions(+), 2126 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/1768062f/storm-client/src/jvm/org/apache/storm/generated/ClusterSummary.java
----------------------------------------------------------------------
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 3ab05ca..400e06d 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<ClusterSumm
   private static final org.apache.storm.thrift.protocol.TStruct STRUCT_DESC = new org.apache.storm.thrift.protocol.TStruct("ClusterSummary");
 
   private static final org.apache.storm.thrift.protocol.TField SUPERVISORS_FIELD_DESC = new
org.apache.storm.thrift.protocol.TField("supervisors", org.apache.storm.thrift.protocol.TType.LIST,
(short)1);
-  private static final org.apache.storm.thrift.protocol.TField NIMBUS_UPTIME_SECS_FIELD_DESC
= new org.apache.storm.thrift.protocol.TField("nimbus_uptime_secs", org.apache.storm.thrift.protocol.TType.I32,
(short)2);
-  private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new
org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST,
(short)3);
-  private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new
org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST,
(short)4);
+  private static final org.apache.storm.thrift.protocol.TField TOPOLOGIES_FIELD_DESC = new
org.apache.storm.thrift.protocol.TField("topologies", org.apache.storm.thrift.protocol.TType.LIST,
(short)2);
+  private static final org.apache.storm.thrift.protocol.TField NIMBUSES_FIELD_DESC = new
org.apache.storm.thrift.protocol.TField("nimbuses", org.apache.storm.thrift.protocol.TType.LIST,
(short)3);
 
   private static final org.apache.storm.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY
= new ClusterSummaryStandardSchemeFactory();
   private static final org.apache.storm.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY
= new ClusterSummaryTupleSchemeFactory();
 
   private java.util.List<SupervisorSummary> supervisors; // required
-  private int nimbus_uptime_secs; // optional
   private java.util.List<TopologySummary> topologies; // required
   private java.util.List<NimbusSummary> 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<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String,
_Fields>();
 
@@ -63,11 +60,9 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
       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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
   }
 
   // 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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
   }
 
   public ClusterSummary() {
-    this.nimbus_uptime_secs = 0;
-
   }
 
   public ClusterSummary(
@@ -150,7 +138,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
    * Performs a deep copy on <i>other</i>.
    */
   public ClusterSummary(ClusterSummary other) {
-    __isset_bitfield = other.__isset_bitfield;
     if (other.is_set_supervisors()) {
       java.util.List<SupervisorSummary> __this__supervisors = new java.util.ArrayList<SupervisorSummary>(other.supervisors.size());
       for (SupervisorSummary other_element : other.supervisors) {
@@ -158,7 +145,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
       }
       this.supervisors = __this__supervisors;
     }
-    this.nimbus_uptime_secs = other.nimbus_uptime_secs;
     if (other.is_set_topologies()) {
       java.util.List<TopologySummary> __this__topologies = new java.util.ArrayList<TopologySummary>(other.topologies.size());
       for (TopologySummary other_element : other.topologies) {
@@ -182,8 +168,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
   @Override
   public void clear() {
     this.supervisors = null;
-    this.nimbus_uptime_secs = 0;
-
     this.topologies = null;
     this.nimbuses = null;
   }
@@ -226,28 +210,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
     }
   }
 
-  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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
       }
       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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
     case SUPERVISORS:
       return get_supervisors();
 
-    case NIMBUS_UPTIME_SECS:
-      return get_nimbus_uptime_secs();
-
     case TOPOLOGIES:
       return get_topologies();
 
@@ -388,8 +339,6 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
     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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
         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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
     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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
         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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
       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 @@ public class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
 
   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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
               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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
               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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
         }
         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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
           _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 class ClusterSummary implements org.apache.storm.thrift.TBase<ClusterSumm
         }
       }
       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);
-      }
     }
   }
 


Mime
View raw message