/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package org.apache.hadoop.thriftfs.jobtracker.api;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Status of the cluster as viewed by the jobtracker
 */
public class ThriftClusterStatus implements org.apache.thrift.TBase<ThriftClusterStatus, ThriftClusterStatus._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftClusterStatus");

  private static final org.apache.thrift.protocol.TField NUM_ACTIVE_TRACKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("numActiveTrackers", org.apache.thrift.protocol.TType.I32, (short)1);
  private static final org.apache.thrift.protocol.TField ACTIVE_TRACKER_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("activeTrackerNames", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField BLACKLISTED_TRACKER_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("blacklistedTrackerNames", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField NUM_BLACKLISTED_TRACKERS_FIELD_DESC = new org.apache.thrift.protocol.TField("numBlacklistedTrackers", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField NUM_EXCLUDED_NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("numExcludedNodes", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField TASK_TRACKER_EXPIRY_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("taskTrackerExpiryInterval", org.apache.thrift.protocol.TType.I64, (short)6);
  private static final org.apache.thrift.protocol.TField MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("mapTasks", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("reduceTasks", org.apache.thrift.protocol.TType.I32, (short)8);
  private static final org.apache.thrift.protocol.TField MAX_MAP_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMapTasks", org.apache.thrift.protocol.TType.I32, (short)9);
  private static final org.apache.thrift.protocol.TField MAX_REDUCE_TASKS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxReduceTasks", org.apache.thrift.protocol.TType.I32, (short)10);
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)11);
  private static final org.apache.thrift.protocol.TField USED_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("usedMemory", org.apache.thrift.protocol.TType.I64, (short)12);
  private static final org.apache.thrift.protocol.TField MAX_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMemory", org.apache.thrift.protocol.TType.I64, (short)13);
  private static final org.apache.thrift.protocol.TField TOTAL_SUBMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("totalSubmissions", org.apache.thrift.protocol.TType.I32, (short)14);
  private static final org.apache.thrift.protocol.TField HAS_RESTARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("hasRestarted", org.apache.thrift.protocol.TType.BOOL, (short)15);
  private static final org.apache.thrift.protocol.TField HAS_RECOVERED_FIELD_DESC = new org.apache.thrift.protocol.TField("hasRecovered", org.apache.thrift.protocol.TType.BOOL, (short)16);
  private static final org.apache.thrift.protocol.TField START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("startTime", org.apache.thrift.protocol.TType.I64, (short)17);
  private static final org.apache.thrift.protocol.TField HOSTNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostname", org.apache.thrift.protocol.TType.STRING, (short)18);
  private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRING, (short)19);
  private static final org.apache.thrift.protocol.TField HTTP_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("httpPort", org.apache.thrift.protocol.TType.I32, (short)20);

  public int numActiveTrackers; // required
  public List<String> activeTrackerNames; // required
  public List<String> blacklistedTrackerNames; // required
  public int numBlacklistedTrackers; // required
  public int numExcludedNodes; // required
  public long taskTrackerExpiryInterval; // required
  public int mapTasks; // required
  public int reduceTasks; // required
  public int maxMapTasks; // required
  public int maxReduceTasks; // required
  /**
   * 
   * @see JobTrackerState
   */
  public JobTrackerState state; // required
  /**
   * Used and max memory for the cluster, in bytes
   */
  public long usedMemory; // required
  public long maxMemory; // required
  public int totalSubmissions; // required
  public boolean hasRestarted; // required
  public boolean hasRecovered; // required
  public long startTime; // required
  public String hostname; // required
  public String identifier; // required
  public int httpPort; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    NUM_ACTIVE_TRACKERS((short)1, "numActiveTrackers"),
    ACTIVE_TRACKER_NAMES((short)2, "activeTrackerNames"),
    BLACKLISTED_TRACKER_NAMES((short)3, "blacklistedTrackerNames"),
    NUM_BLACKLISTED_TRACKERS((short)4, "numBlacklistedTrackers"),
    NUM_EXCLUDED_NODES((short)5, "numExcludedNodes"),
    TASK_TRACKER_EXPIRY_INTERVAL((short)6, "taskTrackerExpiryInterval"),
    MAP_TASKS((short)7, "mapTasks"),
    REDUCE_TASKS((short)8, "reduceTasks"),
    MAX_MAP_TASKS((short)9, "maxMapTasks"),
    MAX_REDUCE_TASKS((short)10, "maxReduceTasks"),
    /**
     * 
     * @see JobTrackerState
     */
    STATE((short)11, "state"),
    /**
     * Used and max memory for the cluster, in bytes
     */
    USED_MEMORY((short)12, "usedMemory"),
    MAX_MEMORY((short)13, "maxMemory"),
    TOTAL_SUBMISSIONS((short)14, "totalSubmissions"),
    HAS_RESTARTED((short)15, "hasRestarted"),
    HAS_RECOVERED((short)16, "hasRecovered"),
    START_TIME((short)17, "startTime"),
    HOSTNAME((short)18, "hostname"),
    IDENTIFIER((short)19, "identifier"),
    HTTP_PORT((short)20, "httpPort");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // NUM_ACTIVE_TRACKERS
          return NUM_ACTIVE_TRACKERS;
        case 2: // ACTIVE_TRACKER_NAMES
          return ACTIVE_TRACKER_NAMES;
        case 3: // BLACKLISTED_TRACKER_NAMES
          return BLACKLISTED_TRACKER_NAMES;
        case 4: // NUM_BLACKLISTED_TRACKERS
          return NUM_BLACKLISTED_TRACKERS;
        case 5: // NUM_EXCLUDED_NODES
          return NUM_EXCLUDED_NODES;
        case 6: // TASK_TRACKER_EXPIRY_INTERVAL
          return TASK_TRACKER_EXPIRY_INTERVAL;
        case 7: // MAP_TASKS
          return MAP_TASKS;
        case 8: // REDUCE_TASKS
          return REDUCE_TASKS;
        case 9: // MAX_MAP_TASKS
          return MAX_MAP_TASKS;
        case 10: // MAX_REDUCE_TASKS
          return MAX_REDUCE_TASKS;
        case 11: // STATE
          return STATE;
        case 12: // USED_MEMORY
          return USED_MEMORY;
        case 13: // MAX_MEMORY
          return MAX_MEMORY;
        case 14: // TOTAL_SUBMISSIONS
          return TOTAL_SUBMISSIONS;
        case 15: // HAS_RESTARTED
          return HAS_RESTARTED;
        case 16: // HAS_RECOVERED
          return HAS_RECOVERED;
        case 17: // START_TIME
          return START_TIME;
        case 18: // HOSTNAME
          return HOSTNAME;
        case 19: // IDENTIFIER
          return IDENTIFIER;
        case 20: // HTTP_PORT
          return HTTP_PORT;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    public static _Fields findByName(String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final String _fieldName;

    _Fields(short thriftId, String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    public short getThriftFieldId() {
      return _thriftId;
    }

    public String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __NUMACTIVETRACKERS_ISSET_ID = 0;
  private static final int __NUMBLACKLISTEDTRACKERS_ISSET_ID = 1;
  private static final int __NUMEXCLUDEDNODES_ISSET_ID = 2;
  private static final int __TASKTRACKEREXPIRYINTERVAL_ISSET_ID = 3;
  private static final int __MAPTASKS_ISSET_ID = 4;
  private static final int __REDUCETASKS_ISSET_ID = 5;
  private static final int __MAXMAPTASKS_ISSET_ID = 6;
  private static final int __MAXREDUCETASKS_ISSET_ID = 7;
  private static final int __USEDMEMORY_ISSET_ID = 8;
  private static final int __MAXMEMORY_ISSET_ID = 9;
  private static final int __TOTALSUBMISSIONS_ISSET_ID = 10;
  private static final int __HASRESTARTED_ISSET_ID = 11;
  private static final int __HASRECOVERED_ISSET_ID = 12;
  private static final int __STARTTIME_ISSET_ID = 13;
  private static final int __HTTPPORT_ISSET_ID = 14;
  private BitSet __isset_bit_vector = new BitSet(15);

  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.NUM_ACTIVE_TRACKERS, new org.apache.thrift.meta_data.FieldMetaData("numActiveTrackers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.ACTIVE_TRACKER_NAMES, new org.apache.thrift.meta_data.FieldMetaData("activeTrackerNames", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.BLACKLISTED_TRACKER_NAMES, new org.apache.thrift.meta_data.FieldMetaData("blacklistedTrackerNames", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.NUM_BLACKLISTED_TRACKERS, new org.apache.thrift.meta_data.FieldMetaData("numBlacklistedTrackers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.NUM_EXCLUDED_NODES, new org.apache.thrift.meta_data.FieldMetaData("numExcludedNodes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.TASK_TRACKER_EXPIRY_INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("taskTrackerExpiryInterval", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("mapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("reduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.MAX_MAP_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxMapTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.MAX_REDUCE_TASKS, new org.apache.thrift.meta_data.FieldMetaData("maxReduceTasks", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobTrackerState.class)));
    tmpMap.put(_Fields.USED_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("usedMemory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.MAX_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("maxMemory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TOTAL_SUBMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("totalSubmissions", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.HAS_RESTARTED, new org.apache.thrift.meta_data.FieldMetaData("hasRestarted", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.HAS_RECOVERED, new org.apache.thrift.meta_data.FieldMetaData("hasRecovered", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
    tmpMap.put(_Fields.START_TIME, new org.apache.thrift.meta_data.FieldMetaData("startTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.HOSTNAME, new org.apache.thrift.meta_data.FieldMetaData("hostname", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.HTTP_PORT, new org.apache.thrift.meta_data.FieldMetaData("httpPort", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftClusterStatus.class, metaDataMap);
  }

  public ThriftClusterStatus() {
  }

  public ThriftClusterStatus(
    int numActiveTrackers,
    List<String> activeTrackerNames,
    List<String> blacklistedTrackerNames,
    int numBlacklistedTrackers,
    int numExcludedNodes,
    long taskTrackerExpiryInterval,
    int mapTasks,
    int reduceTasks,
    int maxMapTasks,
    int maxReduceTasks,
    JobTrackerState state,
    long usedMemory,
    long maxMemory,
    int totalSubmissions,
    boolean hasRestarted,
    boolean hasRecovered,
    long startTime,
    String hostname,
    String identifier,
    int httpPort)
  {
    this();
    this.numActiveTrackers = numActiveTrackers;
    setNumActiveTrackersIsSet(true);
    this.activeTrackerNames = activeTrackerNames;
    this.blacklistedTrackerNames = blacklistedTrackerNames;
    this.numBlacklistedTrackers = numBlacklistedTrackers;
    setNumBlacklistedTrackersIsSet(true);
    this.numExcludedNodes = numExcludedNodes;
    setNumExcludedNodesIsSet(true);
    this.taskTrackerExpiryInterval = taskTrackerExpiryInterval;
    setTaskTrackerExpiryIntervalIsSet(true);
    this.mapTasks = mapTasks;
    setMapTasksIsSet(true);
    this.reduceTasks = reduceTasks;
    setReduceTasksIsSet(true);
    this.maxMapTasks = maxMapTasks;
    setMaxMapTasksIsSet(true);
    this.maxReduceTasks = maxReduceTasks;
    setMaxReduceTasksIsSet(true);
    this.state = state;
    this.usedMemory = usedMemory;
    setUsedMemoryIsSet(true);
    this.maxMemory = maxMemory;
    setMaxMemoryIsSet(true);
    this.totalSubmissions = totalSubmissions;
    setTotalSubmissionsIsSet(true);
    this.hasRestarted = hasRestarted;
    setHasRestartedIsSet(true);
    this.hasRecovered = hasRecovered;
    setHasRecoveredIsSet(true);
    this.startTime = startTime;
    setStartTimeIsSet(true);
    this.hostname = hostname;
    this.identifier = identifier;
    this.httpPort = httpPort;
    setHttpPortIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ThriftClusterStatus(ThriftClusterStatus other) {
    __isset_bit_vector.clear();
    __isset_bit_vector.or(other.__isset_bit_vector);
    this.numActiveTrackers = other.numActiveTrackers;
    if (other.isSetActiveTrackerNames()) {
      List<String> __this__activeTrackerNames = new ArrayList<String>();
      for (String other_element : other.activeTrackerNames) {
        __this__activeTrackerNames.add(other_element);
      }
      this.activeTrackerNames = __this__activeTrackerNames;
    }
    if (other.isSetBlacklistedTrackerNames()) {
      List<String> __this__blacklistedTrackerNames = new ArrayList<String>();
      for (String other_element : other.blacklistedTrackerNames) {
        __this__blacklistedTrackerNames.add(other_element);
      }
      this.blacklistedTrackerNames = __this__blacklistedTrackerNames;
    }
    this.numBlacklistedTrackers = other.numBlacklistedTrackers;
    this.numExcludedNodes = other.numExcludedNodes;
    this.taskTrackerExpiryInterval = other.taskTrackerExpiryInterval;
    this.mapTasks = other.mapTasks;
    this.reduceTasks = other.reduceTasks;
    this.maxMapTasks = other.maxMapTasks;
    this.maxReduceTasks = other.maxReduceTasks;
    if (other.isSetState()) {
      this.state = other.state;
    }
    this.usedMemory = other.usedMemory;
    this.maxMemory = other.maxMemory;
    this.totalSubmissions = other.totalSubmissions;
    this.hasRestarted = other.hasRestarted;
    this.hasRecovered = other.hasRecovered;
    this.startTime = other.startTime;
    if (other.isSetHostname()) {
      this.hostname = other.hostname;
    }
    if (other.isSetIdentifier()) {
      this.identifier = other.identifier;
    }
    this.httpPort = other.httpPort;
  }

  public ThriftClusterStatus deepCopy() {
    return new ThriftClusterStatus(this);
  }

  @Override
  public void clear() {
    setNumActiveTrackersIsSet(false);
    this.numActiveTrackers = 0;
    this.activeTrackerNames = null;
    this.blacklistedTrackerNames = null;
    setNumBlacklistedTrackersIsSet(false);
    this.numBlacklistedTrackers = 0;
    setNumExcludedNodesIsSet(false);
    this.numExcludedNodes = 0;
    setTaskTrackerExpiryIntervalIsSet(false);
    this.taskTrackerExpiryInterval = 0;
    setMapTasksIsSet(false);
    this.mapTasks = 0;
    setReduceTasksIsSet(false);
    this.reduceTasks = 0;
    setMaxMapTasksIsSet(false);
    this.maxMapTasks = 0;
    setMaxReduceTasksIsSet(false);
    this.maxReduceTasks = 0;
    this.state = null;
    setUsedMemoryIsSet(false);
    this.usedMemory = 0;
    setMaxMemoryIsSet(false);
    this.maxMemory = 0;
    setTotalSubmissionsIsSet(false);
    this.totalSubmissions = 0;
    setHasRestartedIsSet(false);
    this.hasRestarted = false;
    setHasRecoveredIsSet(false);
    this.hasRecovered = false;
    setStartTimeIsSet(false);
    this.startTime = 0;
    this.hostname = null;
    this.identifier = null;
    setHttpPortIsSet(false);
    this.httpPort = 0;
  }

  public int getNumActiveTrackers() {
    return this.numActiveTrackers;
  }

  public ThriftClusterStatus setNumActiveTrackers(int numActiveTrackers) {
    this.numActiveTrackers = numActiveTrackers;
    setNumActiveTrackersIsSet(true);
    return this;
  }

  public void unsetNumActiveTrackers() {
    __isset_bit_vector.clear(__NUMACTIVETRACKERS_ISSET_ID);
  }

  /** Returns true if field numActiveTrackers is set (has been assigned a value) and false otherwise */
  public boolean isSetNumActiveTrackers() {
    return __isset_bit_vector.get(__NUMACTIVETRACKERS_ISSET_ID);
  }

  public void setNumActiveTrackersIsSet(boolean value) {
    __isset_bit_vector.set(__NUMACTIVETRACKERS_ISSET_ID, value);
  }

  public int getActiveTrackerNamesSize() {
    return (this.activeTrackerNames == null) ? 0 : this.activeTrackerNames.size();
  }

  public java.util.Iterator<String> getActiveTrackerNamesIterator() {
    return (this.activeTrackerNames == null) ? null : this.activeTrackerNames.iterator();
  }

  public void addToActiveTrackerNames(String elem) {
    if (this.activeTrackerNames == null) {
      this.activeTrackerNames = new ArrayList<String>();
    }
    this.activeTrackerNames.add(elem);
  }

  public List<String> getActiveTrackerNames() {
    return this.activeTrackerNames;
  }

  public ThriftClusterStatus setActiveTrackerNames(List<String> activeTrackerNames) {
    this.activeTrackerNames = activeTrackerNames;
    return this;
  }

  public void unsetActiveTrackerNames() {
    this.activeTrackerNames = null;
  }

  /** Returns true if field activeTrackerNames is set (has been assigned a value) and false otherwise */
  public boolean isSetActiveTrackerNames() {
    return this.activeTrackerNames != null;
  }

  public void setActiveTrackerNamesIsSet(boolean value) {
    if (!value) {
      this.activeTrackerNames = null;
    }
  }

  public int getBlacklistedTrackerNamesSize() {
    return (this.blacklistedTrackerNames == null) ? 0 : this.blacklistedTrackerNames.size();
  }

  public java.util.Iterator<String> getBlacklistedTrackerNamesIterator() {
    return (this.blacklistedTrackerNames == null) ? null : this.blacklistedTrackerNames.iterator();
  }

  public void addToBlacklistedTrackerNames(String elem) {
    if (this.blacklistedTrackerNames == null) {
      this.blacklistedTrackerNames = new ArrayList<String>();
    }
    this.blacklistedTrackerNames.add(elem);
  }

  public List<String> getBlacklistedTrackerNames() {
    return this.blacklistedTrackerNames;
  }

  public ThriftClusterStatus setBlacklistedTrackerNames(List<String> blacklistedTrackerNames) {
    this.blacklistedTrackerNames = blacklistedTrackerNames;
    return this;
  }

  public void unsetBlacklistedTrackerNames() {
    this.blacklistedTrackerNames = null;
  }

  /** Returns true if field blacklistedTrackerNames is set (has been assigned a value) and false otherwise */
  public boolean isSetBlacklistedTrackerNames() {
    return this.blacklistedTrackerNames != null;
  }

  public void setBlacklistedTrackerNamesIsSet(boolean value) {
    if (!value) {
      this.blacklistedTrackerNames = null;
    }
  }

  public int getNumBlacklistedTrackers() {
    return this.numBlacklistedTrackers;
  }

  public ThriftClusterStatus setNumBlacklistedTrackers(int numBlacklistedTrackers) {
    this.numBlacklistedTrackers = numBlacklistedTrackers;
    setNumBlacklistedTrackersIsSet(true);
    return this;
  }

  public void unsetNumBlacklistedTrackers() {
    __isset_bit_vector.clear(__NUMBLACKLISTEDTRACKERS_ISSET_ID);
  }

  /** Returns true if field numBlacklistedTrackers is set (has been assigned a value) and false otherwise */
  public boolean isSetNumBlacklistedTrackers() {
    return __isset_bit_vector.get(__NUMBLACKLISTEDTRACKERS_ISSET_ID);
  }

  public void setNumBlacklistedTrackersIsSet(boolean value) {
    __isset_bit_vector.set(__NUMBLACKLISTEDTRACKERS_ISSET_ID, value);
  }

  public int getNumExcludedNodes() {
    return this.numExcludedNodes;
  }

  public ThriftClusterStatus setNumExcludedNodes(int numExcludedNodes) {
    this.numExcludedNodes = numExcludedNodes;
    setNumExcludedNodesIsSet(true);
    return this;
  }

  public void unsetNumExcludedNodes() {
    __isset_bit_vector.clear(__NUMEXCLUDEDNODES_ISSET_ID);
  }

  /** Returns true if field numExcludedNodes is set (has been assigned a value) and false otherwise */
  public boolean isSetNumExcludedNodes() {
    return __isset_bit_vector.get(__NUMEXCLUDEDNODES_ISSET_ID);
  }

  public void setNumExcludedNodesIsSet(boolean value) {
    __isset_bit_vector.set(__NUMEXCLUDEDNODES_ISSET_ID, value);
  }

  public long getTaskTrackerExpiryInterval() {
    return this.taskTrackerExpiryInterval;
  }

  public ThriftClusterStatus setTaskTrackerExpiryInterval(long taskTrackerExpiryInterval) {
    this.taskTrackerExpiryInterval = taskTrackerExpiryInterval;
    setTaskTrackerExpiryIntervalIsSet(true);
    return this;
  }

  public void unsetTaskTrackerExpiryInterval() {
    __isset_bit_vector.clear(__TASKTRACKEREXPIRYINTERVAL_ISSET_ID);
  }

  /** Returns true if field taskTrackerExpiryInterval is set (has been assigned a value) and false otherwise */
  public boolean isSetTaskTrackerExpiryInterval() {
    return __isset_bit_vector.get(__TASKTRACKEREXPIRYINTERVAL_ISSET_ID);
  }

  public void setTaskTrackerExpiryIntervalIsSet(boolean value) {
    __isset_bit_vector.set(__TASKTRACKEREXPIRYINTERVAL_ISSET_ID, value);
  }

  public int getMapTasks() {
    return this.mapTasks;
  }

  public ThriftClusterStatus setMapTasks(int mapTasks) {
    this.mapTasks = mapTasks;
    setMapTasksIsSet(true);
    return this;
  }

  public void unsetMapTasks() {
    __isset_bit_vector.clear(__MAPTASKS_ISSET_ID);
  }

  /** Returns true if field mapTasks is set (has been assigned a value) and false otherwise */
  public boolean isSetMapTasks() {
    return __isset_bit_vector.get(__MAPTASKS_ISSET_ID);
  }

  public void setMapTasksIsSet(boolean value) {
    __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value);
  }

  public int getReduceTasks() {
    return this.reduceTasks;
  }

  public ThriftClusterStatus setReduceTasks(int reduceTasks) {
    this.reduceTasks = reduceTasks;
    setReduceTasksIsSet(true);
    return this;
  }

  public void unsetReduceTasks() {
    __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID);
  }

  /** Returns true if field reduceTasks is set (has been assigned a value) and false otherwise */
  public boolean isSetReduceTasks() {
    return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID);
  }

  public void setReduceTasksIsSet(boolean value) {
    __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value);
  }

  public int getMaxMapTasks() {
    return this.maxMapTasks;
  }

  public ThriftClusterStatus setMaxMapTasks(int maxMapTasks) {
    this.maxMapTasks = maxMapTasks;
    setMaxMapTasksIsSet(true);
    return this;
  }

  public void unsetMaxMapTasks() {
    __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID);
  }

  /** Returns true if field maxMapTasks is set (has been assigned a value) and false otherwise */
  public boolean isSetMaxMapTasks() {
    return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID);
  }

  public void setMaxMapTasksIsSet(boolean value) {
    __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value);
  }

  public int getMaxReduceTasks() {
    return this.maxReduceTasks;
  }

  public ThriftClusterStatus setMaxReduceTasks(int maxReduceTasks) {
    this.maxReduceTasks = maxReduceTasks;
    setMaxReduceTasksIsSet(true);
    return this;
  }

  public void unsetMaxReduceTasks() {
    __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID);
  }

  /** Returns true if field maxReduceTasks is set (has been assigned a value) and false otherwise */
  public boolean isSetMaxReduceTasks() {
    return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID);
  }

  public void setMaxReduceTasksIsSet(boolean value) {
    __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value);
  }

  /**
   * 
   * @see JobTrackerState
   */
  public JobTrackerState getState() {
    return this.state;
  }

  /**
   * 
   * @see JobTrackerState
   */
  public ThriftClusterStatus setState(JobTrackerState state) {
    this.state = state;
    return this;
  }

  public void unsetState() {
    this.state = null;
  }

  /** Returns true if field state is set (has been assigned a value) and false otherwise */
  public boolean isSetState() {
    return this.state != null;
  }

  public void setStateIsSet(boolean value) {
    if (!value) {
      this.state = null;
    }
  }

  /**
   * Used and max memory for the cluster, in bytes
   */
  public long getUsedMemory() {
    return this.usedMemory;
  }

  /**
   * Used and max memory for the cluster, in bytes
   */
  public ThriftClusterStatus setUsedMemory(long usedMemory) {
    this.usedMemory = usedMemory;
    setUsedMemoryIsSet(true);
    return this;
  }

  public void unsetUsedMemory() {
    __isset_bit_vector.clear(__USEDMEMORY_ISSET_ID);
  }

  /** Returns true if field usedMemory is set (has been assigned a value) and false otherwise */
  public boolean isSetUsedMemory() {
    return __isset_bit_vector.get(__USEDMEMORY_ISSET_ID);
  }

  public void setUsedMemoryIsSet(boolean value) {
    __isset_bit_vector.set(__USEDMEMORY_ISSET_ID, value);
  }

  public long getMaxMemory() {
    return this.maxMemory;
  }

  public ThriftClusterStatus setMaxMemory(long maxMemory) {
    this.maxMemory = maxMemory;
    setMaxMemoryIsSet(true);
    return this;
  }

  public void unsetMaxMemory() {
    __isset_bit_vector.clear(__MAXMEMORY_ISSET_ID);
  }

  /** Returns true if field maxMemory is set (has been assigned a value) and false otherwise */
  public boolean isSetMaxMemory() {
    return __isset_bit_vector.get(__MAXMEMORY_ISSET_ID);
  }

  public void setMaxMemoryIsSet(boolean value) {
    __isset_bit_vector.set(__MAXMEMORY_ISSET_ID, value);
  }

  public int getTotalSubmissions() {
    return this.totalSubmissions;
  }

  public ThriftClusterStatus setTotalSubmissions(int totalSubmissions) {
    this.totalSubmissions = totalSubmissions;
    setTotalSubmissionsIsSet(true);
    return this;
  }

  public void unsetTotalSubmissions() {
    __isset_bit_vector.clear(__TOTALSUBMISSIONS_ISSET_ID);
  }

  /** Returns true if field totalSubmissions is set (has been assigned a value) and false otherwise */
  public boolean isSetTotalSubmissions() {
    return __isset_bit_vector.get(__TOTALSUBMISSIONS_ISSET_ID);
  }

  public void setTotalSubmissionsIsSet(boolean value) {
    __isset_bit_vector.set(__TOTALSUBMISSIONS_ISSET_ID, value);
  }

  public boolean isHasRestarted() {
    return this.hasRestarted;
  }

  public ThriftClusterStatus setHasRestarted(boolean hasRestarted) {
    this.hasRestarted = hasRestarted;
    setHasRestartedIsSet(true);
    return this;
  }

  public void unsetHasRestarted() {
    __isset_bit_vector.clear(__HASRESTARTED_ISSET_ID);
  }

  /** Returns true if field hasRestarted is set (has been assigned a value) and false otherwise */
  public boolean isSetHasRestarted() {
    return __isset_bit_vector.get(__HASRESTARTED_ISSET_ID);
  }

  public void setHasRestartedIsSet(boolean value) {
    __isset_bit_vector.set(__HASRESTARTED_ISSET_ID, value);
  }

  public boolean isHasRecovered() {
    return this.hasRecovered;
  }

  public ThriftClusterStatus setHasRecovered(boolean hasRecovered) {
    this.hasRecovered = hasRecovered;
    setHasRecoveredIsSet(true);
    return this;
  }

  public void unsetHasRecovered() {
    __isset_bit_vector.clear(__HASRECOVERED_ISSET_ID);
  }

  /** Returns true if field hasRecovered is set (has been assigned a value) and false otherwise */
  public boolean isSetHasRecovered() {
    return __isset_bit_vector.get(__HASRECOVERED_ISSET_ID);
  }

  public void setHasRecoveredIsSet(boolean value) {
    __isset_bit_vector.set(__HASRECOVERED_ISSET_ID, value);
  }

  public long getStartTime() {
    return this.startTime;
  }

  public ThriftClusterStatus setStartTime(long startTime) {
    this.startTime = startTime;
    setStartTimeIsSet(true);
    return this;
  }

  public void unsetStartTime() {
    __isset_bit_vector.clear(__STARTTIME_ISSET_ID);
  }

  /** Returns true if field startTime is set (has been assigned a value) and false otherwise */
  public boolean isSetStartTime() {
    return __isset_bit_vector.get(__STARTTIME_ISSET_ID);
  }

  public void setStartTimeIsSet(boolean value) {
    __isset_bit_vector.set(__STARTTIME_ISSET_ID, value);
  }

  public String getHostname() {
    return this.hostname;
  }

  public ThriftClusterStatus setHostname(String hostname) {
    this.hostname = hostname;
    return this;
  }

  public void unsetHostname() {
    this.hostname = null;
  }

  /** Returns true if field hostname is set (has been assigned a value) and false otherwise */
  public boolean isSetHostname() {
    return this.hostname != null;
  }

  public void setHostnameIsSet(boolean value) {
    if (!value) {
      this.hostname = null;
    }
  }

  public String getIdentifier() {
    return this.identifier;
  }

  public ThriftClusterStatus setIdentifier(String identifier) {
    this.identifier = identifier;
    return this;
  }

  public void unsetIdentifier() {
    this.identifier = null;
  }

  /** Returns true if field identifier is set (has been assigned a value) and false otherwise */
  public boolean isSetIdentifier() {
    return this.identifier != null;
  }

  public void setIdentifierIsSet(boolean value) {
    if (!value) {
      this.identifier = null;
    }
  }

  public int getHttpPort() {
    return this.httpPort;
  }

  public ThriftClusterStatus setHttpPort(int httpPort) {
    this.httpPort = httpPort;
    setHttpPortIsSet(true);
    return this;
  }

  public void unsetHttpPort() {
    __isset_bit_vector.clear(__HTTPPORT_ISSET_ID);
  }

  /** Returns true if field httpPort is set (has been assigned a value) and false otherwise */
  public boolean isSetHttpPort() {
    return __isset_bit_vector.get(__HTTPPORT_ISSET_ID);
  }

  public void setHttpPortIsSet(boolean value) {
    __isset_bit_vector.set(__HTTPPORT_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case NUM_ACTIVE_TRACKERS:
      if (value == null) {
        unsetNumActiveTrackers();
      } else {
        setNumActiveTrackers((Integer)value);
      }
      break;

    case ACTIVE_TRACKER_NAMES:
      if (value == null) {
        unsetActiveTrackerNames();
      } else {
        setActiveTrackerNames((List<String>)value);
      }
      break;

    case BLACKLISTED_TRACKER_NAMES:
      if (value == null) {
        unsetBlacklistedTrackerNames();
      } else {
        setBlacklistedTrackerNames((List<String>)value);
      }
      break;

    case NUM_BLACKLISTED_TRACKERS:
      if (value == null) {
        unsetNumBlacklistedTrackers();
      } else {
        setNumBlacklistedTrackers((Integer)value);
      }
      break;

    case NUM_EXCLUDED_NODES:
      if (value == null) {
        unsetNumExcludedNodes();
      } else {
        setNumExcludedNodes((Integer)value);
      }
      break;

    case TASK_TRACKER_EXPIRY_INTERVAL:
      if (value == null) {
        unsetTaskTrackerExpiryInterval();
      } else {
        setTaskTrackerExpiryInterval((Long)value);
      }
      break;

    case MAP_TASKS:
      if (value == null) {
        unsetMapTasks();
      } else {
        setMapTasks((Integer)value);
      }
      break;

    case REDUCE_TASKS:
      if (value == null) {
        unsetReduceTasks();
      } else {
        setReduceTasks((Integer)value);
      }
      break;

    case MAX_MAP_TASKS:
      if (value == null) {
        unsetMaxMapTasks();
      } else {
        setMaxMapTasks((Integer)value);
      }
      break;

    case MAX_REDUCE_TASKS:
      if (value == null) {
        unsetMaxReduceTasks();
      } else {
        setMaxReduceTasks((Integer)value);
      }
      break;

    case STATE:
      if (value == null) {
        unsetState();
      } else {
        setState((JobTrackerState)value);
      }
      break;

    case USED_MEMORY:
      if (value == null) {
        unsetUsedMemory();
      } else {
        setUsedMemory((Long)value);
      }
      break;

    case MAX_MEMORY:
      if (value == null) {
        unsetMaxMemory();
      } else {
        setMaxMemory((Long)value);
      }
      break;

    case TOTAL_SUBMISSIONS:
      if (value == null) {
        unsetTotalSubmissions();
      } else {
        setTotalSubmissions((Integer)value);
      }
      break;

    case HAS_RESTARTED:
      if (value == null) {
        unsetHasRestarted();
      } else {
        setHasRestarted((Boolean)value);
      }
      break;

    case HAS_RECOVERED:
      if (value == null) {
        unsetHasRecovered();
      } else {
        setHasRecovered((Boolean)value);
      }
      break;

    case START_TIME:
      if (value == null) {
        unsetStartTime();
      } else {
        setStartTime((Long)value);
      }
      break;

    case HOSTNAME:
      if (value == null) {
        unsetHostname();
      } else {
        setHostname((String)value);
      }
      break;

    case IDENTIFIER:
      if (value == null) {
        unsetIdentifier();
      } else {
        setIdentifier((String)value);
      }
      break;

    case HTTP_PORT:
      if (value == null) {
        unsetHttpPort();
      } else {
        setHttpPort((Integer)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case NUM_ACTIVE_TRACKERS:
      return Integer.valueOf(getNumActiveTrackers());

    case ACTIVE_TRACKER_NAMES:
      return getActiveTrackerNames();

    case BLACKLISTED_TRACKER_NAMES:
      return getBlacklistedTrackerNames();

    case NUM_BLACKLISTED_TRACKERS:
      return Integer.valueOf(getNumBlacklistedTrackers());

    case NUM_EXCLUDED_NODES:
      return Integer.valueOf(getNumExcludedNodes());

    case TASK_TRACKER_EXPIRY_INTERVAL:
      return Long.valueOf(getTaskTrackerExpiryInterval());

    case MAP_TASKS:
      return Integer.valueOf(getMapTasks());

    case REDUCE_TASKS:
      return Integer.valueOf(getReduceTasks());

    case MAX_MAP_TASKS:
      return Integer.valueOf(getMaxMapTasks());

    case MAX_REDUCE_TASKS:
      return Integer.valueOf(getMaxReduceTasks());

    case STATE:
      return getState();

    case USED_MEMORY:
      return Long.valueOf(getUsedMemory());

    case MAX_MEMORY:
      return Long.valueOf(getMaxMemory());

    case TOTAL_SUBMISSIONS:
      return Integer.valueOf(getTotalSubmissions());

    case HAS_RESTARTED:
      return Boolean.valueOf(isHasRestarted());

    case HAS_RECOVERED:
      return Boolean.valueOf(isHasRecovered());

    case START_TIME:
      return Long.valueOf(getStartTime());

    case HOSTNAME:
      return getHostname();

    case IDENTIFIER:
      return getIdentifier();

    case HTTP_PORT:
      return Integer.valueOf(getHttpPort());

    }
    throw new IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case NUM_ACTIVE_TRACKERS:
      return isSetNumActiveTrackers();
    case ACTIVE_TRACKER_NAMES:
      return isSetActiveTrackerNames();
    case BLACKLISTED_TRACKER_NAMES:
      return isSetBlacklistedTrackerNames();
    case NUM_BLACKLISTED_TRACKERS:
      return isSetNumBlacklistedTrackers();
    case NUM_EXCLUDED_NODES:
      return isSetNumExcludedNodes();
    case TASK_TRACKER_EXPIRY_INTERVAL:
      return isSetTaskTrackerExpiryInterval();
    case MAP_TASKS:
      return isSetMapTasks();
    case REDUCE_TASKS:
      return isSetReduceTasks();
    case MAX_MAP_TASKS:
      return isSetMaxMapTasks();
    case MAX_REDUCE_TASKS:
      return isSetMaxReduceTasks();
    case STATE:
      return isSetState();
    case USED_MEMORY:
      return isSetUsedMemory();
    case MAX_MEMORY:
      return isSetMaxMemory();
    case TOTAL_SUBMISSIONS:
      return isSetTotalSubmissions();
    case HAS_RESTARTED:
      return isSetHasRestarted();
    case HAS_RECOVERED:
      return isSetHasRecovered();
    case START_TIME:
      return isSetStartTime();
    case HOSTNAME:
      return isSetHostname();
    case IDENTIFIER:
      return isSetIdentifier();
    case HTTP_PORT:
      return isSetHttpPort();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof ThriftClusterStatus)
      return this.equals((ThriftClusterStatus)that);
    return false;
  }

  public boolean equals(ThriftClusterStatus that) {
    if (that == null)
      return false;

    boolean this_present_numActiveTrackers = true;
    boolean that_present_numActiveTrackers = true;
    if (this_present_numActiveTrackers || that_present_numActiveTrackers) {
      if (!(this_present_numActiveTrackers && that_present_numActiveTrackers))
        return false;
      if (this.numActiveTrackers != that.numActiveTrackers)
        return false;
    }

    boolean this_present_activeTrackerNames = true && this.isSetActiveTrackerNames();
    boolean that_present_activeTrackerNames = true && that.isSetActiveTrackerNames();
    if (this_present_activeTrackerNames || that_present_activeTrackerNames) {
      if (!(this_present_activeTrackerNames && that_present_activeTrackerNames))
        return false;
      if (!this.activeTrackerNames.equals(that.activeTrackerNames))
        return false;
    }

    boolean this_present_blacklistedTrackerNames = true && this.isSetBlacklistedTrackerNames();
    boolean that_present_blacklistedTrackerNames = true && that.isSetBlacklistedTrackerNames();
    if (this_present_blacklistedTrackerNames || that_present_blacklistedTrackerNames) {
      if (!(this_present_blacklistedTrackerNames && that_present_blacklistedTrackerNames))
        return false;
      if (!this.blacklistedTrackerNames.equals(that.blacklistedTrackerNames))
        return false;
    }

    boolean this_present_numBlacklistedTrackers = true;
    boolean that_present_numBlacklistedTrackers = true;
    if (this_present_numBlacklistedTrackers || that_present_numBlacklistedTrackers) {
      if (!(this_present_numBlacklistedTrackers && that_present_numBlacklistedTrackers))
        return false;
      if (this.numBlacklistedTrackers != that.numBlacklistedTrackers)
        return false;
    }

    boolean this_present_numExcludedNodes = true;
    boolean that_present_numExcludedNodes = true;
    if (this_present_numExcludedNodes || that_present_numExcludedNodes) {
      if (!(this_present_numExcludedNodes && that_present_numExcludedNodes))
        return false;
      if (this.numExcludedNodes != that.numExcludedNodes)
        return false;
    }

    boolean this_present_taskTrackerExpiryInterval = true;
    boolean that_present_taskTrackerExpiryInterval = true;
    if (this_present_taskTrackerExpiryInterval || that_present_taskTrackerExpiryInterval) {
      if (!(this_present_taskTrackerExpiryInterval && that_present_taskTrackerExpiryInterval))
        return false;
      if (this.taskTrackerExpiryInterval != that.taskTrackerExpiryInterval)
        return false;
    }

    boolean this_present_mapTasks = true;
    boolean that_present_mapTasks = true;
    if (this_present_mapTasks || that_present_mapTasks) {
      if (!(this_present_mapTasks && that_present_mapTasks))
        return false;
      if (this.mapTasks != that.mapTasks)
        return false;
    }

    boolean this_present_reduceTasks = true;
    boolean that_present_reduceTasks = true;
    if (this_present_reduceTasks || that_present_reduceTasks) {
      if (!(this_present_reduceTasks && that_present_reduceTasks))
        return false;
      if (this.reduceTasks != that.reduceTasks)
        return false;
    }

    boolean this_present_maxMapTasks = true;
    boolean that_present_maxMapTasks = true;
    if (this_present_maxMapTasks || that_present_maxMapTasks) {
      if (!(this_present_maxMapTasks && that_present_maxMapTasks))
        return false;
      if (this.maxMapTasks != that.maxMapTasks)
        return false;
    }

    boolean this_present_maxReduceTasks = true;
    boolean that_present_maxReduceTasks = true;
    if (this_present_maxReduceTasks || that_present_maxReduceTasks) {
      if (!(this_present_maxReduceTasks && that_present_maxReduceTasks))
        return false;
      if (this.maxReduceTasks != that.maxReduceTasks)
        return false;
    }

    boolean this_present_state = true && this.isSetState();
    boolean that_present_state = true && that.isSetState();
    if (this_present_state || that_present_state) {
      if (!(this_present_state && that_present_state))
        return false;
      if (!this.state.equals(that.state))
        return false;
    }

    boolean this_present_usedMemory = true;
    boolean that_present_usedMemory = true;
    if (this_present_usedMemory || that_present_usedMemory) {
      if (!(this_present_usedMemory && that_present_usedMemory))
        return false;
      if (this.usedMemory != that.usedMemory)
        return false;
    }

    boolean this_present_maxMemory = true;
    boolean that_present_maxMemory = true;
    if (this_present_maxMemory || that_present_maxMemory) {
      if (!(this_present_maxMemory && that_present_maxMemory))
        return false;
      if (this.maxMemory != that.maxMemory)
        return false;
    }

    boolean this_present_totalSubmissions = true;
    boolean that_present_totalSubmissions = true;
    if (this_present_totalSubmissions || that_present_totalSubmissions) {
      if (!(this_present_totalSubmissions && that_present_totalSubmissions))
        return false;
      if (this.totalSubmissions != that.totalSubmissions)
        return false;
    }

    boolean this_present_hasRestarted = true;
    boolean that_present_hasRestarted = true;
    if (this_present_hasRestarted || that_present_hasRestarted) {
      if (!(this_present_hasRestarted && that_present_hasRestarted))
        return false;
      if (this.hasRestarted != that.hasRestarted)
        return false;
    }

    boolean this_present_hasRecovered = true;
    boolean that_present_hasRecovered = true;
    if (this_present_hasRecovered || that_present_hasRecovered) {
      if (!(this_present_hasRecovered && that_present_hasRecovered))
        return false;
      if (this.hasRecovered != that.hasRecovered)
        return false;
    }

    boolean this_present_startTime = true;
    boolean that_present_startTime = true;
    if (this_present_startTime || that_present_startTime) {
      if (!(this_present_startTime && that_present_startTime))
        return false;
      if (this.startTime != that.startTime)
        return false;
    }

    boolean this_present_hostname = true && this.isSetHostname();
    boolean that_present_hostname = true && that.isSetHostname();
    if (this_present_hostname || that_present_hostname) {
      if (!(this_present_hostname && that_present_hostname))
        return false;
      if (!this.hostname.equals(that.hostname))
        return false;
    }

    boolean this_present_identifier = true && this.isSetIdentifier();
    boolean that_present_identifier = true && that.isSetIdentifier();
    if (this_present_identifier || that_present_identifier) {
      if (!(this_present_identifier && that_present_identifier))
        return false;
      if (!this.identifier.equals(that.identifier))
        return false;
    }

    boolean this_present_httpPort = true;
    boolean that_present_httpPort = true;
    if (this_present_httpPort || that_present_httpPort) {
      if (!(this_present_httpPort && that_present_httpPort))
        return false;
      if (this.httpPort != that.httpPort)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

  public int compareTo(ThriftClusterStatus other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    ThriftClusterStatus typedOther = (ThriftClusterStatus)other;

    lastComparison = Boolean.valueOf(isSetNumActiveTrackers()).compareTo(typedOther.isSetNumActiveTrackers());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumActiveTrackers()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numActiveTrackers, typedOther.numActiveTrackers);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetActiveTrackerNames()).compareTo(typedOther.isSetActiveTrackerNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetActiveTrackerNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activeTrackerNames, typedOther.activeTrackerNames);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBlacklistedTrackerNames()).compareTo(typedOther.isSetBlacklistedTrackerNames());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBlacklistedTrackerNames()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blacklistedTrackerNames, typedOther.blacklistedTrackerNames);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumBlacklistedTrackers()).compareTo(typedOther.isSetNumBlacklistedTrackers());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumBlacklistedTrackers()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numBlacklistedTrackers, typedOther.numBlacklistedTrackers);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNumExcludedNodes()).compareTo(typedOther.isSetNumExcludedNodes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNumExcludedNodes()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numExcludedNodes, typedOther.numExcludedNodes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTaskTrackerExpiryInterval()).compareTo(typedOther.isSetTaskTrackerExpiryInterval());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTaskTrackerExpiryInterval()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskTrackerExpiryInterval, typedOther.taskTrackerExpiryInterval);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(typedOther.isSetMapTasks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMapTasks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(typedOther.isSetReduceTasks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetReduceTasks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(typedOther.isSetMaxMapTasks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxMapTasks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(typedOther.isSetMaxReduceTasks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxReduceTasks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, typedOther.state);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUsedMemory()).compareTo(typedOther.isSetUsedMemory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUsedMemory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.usedMemory, typedOther.usedMemory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxMemory()).compareTo(typedOther.isSetMaxMemory());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxMemory()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxMemory, typedOther.maxMemory);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTotalSubmissions()).compareTo(typedOther.isSetTotalSubmissions());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTotalSubmissions()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.totalSubmissions, typedOther.totalSubmissions);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHasRestarted()).compareTo(typedOther.isSetHasRestarted());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHasRestarted()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasRestarted, typedOther.hasRestarted);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHasRecovered()).compareTo(typedOther.isSetHasRecovered());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHasRecovered()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasRecovered, typedOther.hasRecovered);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(typedOther.isSetStartTime());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartTime()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startTime, typedOther.startTime);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHostname()).compareTo(typedOther.isSetHostname());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHostname()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostname, typedOther.hostname);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(typedOther.isSetIdentifier());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIdentifier()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.identifier, typedOther.identifier);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetHttpPort()).compareTo(typedOther.isSetHttpPort());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetHttpPort()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.httpPort, typedOther.httpPort);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    org.apache.thrift.protocol.TField field;
    iprot.readStructBegin();
    while (true)
    {
      field = iprot.readFieldBegin();
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
        break;
      }
      switch (field.id) {
        case 1: // NUM_ACTIVE_TRACKERS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.numActiveTrackers = iprot.readI32();
            setNumActiveTrackersIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // ACTIVE_TRACKER_NAMES
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
              this.activeTrackerNames = new ArrayList<String>(_list51.size);
              for (int _i52 = 0; _i52 < _list51.size; ++_i52)
              {
                String _elem53; // required
                _elem53 = iprot.readString();
                this.activeTrackerNames.add(_elem53);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // BLACKLISTED_TRACKER_NAMES
          if (field.type == org.apache.thrift.protocol.TType.LIST) {
            {
              org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
              this.blacklistedTrackerNames = new ArrayList<String>(_list54.size);
              for (int _i55 = 0; _i55 < _list54.size; ++_i55)
              {
                String _elem56; // required
                _elem56 = iprot.readString();
                this.blacklistedTrackerNames.add(_elem56);
              }
              iprot.readListEnd();
            }
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // NUM_BLACKLISTED_TRACKERS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.numBlacklistedTrackers = iprot.readI32();
            setNumBlacklistedTrackersIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // NUM_EXCLUDED_NODES
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.numExcludedNodes = iprot.readI32();
            setNumExcludedNodesIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 6: // TASK_TRACKER_EXPIRY_INTERVAL
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.taskTrackerExpiryInterval = iprot.readI64();
            setTaskTrackerExpiryIntervalIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 7: // MAP_TASKS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.mapTasks = iprot.readI32();
            setMapTasksIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 8: // REDUCE_TASKS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.reduceTasks = iprot.readI32();
            setReduceTasksIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 9: // MAX_MAP_TASKS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.maxMapTasks = iprot.readI32();
            setMaxMapTasksIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 10: // MAX_REDUCE_TASKS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.maxReduceTasks = iprot.readI32();
            setMaxReduceTasksIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 11: // STATE
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.state = JobTrackerState.findByValue(iprot.readI32());
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 12: // USED_MEMORY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.usedMemory = iprot.readI64();
            setUsedMemoryIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 13: // MAX_MEMORY
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.maxMemory = iprot.readI64();
            setMaxMemoryIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 14: // TOTAL_SUBMISSIONS
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.totalSubmissions = iprot.readI32();
            setTotalSubmissionsIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 15: // HAS_RESTARTED
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.hasRestarted = iprot.readBool();
            setHasRestartedIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 16: // HAS_RECOVERED
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
            this.hasRecovered = iprot.readBool();
            setHasRecoveredIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 17: // START_TIME
          if (field.type == org.apache.thrift.protocol.TType.I64) {
            this.startTime = iprot.readI64();
            setStartTimeIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 18: // HOSTNAME
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.hostname = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 19: // IDENTIFIER
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
            this.identifier = iprot.readString();
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 20: // HTTP_PORT
          if (field.type == org.apache.thrift.protocol.TType.I32) {
            this.httpPort = iprot.readI32();
            setHttpPortIsSet(true);
          } else { 
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(NUM_ACTIVE_TRACKERS_FIELD_DESC);
    oprot.writeI32(this.numActiveTrackers);
    oprot.writeFieldEnd();
    if (this.activeTrackerNames != null) {
      oprot.writeFieldBegin(ACTIVE_TRACKER_NAMES_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.activeTrackerNames.size()));
        for (String _iter57 : this.activeTrackerNames)
        {
          oprot.writeString(_iter57);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.blacklistedTrackerNames != null) {
      oprot.writeFieldBegin(BLACKLISTED_TRACKER_NAMES_FIELD_DESC);
      {
        oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.blacklistedTrackerNames.size()));
        for (String _iter58 : this.blacklistedTrackerNames)
        {
          oprot.writeString(_iter58);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(NUM_BLACKLISTED_TRACKERS_FIELD_DESC);
    oprot.writeI32(this.numBlacklistedTrackers);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(NUM_EXCLUDED_NODES_FIELD_DESC);
    oprot.writeI32(this.numExcludedNodes);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TASK_TRACKER_EXPIRY_INTERVAL_FIELD_DESC);
    oprot.writeI64(this.taskTrackerExpiryInterval);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC);
    oprot.writeI32(this.mapTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC);
    oprot.writeI32(this.reduceTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC);
    oprot.writeI32(this.maxMapTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC);
    oprot.writeI32(this.maxReduceTasks);
    oprot.writeFieldEnd();
    if (this.state != null) {
      oprot.writeFieldBegin(STATE_FIELD_DESC);
      oprot.writeI32(this.state.getValue());
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(USED_MEMORY_FIELD_DESC);
    oprot.writeI64(this.usedMemory);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAX_MEMORY_FIELD_DESC);
    oprot.writeI64(this.maxMemory);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(TOTAL_SUBMISSIONS_FIELD_DESC);
    oprot.writeI32(this.totalSubmissions);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(HAS_RESTARTED_FIELD_DESC);
    oprot.writeBool(this.hasRestarted);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(HAS_RECOVERED_FIELD_DESC);
    oprot.writeBool(this.hasRecovered);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(START_TIME_FIELD_DESC);
    oprot.writeI64(this.startTime);
    oprot.writeFieldEnd();
    if (this.hostname != null) {
      oprot.writeFieldBegin(HOSTNAME_FIELD_DESC);
      oprot.writeString(this.hostname);
      oprot.writeFieldEnd();
    }
    if (this.identifier != null) {
      oprot.writeFieldBegin(IDENTIFIER_FIELD_DESC);
      oprot.writeString(this.identifier);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(HTTP_PORT_FIELD_DESC);
    oprot.writeI32(this.httpPort);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("ThriftClusterStatus(");
    boolean first = true;

    sb.append("numActiveTrackers:");
    sb.append(this.numActiveTrackers);
    first = false;
    if (!first) sb.append(", ");
    sb.append("activeTrackerNames:");
    if (this.activeTrackerNames == null) {
      sb.append("null");
    } else {
      sb.append(this.activeTrackerNames);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("blacklistedTrackerNames:");
    if (this.blacklistedTrackerNames == null) {
      sb.append("null");
    } else {
      sb.append(this.blacklistedTrackerNames);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("numBlacklistedTrackers:");
    sb.append(this.numBlacklistedTrackers);
    first = false;
    if (!first) sb.append(", ");
    sb.append("numExcludedNodes:");
    sb.append(this.numExcludedNodes);
    first = false;
    if (!first) sb.append(", ");
    sb.append("taskTrackerExpiryInterval:");
    sb.append(this.taskTrackerExpiryInterval);
    first = false;
    if (!first) sb.append(", ");
    sb.append("mapTasks:");
    sb.append(this.mapTasks);
    first = false;
    if (!first) sb.append(", ");
    sb.append("reduceTasks:");
    sb.append(this.reduceTasks);
    first = false;
    if (!first) sb.append(", ");
    sb.append("maxMapTasks:");
    sb.append(this.maxMapTasks);
    first = false;
    if (!first) sb.append(", ");
    sb.append("maxReduceTasks:");
    sb.append(this.maxReduceTasks);
    first = false;
    if (!first) sb.append(", ");
    sb.append("state:");
    if (this.state == null) {
      sb.append("null");
    } else {
      sb.append(this.state);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("usedMemory:");
    sb.append(this.usedMemory);
    first = false;
    if (!first) sb.append(", ");
    sb.append("maxMemory:");
    sb.append(this.maxMemory);
    first = false;
    if (!first) sb.append(", ");
    sb.append("totalSubmissions:");
    sb.append(this.totalSubmissions);
    first = false;
    if (!first) sb.append(", ");
    sb.append("hasRestarted:");
    sb.append(this.hasRestarted);
    first = false;
    if (!first) sb.append(", ");
    sb.append("hasRecovered:");
    sb.append(this.hasRecovered);
    first = false;
    if (!first) sb.append(", ");
    sb.append("startTime:");
    sb.append(this.startTime);
    first = false;
    if (!first) sb.append(", ");
    sb.append("hostname:");
    if (this.hostname == null) {
      sb.append("null");
    } else {
      sb.append(this.hostname);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("identifier:");
    if (this.identifier == null) {
      sb.append("null");
    } else {
      sb.append(this.identifier);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("httpPort:");
    sb.append(this.httpPort);
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bit_vector = new BitSet(1);
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

}

