Package org.apache.flink.types

Examples of org.apache.flink.types.NullValue


  }
 
  @Test
  public void testPactNull() {
   
    final NullValue pn1 = new NullValue();
    final NullValue pn2 = new NullValue();
   
    Assert.assertEquals("PactNull not equal to other PactNulls.", pn1, pn2);
    Assert.assertEquals("PactNull not equal to other PactNulls.", pn2, pn1);
   
    Assert.assertFalse("PactNull equal to other null.", pn1.equals(null));
   
    // test serialization
    final NullValue pn = new NullValue();
    final int numWrites = 13;
   
    try {
      // write it multiple times
      for (int i = 0; i < numWrites; i++) {
        pn.write(new OutputViewDataOutputStreamWrapper(mOut));
      }
     
      // read it multiple times
      for (int i = 0; i < numWrites; i++) {
        pn.read(new InputViewDataInputStreamWrapper(mIn));
      }
     
      Assert.assertEquals("Reading PactNull does not consume the same data as was written.", mIn.available(), 0);
    }
    catch (IOException ioex) {
View Full Code Here


  }
 
  @Test
  public void testPactNull() {
   
    final NullValue pn1 = new NullValue();
    final NullValue pn2 = new NullValue();
   
    assertNormalizableKey(pn1, pn2, 0);
  }
View Full Code Here

TOP

Related Classes of org.apache.flink.types.NullValue

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.