[DRAFT] TEZ-4505: Create counters about time intervals spent in certain states in StateMachineTez#304
[DRAFT] TEZ-4505: Create counters about time intervals spent in certain states in StateMachineTez#304abstractdog wants to merge 1 commit intoapache:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
…s in StateMachineTez
|
💔 -1 overall
This message was automatically generated. |
ayushtkn
left a comment
There was a problem hiding this comment.
Sounds cool to me, I think you need to add some test around it as well
|
|
||
| private boolean isStateIntervalMonitorEnabled = false; | ||
| private long lastStateChangedTime = Time.monotonicNow(); | ||
| private Map<String, Long> intervalSpentInStatesMs = new HashMap<>(); |
| private final StateMachine<STATE, EVENTTYPE, EVENT> realStatemachine; | ||
|
|
||
| private boolean isStateIntervalMonitorEnabled = false; | ||
| private long lastStateChangedTime = Time.monotonicNow(); |
There was a problem hiding this comment.
shouldn't this be set as part of enableStateIntervalMonitor?
| } | ||
| } | ||
|
|
||
| private void maybeMergeAllTaskAttemptCounters(TezCounters taskCounters) { |
There was a problem hiding this comment.
nit
I think we can ditch maybe from the name & just have mergeAllTaskAttemptCounters(, if stateIntervalMontior is enabled it does merge always
| */ | ||
| package org.apache.tez.common.counters; | ||
|
|
||
| public class TaskAttemptCounter { |
There was a problem hiding this comment.
I couldn't decode the usage of this 'empty' class, we are only using the name of this class, if only name is required can't we have a string constant or an enum
There was a problem hiding this comment.
this is just a leftover, actually I'm in the middle of this, full of bugs, let me set this PR to [DRAFT]
No description provided.