Package org.apache.flink.types

Examples of org.apache.flink.types.Record.clear()


            if (this.output instanceof RecordOutputCollector) {
              // Record going directly into network channels
              final RecordOutputCollector output = (RecordOutputCollector) this.output;
              while (!this.taskCanceled && !inFormat.reachedEnd()) {
                // build next pair and ship pair if it is valid
                typedRecord.clear();
                Record returnedRecord = null;
                if ((returnedRecord = inFormat.nextRecord(typedRecord)) != null) {
                  output.collect(returnedRecord);
                }
              }
View Full Code Here


 
      record.setField(0, new IntValue(23));
      record.write(new OutputViewDataOutputStreamWrapper(out));
      Assert.assertEquals(23, record.getField(0, IntValue.class).getValue());
 
      record.clear();
      Assert.assertEquals(0, record.getNumFields());
 
      Record record2 = new Record(new IntValue(42));
      record2.read(new InputViewDataInputStreamWrapper(in));
      Assert.assertEquals(42, record2.getField(0, IntValue.class).getValue());
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.