[ https://issues.apache.org/jira/browse/YARN-4526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075829#comment-15075829 ]
Karthik Kambatla commented on YARN-4526: ---------------------------------------- bq. YARN-4403 introduced MonotonicClock and its available in util. So could we use that instead of SystemClock itself in ControlledClock It might very well be the right thing to do, but we should probably do that in another JIRA so it gets enough visibility. Different classes that use SystemClock use it differently. While some take a Clock as an argument in the constructor (there are other constructors that don't take a lock also for some), others just set the clock to SystemClock by default and provide an additional setClock method for tests to use. Updating all these cases is likely too much work to fit in one JIRA, and also might turn out to be a cleanup creep. > Make SystemClock singleton so AppSchedulingInfo could use it > ------------------------------------------------------------ > > Key: YARN-4526 > URL: https://issues.apache.org/jira/browse/YARN-4526 > Project: Hadoop YARN > Issue Type: Sub-task > Components: scheduler > Affects Versions: 2.8.0 > Reporter: Karthik Kambatla > Assignee: Karthik Kambatla > Attachments: yarn-4526-1.patch > > > To track the time a request is received, we need to get current system time. > For better testability of this, we are likely better off using a Clock > instance that uses SystemClock by default. Instead of creating umpteen > instances of SystemClock, we should just reuse the same instance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)