Beispiel #1
0
 /** Performs a deep copy on <i>other</i>. */
 public DFSHealthReport(DFSHealthReport other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   this.bytesTotal = other.bytesTotal;
   this.bytesUsed = other.bytesUsed;
   this.bytesRemaining = other.bytesRemaining;
   this.bytesNonDfs = other.bytesNonDfs;
   this.numLiveDataNodes = other.numLiveDataNodes;
   this.numDeadDataNodes = other.numDeadDataNodes;
   if (other.isSetUpgradeStatus()) {
     this.upgradeStatus = new UpgradeStatusReport(other.upgradeStatus);
   }
   this.httpPort = other.httpPort;
 }
Beispiel #2
0
  public int compareTo(DFSHealthReport other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

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

    lastComparison = Boolean.valueOf(isSetBytesTotal()).compareTo(isSetBytesTotal());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(bytesTotal, typedOther.bytesTotal);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetBytesUsed()).compareTo(isSetBytesUsed());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(bytesUsed, typedOther.bytesUsed);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetBytesRemaining()).compareTo(isSetBytesRemaining());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(bytesRemaining, typedOther.bytesRemaining);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetBytesNonDfs()).compareTo(isSetBytesNonDfs());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(bytesNonDfs, typedOther.bytesNonDfs);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetNumLiveDataNodes()).compareTo(isSetNumLiveDataNodes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(numLiveDataNodes, typedOther.numLiveDataNodes);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetNumDeadDataNodes()).compareTo(isSetNumDeadDataNodes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(numDeadDataNodes, typedOther.numDeadDataNodes);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetUpgradeStatus()).compareTo(isSetUpgradeStatus());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(upgradeStatus, typedOther.upgradeStatus);
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = Boolean.valueOf(isSetHttpPort()).compareTo(isSetHttpPort());
    if (lastComparison != 0) {
      return lastComparison;
    }
    lastComparison = TBaseHelper.compareTo(httpPort, typedOther.httpPort);
    if (lastComparison != 0) {
      return lastComparison;
    }
    return 0;
  }
Beispiel #3
0
  public boolean equals(DFSHealthReport that) {
    if (that == null) return false;

    boolean this_present_bytesTotal = true;
    boolean that_present_bytesTotal = true;
    if (this_present_bytesTotal || that_present_bytesTotal) {
      if (!(this_present_bytesTotal && that_present_bytesTotal)) return false;
      if (this.bytesTotal != that.bytesTotal) return false;
    }

    boolean this_present_bytesUsed = true;
    boolean that_present_bytesUsed = true;
    if (this_present_bytesUsed || that_present_bytesUsed) {
      if (!(this_present_bytesUsed && that_present_bytesUsed)) return false;
      if (this.bytesUsed != that.bytesUsed) return false;
    }

    boolean this_present_bytesRemaining = true;
    boolean that_present_bytesRemaining = true;
    if (this_present_bytesRemaining || that_present_bytesRemaining) {
      if (!(this_present_bytesRemaining && that_present_bytesRemaining)) return false;
      if (this.bytesRemaining != that.bytesRemaining) return false;
    }

    boolean this_present_bytesNonDfs = true;
    boolean that_present_bytesNonDfs = true;
    if (this_present_bytesNonDfs || that_present_bytesNonDfs) {
      if (!(this_present_bytesNonDfs && that_present_bytesNonDfs)) return false;
      if (this.bytesNonDfs != that.bytesNonDfs) return false;
    }

    boolean this_present_numLiveDataNodes = true;
    boolean that_present_numLiveDataNodes = true;
    if (this_present_numLiveDataNodes || that_present_numLiveDataNodes) {
      if (!(this_present_numLiveDataNodes && that_present_numLiveDataNodes)) return false;
      if (this.numLiveDataNodes != that.numLiveDataNodes) return false;
    }

    boolean this_present_numDeadDataNodes = true;
    boolean that_present_numDeadDataNodes = true;
    if (this_present_numDeadDataNodes || that_present_numDeadDataNodes) {
      if (!(this_present_numDeadDataNodes && that_present_numDeadDataNodes)) return false;
      if (this.numDeadDataNodes != that.numDeadDataNodes) return false;
    }

    boolean this_present_upgradeStatus = true && this.isSetUpgradeStatus();
    boolean that_present_upgradeStatus = true && that.isSetUpgradeStatus();
    if (this_present_upgradeStatus || that_present_upgradeStatus) {
      if (!(this_present_upgradeStatus && that_present_upgradeStatus)) return false;
      if (!this.upgradeStatus.equals(that.upgradeStatus)) 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;
  }