Repository: tajo Updated Branches: refs/heads/branch-0.11.0 c3c78fc21 -> 5c4df6cc9
TAJO-1134: start-tajo.sh should display WEB UI URL and TajoMaster RPC address Closes #758 Signed-off-by: Hyunsik Choi <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/5c4df6cc Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/5c4df6cc Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/5c4df6cc Branch: refs/heads/branch-0.11.0 Commit: 5c4df6cc95c0942e333cd133f3dcde6f5b8a6413 Parents: c3c78fc Author: YeonSu Han <[email protected]> Authored: Wed Sep 16 08:04:51 2015 -0700 Committer: Hyunsik Choi <[email protected]> Committed: Wed Sep 16 08:06:27 2015 -0700 ---------------------------------------------------------------------- CHANGES | 3 +++ tajo-dist/src/main/bin/start-tajo.sh | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/5c4df6cc/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 3a56b3d..e023d67 100644 --- a/CHANGES +++ b/CHANGES @@ -36,6 +36,9 @@ Release 0.11.0 - unreleased IMPROVEMENT + TAJO-1134: start-tajo.sh should display WEB UI URL and TajoMaster RPC + address. (Contributed YeonSu Han, committed by hyunsik) + TAJO-1340: Change the default output file format. (jinho) TAJO-1835: TajoClient::executeQueryAndGetResult should throw http://git-wip-us.apache.org/repos/asf/tajo/blob/5c4df6cc/tajo-dist/src/main/bin/start-tajo.sh ---------------------------------------------------------------------- diff --git a/tajo-dist/src/main/bin/start-tajo.sh b/tajo-dist/src/main/bin/start-tajo.sh index efc0371..ef816f3 100755 --- a/tajo-dist/src/main/bin/start-tajo.sh +++ b/tajo-dist/src/main/bin/start-tajo.sh @@ -50,3 +50,25 @@ if [ "$TAJO_PULLSERVER_STANDALONE" = "true" ]; then fi "$bin/tajo-daemons.sh" cd "$TAJO_HOME" \; "$bin/tajo-daemon.sh" start worker + +# Display WEB UI URL and TajoMaster RPC address. +# Getting configuration value of http address and rpc address. +HTTP_ADDRESS=$("$bin"/tajo getconf tajo.master.info-http.address) +RPC_ADDRESS=$("$bin"/tajo getconf tajo.master.client-rpc.address) +HTTP_ADDRESS=(${HTTP_ADDRESS//:/ }) +RPC_ADDRESS=(${RPC_ADDRESS//:/ }) + +if [ ${HTTP_ADDRESS[0]} = "0.0.0.0" ] || +[ ${HTTP_ADDRESS[0]} = "127.0.0.1" ] || +[ ${HTTP_ADDRESS[0]} = "localhost" ]; then + HTTP_ADDRESS[0]=`hostname` +fi + +if [ ${RPC_ADDRESS[0]} = "0.0.0.0" ] || +[ ${RPC_ADDRESS[0]} = "127.0.0.1" ] || +[ ${RPC_ADDRESS[0]} = "localhost" ]; then + RPC_ADDRESS[0]=`hostname` +fi + +echo "Tajo master web UI: http://${HTTP_ADDRESS[0]}:${HTTP_ADDRESS[1]}" +echo "Tajo Client Service: ${RPC_ADDRESS[0]}:${RPC_ADDRESS[1]}"
