TEZ-4466: Measure exact stream read time while fetching - #530
Conversation
0120635 to
e459166
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e459166 to
4ad0480
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4ad0480 to
3bd8eaa
Compare
This comment was marked as outdated.
This comment was marked as outdated.
3bd8eaa to
d99959a
Compare
d99959a to
65ef7ac
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
This is ready @abstractdog from my end, requesting your eagle eye review. |
| this.badIdErrs = badIdErrsCounter; | ||
| this.connectionErrs = connectionErrsCounter; | ||
| this.wrongReduceErrs = wrongReduceErrsCounter; | ||
| this.ioTimeCounter = inputContext.getCounters().findCounter(TaskCounter.SHUFFLE_IO_TIME_MILLISECONDS); |
There was a problem hiding this comment.
1 thing to call out is even tez.runtime.shuffle.measure.io.time=false the counter will have SHUFFLE_IO_TIME_MILLISECONDS: 0 to prevent this the following is required or we can have it but might be misleading looking at the counter stats..
this.ioTimeCounter = conf.getBoolean(TezRuntimeConfiguration.TEZ_RUNTIME_SHUFFLE_MEASURE_IO_TIME,
TezRuntimeConfiguration.TEZ_RUNTIME_SHUFFLE_MEASURE_IO_TIME_DEFAULT) ?
inputContext.getCounters().findCounter(TaskCounter.SHUFFLE_IO_TIME_MILLISECONDS) : null;|
🎊 +1 overall
This message was automatically generated. |
abstractdog
left a comment
There was a problem hiding this comment.
looks very good so far @Aggarwal-Raghav , please find a few comments
| // Check if io time counter is updated | ||
| TezCounter ioTimeCounter = inputContext.getCounters().findCounter(TaskCounter.SHUFFLE_IO_TIME_MILLISECONDS); | ||
| long ioTime = ioTimeCounter.getValue(); | ||
| assertTrue(ioTime >= 10, "IO Time should be at least 10ms, but was " + ioTime); |
There was a problem hiding this comment.
10ms is a wild guess, even if it's working for 99% of the cases: I would use ioTime >= 0, because it already proves that the IO time was indeed measure
|
💔 -1 overall
This message was automatically generated. |
6b1f1f0 to
ecbfad8
Compare
|
💔 -1 overall
This message was automatically generated. |
ecbfad8 to
6b05939
Compare
| synchronized (cleanupLock) { | ||
| try { | ||
| if (httpConnection != null) { | ||
| if (input instanceof MeasuredDataInputStream && ioTimeCounter != null) { |
There was a problem hiding this comment.
nit: maybe evaluate "ioTimeCounter != null" first, looks more efficient than an instanceof check
also, is the instanceof check needed at all? by design, ioTimeCounter is non-null, if and only if measurement is enabled
There was a problem hiding this comment.
sure. the if statement will be like
if (ioTimeCounter != null && input != null) {
|
🎊 +1 overall
This message was automatically generated. |
abstractdog
left a comment
There was a problem hiding this comment.
nice, looks good to me, +1





Uh oh!
There was an error while loading. Please reload this page.