Closed athlum closed 8 years ago
@athlum You can try to write
once := sync.Once{} for _, offid := range selectedOffMap { once.Do(func() { OfferWithOperations(offid, taskinfo1) }) OfferWithOperations(offid) }
@jdef I think this is bad
Thanks for the feedback!! Sounds like the convenience funcs aren't that convenient for your use case.
That said, is anything stopping you from manually constructing the Call the way that you need it? All the requisite protos are publicly exposed.
On Tue, Jun 14, 2016 at 7:44 AM, wangwei notifications@github.com wrote:
@athlum https://github.com/athlum You can try to write
once := sync.Once{} for _, offid := range selectedOffMap { once.Do(func() { OfferWithOperations(offid, taskinfo1) }) OfferWithOperations(offid) }
@jdef https://github.com/jdef I think this is bad
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mesos/mesos-go/issues/249#issuecomment-225856694, or mute the thread https://github.com/notifications/unsubscribe/ACPVLEEgBwavFh7tl47qL-KJQ8JASqxoks5qLpQRgaJpZM4I1Loo .
thoughts re: #250?
Thanks jdef, that's cool.
I wrote a mesos framework for mesos 0.25.0 on mesos-go master branch. Now I'm trying use the
next
branch for mesos 0.28.0 because of v1 Scheduler HTTP API.On mesos 0.25.0, when you kill a running task, mesos master will offer the resource used by that task immediately. If my scheduler is holding the resource with the same slaveId, then I have two offers with one slaveId now (in different offerId). With method
AcceptOffers
(in master branch), I can request reserve/launch operations with these two offer to avoid resource fragments or let the big task (require the resources more than any of those two offers) go.In the
next
branch, I find there is a methodOfferWithOperations
that allow me to request operations on only one offerId. BTW, I findacceptBuilder
support request operations array with offer array. Is there an other way for me to request operations on the offerId array that with the same slaveId? Or is there anything I can do.Thx.