@Override public void flush() throws IOException { fdos.hflush(); }
@Override public void flush() throws IOException { out.hflush(); }
@Override public void hflush(FSDataOutputStream stream) throws IOException { stream.hflush(); }
@Override public void hflush() throws IOException { if (out != null) { out.hflush(); } }
/** * flush all currently written data to the file system * @deprecated Use {@link #hsync()} or {@link #hflush()} instead */ @Deprecated public void syncFs() throws IOException { if (out != null) { out.hflush(); // flush contents to file system } }
@Override public void sync() throws IOException { out.hflush(); out.hsync(); }
protected void syncStream(final FSDataOutputStream stream) throws IOException { if (useHsync) { stream.hsync(); } else { stream.hflush(); } }
@Override public void flush() { synchronized (lock) { // currentOutStream is null if currentFSOutStream is null if (currentFSOutStream != null) { try { currentFSOutStream.hflush(); } catch (IOException ex) { throwMetricsException("Unable to flush log file", ex); } } } }
@Override public long flush() throws IOException { if (outStream == null) { throw new IllegalStateException("Writer is not open"); } if (syncOnFlush) { outStream.hsync(); } else { outStream.hflush(); } return outStream.getPos(); }
@Override public void sync(boolean forceSync) throws IOException { FSDataOutputStream fsdos = this.output; if (fsdos == null) { return; // Presume closed } fsdos.flush(); if (forceSync) { fsdos.hsync(); } else { fsdos.hflush(); } }
private void logProgress(String fileOffset, boolean prefixNewLine) throws IOException { long now = System.currentTimeMillis(); LogEntry entry = new LogEntry(now, componentID, fileOffset); String line = entry.toString(); if (prefixNewLine) { lockFileStream.writeBytes(System.lineSeparator() + line); } else { lockFileStream.writeBytes(line); } lockFileStream.hflush(); lastEntry = entry; // update this only after writing to hdfs }
private void flush0(CompletableFuture<Long> future, ByteArrayOutputStream buffer, boolean sync) { try { if (buffer.size() > 0) { out.write(buffer.getBuffer(), 0, buffer.size()); if (sync) { out.hsync(); } else { out.hflush(); } } future.complete(out.getPos()); } catch (IOException e) { future.completeExceptionally(e); return; } }
currentFSOutStream.hflush(); } catch (IOException ex) { throwMetricsException("Failed flushing the stream", ex);
@Override public void sync(FSDataOutputStream outputStream) throws IOException { outputStream.hflush(); outputStream.hsync(); } })
@Override public void sync(FSDataOutputStream outputStream) throws IOException { outputStream.hflush(); outputStream.hsync(); ((HdfsDataOutputStream) outputStream).hsync(EnumSet.of(HdfsDataOutputStream.SyncFlag.UPDATE_LENGTH)); } })
if (write2IdFile) { fsout.writeBytes(InetAddress.getLocalHost().getHostName()); fsout.hflush();
@Override public void hflush() throws IOException { if (out != null) { out.hflush(); } }
public void flush() throws IOException { if (stream != null) { jsonGenerator.flush(); stream.hflush(); } }
@Override public void flush() throws IOException { super.flush(); fsOutputStream.hflush(); }
@Override public void hflush() throws IOException { try { underlyingOS.hflush(); } catch(FSError e) { throw propagateFSError(e); } }