Repository: incubator-impala Updated Branches: refs/heads/master 2f0a8851b -> 3fbd9c338
IMPALA-3521: Impalad should communicate with the statestore after binding to the hs2 and besswax ports Impalad on startup tries to connect with the statestore first and then tries to open the beeswax and the hs2 ports. If the ports are already bound to an another process, impalad will abort and statestore would still mark this impalad as up. This patch changes the sequence in which we perform these operations so that statestore is started after opening the network ports. Any failures while starting the hs2 and beeswax services should not result in false statestore membership updates. Change-Id: I5c09dafa5475978424e63bc936c0cdf4940df8d7 Reviewed-on: http://gerrit.cloudera.org:8080/3264 Reviewed-by: anujphadke <[email protected]> Tested-by: Internal Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/3fbd9c33 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/3fbd9c33 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/3fbd9c33 Branch: refs/heads/master Commit: 3fbd9c3380d060c07cea3efa5a20fc81616516b1 Parents: 2f0a885 Author: Anuj Phadke <[email protected]> Authored: Tue May 31 23:12:56 2016 -0700 Committer: Tim Armstrong <[email protected]> Committed: Tue Jul 19 20:29:54 2016 -0700 ---------------------------------------------------------------------- be/src/service/impalad-main.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/3fbd9c33/be/src/service/impalad-main.cc ---------------------------------------------------------------------- diff --git a/be/src/service/impalad-main.cc b/be/src/service/impalad-main.cc index db5284d..2e2ad5a 100644 --- a/be/src/service/impalad-main.cc +++ b/be/src/service/impalad-main.cc @@ -77,6 +77,8 @@ int ImpaladMain(int argc, char** argv) { ABORT_IF_ERROR(be_server->Start()); + ABORT_IF_ERROR(beeswax_server->Start()); + ABORT_IF_ERROR(hs2_server->Start()); Status status = exec_env.StartServices(); if (!status.ok()) { LOG(ERROR) << "Impalad services did not start correctly, exiting. Error: " @@ -84,12 +86,9 @@ int ImpaladMain(int argc, char** argv) { ShutdownLogging(); exit(1); } - - // this blocks until the beeswax and hs2 servers terminate - ABORT_IF_ERROR(beeswax_server->Start()); - ABORT_IF_ERROR(hs2_server->Start()); ImpaladMetrics::IMPALA_SERVER_READY->set_value(true); LOG(INFO) << "Impala has started."; + // this blocks until the beeswax and hs2 servers terminate beeswax_server->Join(); hs2_server->Join();
