Examples of IterationEventWithAggregators


Examples of org.apache.flink.runtime.iterative.event.IterationEventWithAggregators

  private ClassLoader cl = ClassLoader.getSystemClassLoader();
 
  @Test
  public void testSerializationOfEmptyEvent() {
    AllWorkersDoneEvent e = new AllWorkersDoneEvent();
    IterationEventWithAggregators deserialized = pipeThroughSerialization(e);
   
    Assert.assertEquals(0, deserialized.getAggregatorNames().length);
    Assert.assertEquals(0, deserialized.getAggregates(cl).length);
  }
View Full Code Here

Examples of org.apache.flink.runtime.iterative.event.IterationEventWithAggregators

    allVals.add(stringValue);
    allVals.add(longValue);
   
    // run the serialization
    AllWorkersDoneEvent e = new AllWorkersDoneEvent(aggMap);
    IterationEventWithAggregators deserialized = pipeThroughSerialization(e);
   
    // verify the result
    String[] names = deserialized.getAggregatorNames();
    Value[] aggregates = deserialized.getAggregates(cl);
   
    Assert.assertEquals(allNames.size(), names.length);
    Assert.assertEquals(allVals.size(), aggregates.length);
   
    // check that all the correct names and values are returned
View Full Code Here

Examples of org.apache.flink.runtime.iterative.event.IterationEventWithAggregators

      byte[] data = baos.toByteArray();
      out.close();
      baos.close();
     
      DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));
      IterationEventWithAggregators newEvent = event.getClass().newInstance();
      newEvent.read(new InputViewDataInputStreamWrapper(in));
      in.close();
     
      return newEvent;
    } catch (Exception e) {
      System.err.println(e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.