Package eu.stratosphere.api.java.typeutils.runtime.record

Examples of eu.stratosphere.api.java.typeutils.runtime.record.RecordComparator


  }
 
  @Test
  public void testNullKey() {
    // Test for IntValue
    @SuppressWarnings("unchecked")
    final RecordComparator intComp = new RecordComparator(new int[] {0}, new Class[] {IntValue.class});
    final ChannelSelector<Record> oe1 = new RecordOutputEmitter(ShipStrategyType.PARTITION_HASH, intComp);

    Record rec = new Record(2);
    rec.setField(1, new IntValue(1));
View Full Code Here


 
  @Test
  public void testWrongKeyClass() {
   
    // Test for IntValue
    @SuppressWarnings("unchecked")
    final RecordComparator doubleComp = new RecordComparator(new int[] {0}, new Class[] {DoubleValue.class});
    final ChannelSelector<Record> oe1 = new RecordOutputEmitter(ShipStrategyType.PARTITION_HASH, doubleComp);

    PipedInputStream pipedInput = new PipedInputStream(1024*1024);
    DataInputStream in = new DataInputStream(pipedInput);
    DataOutputStream out;
View Full Code Here

   
    final int NUM_ELEMENTS = 10000000;
   
    final DataDistribution distri = new UniformIntegerDistribution(DISTR_MIN, DISTR_MAX);
   
    @SuppressWarnings("unchecked")
    final RecordComparator intComp = new RecordComparator(new int[] {0}, new Class[] {IntValue.class});
    final ChannelSelector<Record> oe = new RecordOutputEmitter(ShipStrategyType.PARTITION_RANGE, intComp, distri);
   
    final IntValue integer = new IntValue();
    final Record rec = new Record();
   
View Full Code Here

 
  @SuppressWarnings("unchecked")
  @Before
  public void setup() {
    this.serializer = RecordSerializer.get();
    this.comparator = new RecordComparator(new int[] {0}, new Class[] { TestData.Key.class});
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Before
  public void beforeTest() {
    this.serializer1 = RecordSerializer.get();
    this.serializer2 = RecordSerializer.get();
    this.comparator1 = new RecordComparator(new int[] {0}, new Class[]{TestData.Key.class});
    this.comparator2 = new RecordComparator(new int[] {0}, new Class[]{TestData.Key.class});
    this.pairComparator = new RecordPairComparator(new int[] {0}, new int[] {0}, new Class[]{TestData.Key.class});
  }
View Full Code Here

  public void beforeTest() {
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE);
    this.ioManager = new IOManager();
   
    this.serializerFactory = RecordSerializerFactory.get();
    this.comparator = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
  }
View Full Code Here

  public void beforeTest() {
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE);
    this.ioManager = new IOManager();
   
    this.pactRecordSerializer = RecordSerializerFactory.get();
    this.pactRecordComparator = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Before
  public void beforeTest() {
    this.serializer1 = RecordSerializerFactory.get();
    this.serializer2 = RecordSerializerFactory.get();
    this.comparator1 = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
    this.comparator2 = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
    this.pairComparator11 = new RecordPairComparator(new int[] {0}, new int[] {0}, new Class[] {TestData.Key.class});
   
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE, PAGE_SIZE);
    this.ioManager = new IOManager();
  }
View Full Code Here

  @Before
  public void beforeTest()
  {
    this.serializer1 = RecordSerializer.get();
    this.serializer2 = RecordSerializer.get();
    this.comparator1 = new RecordComparator(new int[] {0}, new Class[]{TestData.Key.class});
    this.comparator2 = new RecordComparator(new int[] {0}, new Class[]{TestData.Key.class});
    this.pairComparator = new RecordPairComparator(new int[] {0}, new int[] {0}, new Class[]{TestData.Key.class});
   
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE);
    this.ioManager = new IOManager();
  }
View Full Code Here

  @Before
  public void beforeTest()
  {
    this.recordSerializer = RecordSerializer.get();
   
    this.record1Comparator = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
    this.record2Comparator = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
    this.recordPairComparator = new RecordPairComparator(new int[] {0}, new int[] {0}, new Class[] {TestData.Key.class});
   
   
    final int[] keyPos = new int[] {0};
    final Class<? extends Key>[] keyType = (Class<? extends Key>[]) new Class[] { IntValue.class };
   
    this.recordBuildSideAccesssor = RecordSerializer.get();
    this.recordProbeSideAccesssor = RecordSerializer.get();
    this.recordBuildSideComparator = new RecordComparator(keyPos, keyType);
    this.recordProbeSideComparator = new RecordComparator(keyPos, keyType);
    this.pactRecordComparator = new HashTableITCase.RecordPairComparatorFirstInt();
   
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE, PAGE_SIZE);
    this.ioManager = new IOManager();
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.api.java.typeutils.runtime.record.RecordComparator

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.