res = Arrays.copyOf(res, read); igfsCtx.metrics().addReadBlocks(1, 1);
metrics.addReadBytesTime(bytes, time); metrics.decrementFilesOpenedForRead();
"stream because it was marked as closed: " + batch.path()); else igfsCtx.metrics().addWriteBlocks(1, 1);
sum.directoriesCount(), sum.filesCount(), metrics.filesOpenedForRead(), metrics.filesOpenedForWrite(), metrics.readBlocks(), metrics.readBlocksSecondary(), metrics.writeBlocks(), metrics.writeBlocksSecondary(), metrics.readBytes(), metrics.readBytesTime(), metrics.writeBytes(), metrics.writeBytesTime());
/** * Updates IGFS metrics when the stream is closed. */ protected void updateMetricsOnClose() { IgfsLocalMetrics metrics = igfsCtx.metrics(); metrics.addWrittenBytesTime(bytes, time); metrics.decrementFilesOpenedForWrite(); GridEventStorageManager evts = igfsCtx.kernalContext().event(); if (evts.isRecordable(EVT_IGFS_FILE_CLOSED_WRITE)) evts.record(new IgfsEvent(path, igfsCtx.localNode(), EVT_IGFS_FILE_CLOSED_WRITE, bytes)); }
/** * Constructs file output stream. * * @param igfsCtx IGFS context. * @param path Path to stored file. * @param bufSize The size of the buffer to be used. * @param batch Optional secondary file system batch. */ IgfsAbstractOutputStream(IgfsContext igfsCtx, IgfsPath path, int bufSize, @Nullable IgfsFileWorkerBatch batch) { synchronized (mux) { this.path = path; this.bufSize = optimizeBufferSize(bufSize); this.igfsCtx = igfsCtx; this.batch = batch; } igfsCtx.metrics().incrementFilesOpenedForWrite(); }
igfsCtx.metrics().incrementFilesOpenedForRead();
sum.directoriesCount(), sum.filesCount(), metrics.filesOpenedForRead(), metrics.filesOpenedForWrite(), metrics.readBlocks(), metrics.readBlocksSecondary(), metrics.writeBlocks(), metrics.writeBlocksSecondary(), metrics.readBytes(), metrics.readBytesTime(), metrics.writeBytes(), metrics.writeBytesTime());
/** * Updates IGFS metrics when the stream is closed. */ protected void updateMetricsOnClose() { IgfsLocalMetrics metrics = igfsCtx.metrics(); metrics.addWrittenBytesTime(bytes, time); metrics.decrementFilesOpenedForWrite(); GridEventStorageManager evts = igfsCtx.kernalContext().event(); if (evts.isRecordable(EVT_IGFS_FILE_CLOSED_WRITE)) evts.record(new IgfsEvent(path, igfsCtx.localNode(), EVT_IGFS_FILE_CLOSED_WRITE, bytes)); }
/** * Constructs file output stream. * * @param igfsCtx IGFS context. * @param path Path to stored file. * @param bufSize The size of the buffer to be used. * @param batch Optional secondary file system batch. */ IgfsAbstractOutputStream(IgfsContext igfsCtx, IgfsPath path, int bufSize, @Nullable IgfsFileWorkerBatch batch) { synchronized (mux) { this.path = path; this.bufSize = optimizeBufferSize(bufSize); this.igfsCtx = igfsCtx; this.batch = batch; } igfsCtx.metrics().incrementFilesOpenedForWrite(); }
igfsCtx.metrics().incrementFilesOpenedForRead();
metrics.addReadBytesTime(bytes, time); metrics.decrementFilesOpenedForRead();
igfsCtx.metrics().addReadBlocks(1, 0); igfsCtx.metrics().addReadBlocks(1, 0);
processBatch(id, node, nodeBlocks); igfsCtx.metrics().addWriteBlocks(1, 0); nodeBlocks.put(key, portion); igfsCtx.metrics().addWriteBlocks(writtenTotal, writtenSecondary); processBatch(id, node, nodeBlocks); igfsCtx.metrics().addWriteBlocks(nodeBlocks.size(), 0);
igfsCtx.metrics().addReadBlocks(1, 0);
"stream because it was marked as closed: " + batch.path()); else igfsCtx.metrics().addWriteBlocks(1, 1);
res = Arrays.copyOf(res, read); igfsCtx.metrics().addReadBlocks(1, 1);
processBatch(id, node, nodeBlocks); igfsCtx.metrics().addWriteBlocks(1, 0); nodeBlocks.put(key, portion); igfsCtx.metrics().addWriteBlocks(writtenTotal, writtenSecondary); processBatch(id, node, nodeBlocks); igfsCtx.metrics().addWriteBlocks(nodeBlocks.size(), 0);
igfsCtx.metrics().addReadBlocks(1, 0); igfsCtx.metrics().addReadBlocks(1, 0);
igfsCtx.metrics().addReadBlocks(1, 0);