-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-18190. Adds iostats for prefetching #4458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0224784
d909226
6e037fc
e3684ec
ae352bb
0943890
8d9b327
bb40655
c121694
9f150cb
65f5ee7
becdd66
8a3f38d
1d710f1
57bbdc2
66fb591
62d1b8d
5834ea9
e556425
492b2ef
021c98a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,7 +289,7 @@ private void read(BufferData data) throws IOException { | |
|
|
||
| private void prefetch(BufferData data, Instant taskQueuedStartTime) throws IOException { | ||
| synchronized (data) { | ||
| this.prefetchingStatistics.executorAcquired( | ||
| prefetchingStatistics.executorAcquired( | ||
| Duration.between(taskQueuedStartTime, Instant.now())); | ||
| this.readBlock( | ||
| data, | ||
|
|
@@ -328,7 +328,7 @@ private void readBlock(BufferData data, boolean isPrefetch, BufferData.State... | |
| } | ||
|
|
||
| if (isPrefetch) { | ||
| this.prefetchingStatistics.prefetchOperationStarted(); | ||
| prefetchingStatistics.prefetchOperationStarted(); | ||
|
||
| op = this.ops.prefetch(data.getBlockNumber()); | ||
| } else { | ||
| op = this.ops.getRead(data.getBlockNumber()); | ||
|
|
@@ -341,14 +341,16 @@ private void readBlock(BufferData data, boolean isPrefetch, BufferData.State... | |
| this.read(buffer, offset, size); | ||
| buffer.flip(); | ||
| data.setReady(expectedState); | ||
|
|
||
| if(isPrefetch) { | ||
|
||
| this.prefetchingStatistics.prefetchOperationCompleted(); | ||
| prefetchingStatistics.prefetchOperationCompleted(true); | ||
| } | ||
| } catch (Exception e) { | ||
| String message = String.format("error during readBlock(%s)", data.getBlockNumber()); | ||
| LOG.error(message, e); | ||
| this.numReadErrors.incrementAndGet(); | ||
| if(isPrefetch) { | ||
| prefetchingStatistics.prefetchOperationCompleted(false); | ||
| } | ||
| data.setDone(); | ||
| throw e; | ||
| } finally { | ||
|
|
@@ -446,7 +448,7 @@ public void requestCaching(BufferData data) { | |
|
|
||
| private void addToCacheAndRelease(BufferData data, Future<Void> blockFuture, | ||
| Instant taskQueuedStartTime) { | ||
| this.prefetchingStatistics.executorAcquired( | ||
| prefetchingStatistics.executorAcquired( | ||
| Duration.between(taskQueuedStartTime, Instant.now())); | ||
|
|
||
| if (this.closed) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed. every duration type you build for a store automatically gets .failures stats entries (count, min, mean, max), use StoreStatisticNames.SUFFIX_FAILURES if you want to see usages