mukesh katariya created AVRO-2169: ------------------------------------- Summary: Flushing of output stream in DataFileWriter<D>#BufferedFileOutputStream out Key: AVRO-2169 URL: https://issues.apache.org/jira/browse/AVRO-2169 Project: Avro Issue Type: Improvement Components: java Affects Versions: 1.8.2 Reporter: mukesh katariya Fix For: 1.8.2
Hi I am looking a the code of DataFileWriter inside the package org.apache.avro.file. private BufferedFileOutputStream out; we use the out stream. when the close method is called this stream is not flushed. {code:java} /** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. By default, this will also flush the * block to the stream. * * If {@linkplain #setFlushOnEveryBlock(boolean)} is * called with param set to false, then this method may not flush * the block. In this case, the {@linkplain #flush()} must be called to * flush the stream. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); } /** Calls {@linkplain #sync()} and then flushes the current state of the * file. */ @Override public void flush() throws IOException { sync(); vout.flush(); } {code} Can this lead to potential issues? -- This message was sent by Atlassian JIRA (v7.6.3#76005)