You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Ranjan Banerjee <rb...@wisc.edu> on 2012/04/07 22:47:38 UTC

what does mackmode signify

Hello, 
   I am going through the code for the fair scheduler in order to make some changes in it. I came across a variable called mockmode. Can someone say what does it signify?

Regards,
Ranjan

Re: what does mackmode signify

Posted by Ranjan Banerjee <rb...@wisc.edu>.
Thanks Harsh J.

On 04/07/12, Harsh J   wrote:
> It is a toggle property for unit tests to enable, in order to disable
> a few things due to which unit testing can get easy. Basically appears
> like the allocations updater thread isn't invoked during testing, if
> mockMode is enabled.
> 
> Also see TestFairScheduler.java, in which the mockMode is enabled via
> "scheduler = new FairScheduler(clock, true);" for the scheduler object
> the test uses. In real use, this mode is never entered into.
> 
> P.s. Since you mentioned you're changing a few things, you also ought
> to know that FairScheduler is being ported over to Hadoop 2.x
> currently. See https://issues.apache.org/jira/browse/MAPREDUCE-3451
> for more.
> 
> On Sun, Apr 8, 2012 at 2:17 AM, Ranjan Banerjee <rb...@wisc.edu> wrote:
> > Hello,
> >    I am going through the code for the fair scheduler in order to make some changes in it. I came across a variable called mockmode. Can someone say what does it signify?
> >
> > Regards,
> > Ranjan
> 
> 
> 
> -- 
> Harsh J


Re: what does mackmode signify

Posted by Harsh J <ha...@cloudera.com>.
It is a toggle property for unit tests to enable, in order to disable
a few things due to which unit testing can get easy. Basically appears
like the allocations updater thread isn't invoked during testing, if
mockMode is enabled.

Also see TestFairScheduler.java, in which the mockMode is enabled via
"scheduler = new FairScheduler(clock, true);" for the scheduler object
the test uses. In real use, this mode is never entered into.

P.s. Since you mentioned you're changing a few things, you also ought
to know that FairScheduler is being ported over to Hadoop 2.x
currently. See https://issues.apache.org/jira/browse/MAPREDUCE-3451
for more.

On Sun, Apr 8, 2012 at 2:17 AM, Ranjan Banerjee <rb...@wisc.edu> wrote:
> Hello,
>    I am going through the code for the fair scheduler in order to make some changes in it. I came across a variable called mockmode. Can someone say what does it signify?
>
> Regards,
> Ranjan



-- 
Harsh J