/** flush all currently written data to the file system */ public void syncFs() throws IOException { if (out != null) { out.sync(); // flush contents to file system } }
@Override public void hflush(FSDataOutputStream stream) throws IOException { stream.sync(); }
@Override public void hflush(FSDataOutputStream stream) throws IOException { stream.sync(); }
@Override public void hflush(FSDataOutputStream stream) throws IOException { stream.sync(); }
@Override public void hflush(FSDataOutputStream stream) throws IOException { stream.sync(); }
/** * 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.sync(); // flush contents to file system } }
@Override public void sync() throws IOException { outputStream.flush(); fsOutputStream.sync(); } }
/** * 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.sync(); // flush contents to file system } }
/** * 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.sync(); // flush contents to file system } }
/** * 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.sync(); // flush contents to file system } }
/** * 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.sync(); // flush contents to file system } }
/** * 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.sync(); // flush contents to file system } }
public void close() throws IOException { if (finalSync) { ((FSDataOutputStream) out).sync(); } super.close(null); } }
@Override @Deprecated public void sync() throws IOException { try { underlyingOS.sync(); } catch(FSError e) { throw propagateFSError(e); } }
public synchronized void defineTablet(int seq, int tid, KeyExtent tablet) throws IOException { // write this log to the METADATA table final LogFileKey key = new LogFileKey(); key.event = DEFINE_TABLET; key.seq = seq; key.tid = tid; key.tablet = tablet; try { write(key, EMPTY); logFile.sync(); } catch (IOException ex) { log.error(ex); throw ex; } }
public void flushFile() { try { flushBuffer(buffer); fsout.sync(); } catch (IOException ex) { log.fatal(ex); } }
@SuppressWarnings("deprecation") private void updateProgressLog(final MasterContext<LogisticRegressionParams, LogisticRegressionParams> context) { int currentIteration = context.getCurrentIteration(); if(currentIteration == 1) { // first iteration is used for training preparation return; } String progress = new StringBuilder(200).append(" Trainer ").append(this.trainerId).append(" Epoch #") .append(currentIteration - 1).append(" Training Error:") .append(context.getMasterResult().getTrainError()).append(" Validation Error:") .append(context.getMasterResult().getTestError()).append("\n").toString(); try { LOG.debug("Writing progress results to {} {}", context.getCurrentIteration(), progress.toString()); this.progressOutput.write(progress.getBytes("UTF-8")); this.progressOutput.flush(); this.progressOutput.sync(); } catch (IOException e) { LOG.error("Error in write progress log:", e); } }
@SuppressWarnings("deprecation") private void updateProgressLog(final MasterContext<NNParams, NNParams> context) { int currentIteration = context.getCurrentIteration(); if(context.isFirstIteration()) { // first iteration is used for training preparation return; } String progress = new StringBuilder(200).append(" Trainer ").append(this.trainerId).append(" Epoch #") .append(currentIteration - 1).append(" Training Error:") .append(String.format("%.10f", context.getMasterResult().getTrainError())).append(" Validation Error:") .append(String.format("%.10f", context.getMasterResult().getTestError())).append("\n").toString(); try { LOG.debug("Writing progress results to {} {}", context.getCurrentIteration(), progress.toString()); this.progressOutput.write(progress.getBytes("UTF-8")); this.progressOutput.flush(); this.progressOutput.sync(); } catch (IOException e) { LOG.error("Error in write progress log:", e); } }