You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2015/09/16 17:06:13 UTC
tajo git commit: TAJO-1134: start-tajo.sh should display WEB UI URL
and TajoMaster RPC address
Repository: tajo
Updated Branches:
refs/heads/master 8763d42b9 -> 9d59e06b1
TAJO-1134: start-tajo.sh should display WEB UI URL and TajoMaster RPC address
Closes #758
Signed-off-by: Hyunsik Choi <hy...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/9d59e06b
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/9d59e06b
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/9d59e06b
Branch: refs/heads/master
Commit: 9d59e06b185061ed2b116c00f9e51eff2d2af93e
Parents: 8763d42
Author: YeonSu Han <ha...@gmail.com>
Authored: Wed Sep 16 08:04:51 2015 -0700
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Wed Sep 16 08:05:53 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/9d59e06b/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 8773db5..6ba06d9 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/9d59e06b/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]}"