Package eu.stratosphere.types

Examples of eu.stratosphere.types.Key


  @SuppressWarnings("rawtypes")
  @Override
  public boolean equalToReference(Record candidate) {
    for (int i = 0; i < this.keyFields2.length; i++) {
      final Key k = candidate.getField(this.keyFields2[i], this.keyHolders2[i]);
      if (k == null) {
        throw new NullKeyFieldException(this.keyFields2[i]);
      } else if (!k.equals(this.keyHolders1[i])) {
        return false;
      }
    }
    return true;
  }
View Full Code Here


  @SuppressWarnings({ "rawtypes", "unchecked" })
  @Override
  public int compareToReference(Record candidate) {
    for (int i = 0; i < this.keyFields2.length; i++) {
      final Key k = candidate.getField(this.keyFields2[i], this.keyHolders2[i]);
      if (k == null) {
        throw new NullKeyFieldException(this.keyFields2[i]);
      } else {
        final int comp = k.compareTo(this.keyHolders1[i]);
        if (comp != 0) {
          return comp;
        }
      }
    }
View Full Code Here

  @Override
  public int compare(Record first, Record second) {
    int i = 0;
    try {
      for (; i < this.keyFields.length; i++) {
        Key k1 = first.getField(this.keyFields[i], this.keyHolders[i]);
        Key k2 = second.getField(this.keyFields[i], this.transientKeyHolders[i]);
        int cmp = k1.compareTo(k2);
        if (cmp != 0) {
          return cmp;
        }
      }
View Full Code Here

  public int compare(DataInputView source1, DataInputView source2) throws IOException {
    this.temp1.read(source1);
    this.temp2.read(source2);
   
    for (int i = 0; i < this.keyFields.length; i++) {
      @SuppressWarnings("rawtypes")
      final Key k1 = this.temp1.getField(this.keyFields[i], this.keyHolders[i]);
      @SuppressWarnings("rawtypes")
      final Key k2 = this.temp2.getField(this.keyFields[i], this.transientKeyHolders[i]);
     
      if (k1 == null || k2 == null) {
        throw new NullKeyFieldException(this.keyFields[i]);
      }
View Full Code Here

TOP

Related Classes of eu.stratosphere.types.Key

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.