public boolean equals(ClusterWorkerHeartbeat that) { if (that == null) return false; boolean this_present_storm_id = true && this.is_set_storm_id(); boolean that_present_storm_id = true && that.is_set_storm_id(); if (this_present_storm_id || that_present_storm_id) { if (!(this_present_storm_id && that_present_storm_id)) return false; if (!this.storm_id.equals(that.storm_id)) return false; } boolean this_present_executor_stats = true && this.is_set_executor_stats(); boolean that_present_executor_stats = true && that.is_set_executor_stats(); if (this_present_executor_stats || that_present_executor_stats) { if (!(this_present_executor_stats && that_present_executor_stats)) return false; if (!this.executor_stats.equals(that.executor_stats)) return false; } boolean this_present_time_secs = true; boolean that_present_time_secs = true; if (this_present_time_secs || that_present_time_secs) { if (!(this_present_time_secs && that_present_time_secs)) return false; if (this.time_secs != that.time_secs) return false; } boolean this_present_uptime_secs = true; boolean that_present_uptime_secs = true; if (this_present_uptime_secs || that_present_uptime_secs) { if (!(this_present_uptime_secs && that_present_uptime_secs)) return false; if (this.uptime_secs != that.uptime_secs) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public ClusterWorkerHeartbeat(ClusterWorkerHeartbeat other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_storm_id()) { this.storm_id = other.storm_id; } if (other.is_set_executor_stats()) { Map<ExecutorInfo, ExecutorStats> __this__executor_stats = new HashMap<ExecutorInfo, ExecutorStats>(other.executor_stats.size()); for (Map.Entry<ExecutorInfo, ExecutorStats> other_element : other.executor_stats.entrySet()) { ExecutorInfo other_element_key = other_element.getKey(); ExecutorStats other_element_value = other_element.getValue(); ExecutorInfo __this__executor_stats_copy_key = new ExecutorInfo(other_element_key); ExecutorStats __this__executor_stats_copy_value = new ExecutorStats(other_element_value); __this__executor_stats.put( __this__executor_stats_copy_key, __this__executor_stats_copy_value); } this.executor_stats = __this__executor_stats; } this.time_secs = other.time_secs; this.uptime_secs = other.uptime_secs; }
@Override public int compareTo(ClusterWorkerHeartbeat other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(is_set_storm_id()).compareTo(other.is_set_storm_id()); if (lastComparison != 0) { return lastComparison; } if (is_set_storm_id()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.storm_id, other.storm_id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_executor_stats()).compareTo(other.is_set_executor_stats()); if (lastComparison != 0) { return lastComparison; } if (is_set_executor_stats()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executor_stats, other.executor_stats); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_time_secs()).compareTo(other.is_set_time_secs()); if (lastComparison != 0) { return lastComparison; } if (is_set_time_secs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_secs, other.time_secs); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_uptime_secs()).compareTo(other.is_set_uptime_secs()); if (lastComparison != 0) { return lastComparison; } if (is_set_uptime_secs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uptime_secs, other.uptime_secs); if (lastComparison != 0) { return lastComparison; } } return 0; }