> On 二月 19, 2016, 1:38 p.m., Guangya Liu wrote:
> > src/exec/exec.cpp, lines 698-699
> > <https://reviews.apache.org/r/43760/diff/1/?file=1259192#file1259192line698>
> >
> >     Since there is already a default value for `shutdownGracePeriod` here, 
> > what about just log warning message here and continue?
> >     
> >         Duration shutdownGracePeriod = EXECUTOR_SHUTDOWN_GRACE_PERIOD;
> >         value = os::getenv("MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD");
> >         if (value.isSome()) {
> >           Try<Duration> parse = Duration::parse(value.get());
> >           if (parse.isError()) {
> >             LOG(WARNING) << "Cannot parse MESOS_SHUTDOWN_GRACE_PERIOD '"
> >                          << value.get() << "': " << parse.error();
> >           }
> >     
> >           shutdownGracePeriod = parse.get();
> >         }

Sorry, I mean as following or similiar.

Duration shutdownGracePeriod = EXECUTOR_SHUTDOWN_GRACE_PERIOD;
value = os::getenv("MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD");
if (value.isSome()) {
  Try<Duration> parse = Duration::parse(value.get());
  if (parse.isError()) {
    LOG(WARNING) << "Cannot parse MESOS_SHUTDOWN_GRACE_PERIOD '"
                 << value.get() << "': " << parse.error();
  } else {
    shutdownGracePeriod = parse.get();
  }
}


- Guangya


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43760/#review119875
-----------------------------------------------------------


On 二月 19, 2016, 1:12 p.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43760/
> -----------------------------------------------------------
> 
> (Updated 二月 19, 2016, 1:12 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Ben Mahler.
> 
> 
> Bugs: MESOS-1571
>     https://issues.apache.org/jira/browse/MESOS-1571
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Executor shutdown grace period, which configured on the agent, is
> propagated to executors via the `MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD`
> environment variable. The executor library uses this timeout to delay
> the hard shutdown of the related executor.
> 
> 
> Diffs
> -----
> 
>   src/exec/exec.cpp 83dbee9dd2d9a4e7ebf395c8070bc7f9f8412ef1 
>   src/slave/containerizer/containerizer.cpp 
> 59904684cdeb17ef2b42092a3558802c42bfb6bd 
> 
> Diff: https://reviews.apache.org/r/43760/diff/
> 
> 
> Testing
> -------
> 
> The complete chain was tested. See https://reviews.apache.org/r/43764/ .
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to