Package eu.stratosphere.types

Examples of eu.stratosphere.types.IntValue


    this.memman = new DefaultMemoryManager(MEMORY_CAPACITY);
   
    // create test objects
    this.objects = new ArrayList<Record>(20000);
    for (int i = 0; i < NUM_VALUES; ++i) {
      this.objects.add(new Record(new IntValue(i)));
    }
   
    // create the reader
    this.reader = new MutableObjectIteratorWrapper(this.objects.iterator());
  }
View Full Code Here


    }

    @Override
    public boolean equalToReference(Record candidate) {
      try {
        final IntValue i = candidate.getField(0, IntValue.class);
        return i.getValue() == this.reference;
      } catch (NullPointerException npex) {
        throw new NullKeyFieldException();
      }
    }
View Full Code Here

    }

    @Override
    public int compareToReference(Record candidate) {
      try {
        final IntValue i = candidate.getField(0, IntValue.class);
        return i.getValue() - this.reference;
      } catch (NullPointerException npex) {
        throw new NullKeyFieldException();
      }
    }
View Full Code Here

   
    private int numLeft;
   
    public ConstantsKeyValuePairsIterator(int key, int value, int count)
    {
      this.key = new IntValue(key);
      this.value = new IntValue(value);
      this.numLeft = count;
    }
View Full Code Here

      }
      return sl;
    case INT:
      IntListValue il = new IntListValue();
      for (Object item : avroList) {
        il.add(new IntValue((Integer) item));
      }
      return il;
    case BOOLEAN:
      BooleanListValue bl = new BooleanListValue();
      for (Object item : avroList) {
View Full Code Here

      }
      return sm;
    case INT:
      IntMapValue im = new IntMapValue();
      for (Map.Entry<CharSequence, ?> entry : avroMap.entrySet()) {
        im.put(new StringValue((CharSequence) entry.getKey()), new IntValue((Integer) entry.getValue()));
      }
      return im;
    case BOOLEAN:
      BooleanMapValue bm = new BooleanMapValue();
      for (Map.Entry<CharSequence, ?> entry : avroMap.entrySet()) {
View Full Code Here

      int c = sc1.getField(3, IntValue.class).getValue();

      int p_x = p(x, a, b, c);
      int p_y = p(y, a, b, c);
      int min = Math.min(p_x, p_y);
      out.collect(new Record(jn1.getField(0, StringValue.class), new IntValue(min)));
    }
View Full Code Here

      StringTokenizer tokenizer = new StringTokenizer(line);
      while (tokenizer.hasMoreTokens()) {
        String word = tokenizer.nextToken();
       
        // we emit a (word, 1) pair
        collector.collect(new Record(new StringValue(word), new IntValue(1)));
      }
    }
View Full Code Here

        element = records.next();
        int cnt = element.getField(1, IntValue.class).getValue();
        sum += cnt;
      }

      element.setField(1, new IntValue(sum));
      out.collect(element);
    }
View Full Code Here

        valueString = record.getField(1, valueString);
        sum -= Integer.parseInt(valueString.getValue());

        LOG.debug("Processed: [" + keyString.getValue() + "," + valueString.getValue() + "]");
      }
      record.setField(1, new IntValue(sum));
      LOG.debug("Finished");
     
      out.collect(record);
    }
View Full Code Here

TOP

Related Classes of eu.stratosphere.types.IntValue

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.