Package org.apache.flink.runtime.types

Examples of org.apache.flink.runtime.types.FileRecord


   * Tests the serialization/deserialization of the {@link FileRecord} class.
   */
  @Test
  public void testFileRecord() {

    final FileRecord orig = new FileRecord("Test Filename");
    final byte[] data = new byte[128];

    orig.append(data, 0, data.length);
    orig.append(data, 0, data.length);

    assertEquals(orig.getDataBuffer().length, 2 * data.length);

    try {
      final FileRecord copy = (FileRecord) CommonTestUtils.createCopyWritable(orig);

      assertEquals(orig.getFileName(), copy.getFileName());
      assertEquals(orig, copy);
      assertEquals(orig.hashCode(), copy.hashCode());

    } catch (IOException ioe) {
      fail(ioe.getMessage());
    }

View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.types.FileRecord

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.