public static List<StatisticsData> cloneThreadLocalFileSystemStatistics() { List<StatisticsData> result = new ArrayList<>(); // thread local filesystem stats is private and cannot be cloned. So make a copy to new class for (FileSystem.Statistics statistics : FileSystem.getAllStatistics()) { result.add(new StatisticsData(statistics.getScheme(), statistics.getThreadStatistics())); } return result; }
FileSystem.Statistics statistics = entry.getValue(); FileSystem.Statistics.StatisticsData threadFSStats = statistics .getThreadStatistics(); List<LlapUtil.StatisticsData> allStatsBefore = LlapUtil .getStatisticsForScheme(scheme, statsBefore);
/** * Increment the number of read operations * @param count number of read operations */ public void incrementReadOps(int count) { getThreadStatistics().readOps += count; }
/** * Increment the bytes written in the statistics * @param newBytes the additional bytes written */ public void incrementBytesWritten(long newBytes) { getThreadStatistics().bytesWritten += newBytes; }
/** * Increment the number of large read operations * @param count number of large read operations */ public void incrementLargeReadOps(int count) { getThreadStatistics().largeReadOps += count; }
/** * Increment the number of write operations * @param count number of write operations */ public void incrementWriteOps(int count) { getThreadStatistics().writeOps += count; }
/** * Increment the number of read operations * @param count number of read operations */ public void incrementReadOps(int count) { getThreadStatistics().readOps += count; }
/** * Increment the number of read operations * @param count number of read operations */ public void incrementReadOps(int count) { getThreadStatistics().readOps += count; }
/** * Increment the bytes read in the statistics * @param newBytes the additional bytes read */ public void incrementBytesRead(long newBytes) { getThreadStatistics().bytesRead += newBytes; }
/** * Increment the number of write operations * @param count number of write operations */ public void incrementWriteOps(int count) { getThreadStatistics().writeOps += count; }
/** * Increment the number of write operations * @param count number of write operations */ public void incrementWriteOps(int count) { getThreadStatistics().writeOps += count; }
/** * Increment the number of read operations * @param count number of read operations */ public void incrementReadOps(int count) { getThreadStatistics().readOps += count; }
/** * Increment the bytes read in the statistics * @param newBytes the additional bytes read */ public void incrementBytesRead(long newBytes) { getThreadStatistics().bytesRead += newBytes; }
/** * Increment the bytes read by the network distance in the statistics * In the common network topology setup, distance value should be an even * number such as 0, 2, 4, 6. To make it more general, we group distance * by {1, 2}, {3, 4} and {5 and beyond} for accounting. * @param distance the network distance * @param newBytes the additional bytes read */ public void incrementBytesReadByDistance(int distance, long newBytes) { switch (distance) { case 0: getThreadStatistics().bytesReadLocalHost += newBytes; break; case 1: case 2: getThreadStatistics().bytesReadDistanceOfOneOrTwo += newBytes; break; case 3: case 4: getThreadStatistics().bytesReadDistanceOfThreeOrFour += newBytes; break; default: getThreadStatistics().bytesReadDistanceOfFiveOrLarger += newBytes; break; } }
/** * Increment the bytes read in the statistics. * @param newBytes the additional bytes read */ public void incrementBytesRead(long newBytes) { getThreadStatistics().bytesRead += newBytes; }
/** * Increment the bytes read on erasure-coded files in the statistics. * @param newBytes the additional bytes read */ public void incrementBytesReadErasureCoded(long newBytes) { getThreadStatistics().bytesReadErasureCoded += newBytes; }
/** * Increment the bytes written in the statistics. * @param newBytes the additional bytes written */ public void incrementBytesWritten(long newBytes) { getThreadStatistics().bytesWritten += newBytes; }
/** * Increment the number of read operations. * @param count number of read operations */ public void incrementReadOps(int count) { getThreadStatistics().readOps += count; }
/** * Increment the number of large read operations. * @param count number of large read operations */ public void incrementLargeReadOps(int count) { getThreadStatistics().largeReadOps += count; }
/** * Increment the number of write operations. * @param count number of write operations */ public void incrementWriteOps(int count) { getThreadStatistics().writeOps += count; }