> On Aug. 3, 2012, 1:39 a.m., Benjamin Hindman wrote: > > src/master/http.cpp, line 209 > > <https://reviews.apache.org/r/6322/diff/1/?file=133621#file133621line209> > > > > How about instead: > > > > UPID pid = master.leader != UPID() ? master.leader : master.self(); > > > > Then pid.ip and pid.port are easily accessible (no need for local > > variables). This will also lend itself nicely to when we change > > master.leader to an option: > > > > UPID pid = master.leader.isSome() ? master.leader.get() : master.self();
ah, didn't notice that self() function - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6322/#review9800 ----------------------------------------------------------- On Aug. 3, 2012, 6:22 p.m., Ben Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/6322/ > ----------------------------------------------------------- > > (Updated Aug. 3, 2012, 6:22 p.m.) > > > Review request for mesos, Benjamin Hindman and Vinod Kone. > > > Description > ------- > > This adds a /master/redirect URL that redirects to the current leader. > > > Diffs > ----- > > src/master/http.hpp 2aeb442 > src/master/http.cpp 49ccf39 > src/master/master.hpp d02fbeb > src/master/master.cpp b0507c5 > third_party/libprocess/include/process/http.hpp a10146f > third_party/libprocess/include/stout/net.hpp 8ce0b14 > > Diff: https://reviews.apache.org/r/6322/diff/ > > > Testing > ------- > > Tested locally with 1 master. Will also test with multiple local masters. > > > Thanks, > > Ben Mahler > >
