Yes, you can use max createTime or max startTime. I wouldn¹t recommend to use max YARN container id.
Just keep in mind that if a container (say C1) in your list dies (for some reason), while you are running the shutdown process in another container (say C2) in your list, then the new replacement container (say C3) should be in your list, since it is the most recent now. -Gour On 3/24/16, 7:23 PM, "sunww" <[email protected]> wrote: >Hi > > I'm using Slider 0.80.0 with docker. Before containers stop, I want >to do some shutdown process in docker containers. > I also find MostRecentContainerReleaseSelector in version 0.80.0. > Can I use max Yarn Container ID or max createTime or max >startTime to get those containers? > >Thanks > >> Subject: Re: get containers before shrink >> From: [email protected] >> To: [email protected] >> Date: Thu, 24 Mar 2016 23:55:27 +0000 >> >> Which version of slider are you using? What do you intend to do in the >> containers before they are stopped? >> >> In the latest released version 0.90.2 (and few of the previous ones for >> sure), when you do a flex to shrink, by default it selects the most >>recent >> containers (MostRecentContainerReleaseSelector.java) for release. So if >> you know the container create/start times (slider status), you will know >> which ones will be stopped/released. >> >> You can write your own ContainerReleaseSelector and embed in the code >>and >> use it. It does not have a plugin support yet, but probably deems a >>JIRA. >> >> -Gour >> >> On 3/21/16, 7:44 PM, "sunww" <[email protected]> wrote: >> >> >Hi >> > I'm using "slider flex" command to shrink yarn cluster, and I want >> >to do something in containers before those containers stopped. >> > So Is there a way to get those containers which will be stopped. >> > >> >Thanks. >> >
