@Override public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
@Override public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void progressChanged(ProgressEvent progressEvent) { if (progress != null) { progress.progress(); } // There are 3 http ops here, but this should be close enough for now if (progressEvent.getEventCode() == ProgressEvent.PART_STARTED_EVENT_CODE || progressEvent.getEventCode() == ProgressEvent.COMPLETED_EVENT_CODE) { statistics.incrementWriteOps(1); } long transferred = upload.getProgress().getBytesTransferred(); long delta = transferred - lastBytesTransferred; if (statistics != null && delta != 0) { statistics.incrementBytesWritten(delta); } lastBytesTransferred = transferred; }
/** * Callback for use in progress callbacks from put/multipart upload events. * Increments those statistics which are expected to be updated during * the ongoing upload operation. * @param key key to file that is being written (for logging) * @param bytes bytes successfully uploaded. */ public void incrementPutProgressStatistics(String key, long bytes) { PROGRESS.debug("PUT {}: {} bytes", key, bytes); incrementWriteOperations(); if (bytes > 0) { statistics.incrementBytesWritten(bytes); } }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
/** Writes the specified byte to this output stream. */ @Override public void write(int b) throws IOException { long startTime = System.nanoTime(); out.write(b); statistics.incrementBytesWritten(1); long duration = System.nanoTime() - startTime; ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE1); ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE1_TIME, duration); }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
/** Intermediate report of bytes uploaded. */ void bytesTransferred(long byteCount) { bytesUploaded.addAndGet(byteCount); statistics.incrementBytesWritten(byteCount); bytesPendingUpload.addAndGet(-byteCount); incrementGauge(STREAM_WRITE_BLOCK_UPLOADS_DATA_PENDING, -byteCount); }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
/** * Writes to this output stream 'len' bytes of the specified buffer starting at the given offset. */ @Override public void write(byte[] b, int offset, int len) throws IOException { long startTime = System.nanoTime(); out.write(b, offset, len); statistics.incrementBytesWritten(len); long duration = System.nanoTime() - startTime; ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE); ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE_TIME, duration); }
public void write(byte b[], int off, int len) throws IOException { out.write(b, off, len); position += len; // update position if (statistics != null) { statistics.incrementBytesWritten(len); } }
public void write(int b) throws IOException { out.write(b); position++; if (statistics != null) { statistics.incrementBytesWritten(1); } }
private static FileSystem.Statistics combineFileSystemStatistics(final FileSystem.Statistics s1, final FileSystem.Statistics s2) { FileSystem.Statistics result = new FileSystem.Statistics(s1); result.incrementReadOps(s2.getReadOps()); result.incrementLargeReadOps(s2.getLargeReadOps()); result.incrementWriteOps(s2.getWriteOps()); result.incrementBytesRead(s2.getBytesRead()); result.incrementBytesWritten(s2.getBytesWritten()); return result; }