----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6322/#review9800 -----------------------------------------------------------
src/master/http.cpp <https://reviews.apache.org/r/6322/#comment20792> We use camelCase; the snake_case you see in the code is from protobuf. src/master/http.cpp <https://reviews.apache.org/r/6322/#comment20793> 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(); src/master/http.cpp <https://reviews.apache.org/r/6322/#comment20794> +1 (If there isn't a helper in stout, please add one!) third_party/libprocess/include/process/http.hpp <https://reviews.apache.org/r/6322/#comment20789> s/Redirect/TemporaryRedirect/ third_party/libprocess/include/process/http.hpp <https://reviews.apache.org/r/6322/#comment20790> s/dest_url/url/ - Benjamin Hindman On Aug. 2, 2012, 10:42 p.m., Ben Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/6322/ > ----------------------------------------------------------- > > (Updated Aug. 2, 2012, 10:42 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 > > Diff: https://reviews.apache.org/r/6322/diff/ > > > Testing > ------- > > Tested locally with 1 master. Will also test with multiple local masters. > > > Thanks, > > Ben Mahler > >
