Return-Path: X-Original-To: apmail-tajo-commits-archive@minotaur.apache.org Delivered-To: apmail-tajo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0942A1732A for ; Mon, 9 Mar 2015 02:35:40 +0000 (UTC) Received: (qmail 91650 invoked by uid 500); 9 Mar 2015 02:35:35 -0000 Delivered-To: apmail-tajo-commits-archive@tajo.apache.org Received: (qmail 91550 invoked by uid 500); 9 Mar 2015 02:35:34 -0000 Mailing-List: contact commits-help@tajo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tajo.apache.org Delivered-To: mailing list commits@tajo.apache.org Received: (qmail 91176 invoked by uid 99); 9 Mar 2015 02:35:34 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 02:35:34 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 6E977AC073A for ; Mon, 9 Mar 2015 02:35:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1665114 [9/30] - in /tajo/site/docs: 0.10.0/ 0.10.0/_sources/ 0.10.0/_sources/backup_and_restore/ 0.10.0/_sources/configuration/ 0.10.0/_sources/functions/ 0.10.0/_sources/getting_started/ 0.10.0/_sources/index/ 0.10.0/_sources/partitionin... Date: Mon, 09 Mar 2015 02:35:30 -0000 To: commits@tajo.apache.org From: hyunsik@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150309023534.6E977AC073A@hades.apache.org> Added: tajo/site/docs/0.10.0/configuration/ha_configuration.html URL: http://svn.apache.org/viewvc/tajo/site/docs/0.10.0/configuration/ha_configuration.html?rev=1665114&view=auto ============================================================================== --- tajo/site/docs/0.10.0/configuration/ha_configuration.html (added) +++ tajo/site/docs/0.10.0/configuration/ha_configuration.html Mon Mar 9 02:35:26 2015 @@ -0,0 +1,372 @@ + + + + + + + + + + High Availability for TajoMaster — Apache Tajo 0.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +
+

High Availability for TajoMaster¶

+

TajoMaster is a Single Point of Failure in a Tajo Cluster because TajoMaster is the central controlling entity for all components of the Tajo system. TajoMaster failure prevents clients from submitting new queries to the cluster, and results in the disruption of the ability to run insert overwrite queries because the TajoWorker can’t apply its statistical information to CatalogStore. Therefore, the high-availability (HA) of TajoMaster is essential for the high-availability of Tajo generally.

+

Currently, TajoMaster HA provides the following elements:

+
    +
  • Automatic failover of TajoMaster: Even if the active TajoMaster stops, the standby TajoMaster will become the active node.
  • +
  • Preservation of the ongoing query in the cluster: Even if the active TajoMaster stops, the ongoing query will still complete in the cluster.
  • +
+
+

Terminology¶

+
    +
  • Active master: TajoMaster that is actively serving the all operation from TajoClient and TajoWorker.
  • +
  • Backup master: This TajoMaster waits becomes active when the Active dies or unhealthy. Users can setup multiple back TajoMaster, and this servers monitors the Active status to become active.
  • +
+
+
+

Configuration File Settings¶

+

If you want to use TajoMaster HA mode, specific your tajo.master.ha.enable as follows:

+
<property>
+  <name>tajo.master.ha.enable</name>
+  <value>true</value>
+</property>
+
+
+

If you use HA mode, all back masters monitor the active master at 5 second intervals. If you update this period, specific your tajo.master.ha.monitor.interval as follows:

+
<property>
+  <name>tajo.master.ha.monitor.interval</name>
+  <value>monitor interval</value>
+</property>
+
+
+
+
+

Backup Master Settings¶

+

If you want to run masters with start-tajo.sh, specific your masters in conf/masters. The file lists all host names of masters, one per line.By default, this file contains the single entry localhost. You can easily add host names of workers via your favorite text editor.

+

For example:

+
$ cat > conf/masters
+host1.domain.com
+host2.domain.com
+....
+
+<ctrl + d>
+
+
+

And then, you need to setup tarball and set configuration files on backup masters.

+
+

Note

+

If you want to run active master and backup master on the same host, you may find TajoMaster port conflicts. To avoid this problem, you must convert backup master primary ports to another port in tajo-site.xml as follows:

+
<property>
+  <name>tajo.master.umbilical-rpc.address</name>
+  <value>localhost:36001</value>
+  <description>The default port is 26001.</description>
+</property>
+
+<property>
+  <name>tajo.master.client-rpc.address</name>
+  <value>localhost:36002</value>
+  <description>The default port is 26002.</description>
+</property>
+
+<property>
+  <name>tajo.resource-tracker.rpc.address</name>
+  <value>localhost:36003</value>
+  <description>The default port is 26003.</description>
+  </property>
+
+<property>
+  <name>tajo.catalog.client-rpc.address</name>
+  <value>localhost:36005</value>
+  <description>The default port is 26005.</description>
+</property>
+
+<property>
+  <name>tajo.master.info-http.address</name>
+  <value>0.0.0.0:36080</value>
+  <description>The default port is 26080.</description>
+</property>
+
+
+

And you need to convert TAJO_PID_DIR to another directory in tajo-env.sh.

+
+
+
+

Launch a Tajo cluster¶

+

Then, execute start-tajo.sh

+
$ $TAJO_HOME/bin/start-tajo.sh
+
+
+
+

Note

+

You can’t use HA mode in DerbyStore. Currently, just one TajoMaster invoke the derby. If another master try to invoke it, it never run itself. Also, if you set another catalog uri for backup master, it is a incorrect configuration. Because they are unequal in every way.

+
+
+
+

Administration HA state¶

+

If you want to transit any backup master to active master, execute tajo hadmin -transitionToActive

+
$ $TAJO_HOME/bin/tajo haadmin -transitionToActive <target tajo.master.umbilical-rpc.address>
+
+
+

If you want to transit any active master to backup master, execute tajo hadmin -transitionToBackup

+
$ $TAJO_HOME/bin/tajo haadmin -transitionToBackup <target tajo.master.umbilical-rpc.address>
+
+
+

If you want to find the state of any master, execute tajo hadmin -getState

+
$ $TAJO_HOME/bin/tajo haadmin -getState <target tajo.master.umbilical-rpc.address>
+
+
+

If you want to initiate HA information, execute tajo haadmin -formatHA

+
$ $TAJO_HOME/bin/tajo haadmin -formatHA
+
+
+
+

Note

+

Before format HA, you must shutdown the Tajo cluster.

+
+
+
+

How to Test Automatic Failover¶

+

If you want to verify automatic failover of TajoMaster, you must deploy your Tajo cluster with TajoMaster HA enable. And then, you need to find which node is active from Tajo web UI.

+

Once you find your active TajoMaster, you can cause a failure on that node. For example, you can use kill -9 <pid of TajoMaster> to simulate a JVM crash. Or you can shutdown the machine or disconnect network interface. And then, the backup TajoMaster will be automatically active within 5 seconds. The amount of time required to detect a failure and trigger a failover depends on the config tajo.master.ha.monitor.interval. If there is running queries, it will be finished successfully. Because your TajoClient will get the result data on TajoWorker. But you can’t find already query history. Because TajoMaster stores query history on memory. So, the other master can’t access already active master query history. And if there is no running query, the automatic failover run successfully.

+
+

Note

+

TajoMaster HA does not consider TajoWorker failure. It guarantees the high availability of both TajoResourceManager and QueryMaster.

+
+
+
+ + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: tajo/site/docs/0.10.0/configuration/preliminary.html URL: http://svn.apache.org/viewvc/tajo/site/docs/0.10.0/configuration/preliminary.html?rev=1665114&view=auto ============================================================================== --- tajo/site/docs/0.10.0/configuration/preliminary.html (added) +++ tajo/site/docs/0.10.0/configuration/preliminary.html Mon Mar 9 02:35:26 2015 @@ -0,0 +1,277 @@ + + + + + + + + + + Preliminary — Apache Tajo 0.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +
+

Preliminary¶

+
+

catalog-site.xml and tajo-site.xml¶

+

Tajo’s configuration is based on Hadoop’s configuration system. Tajo uses two config files:

+
    +
  • catalog-site.xml - configuration for the catalog server.
  • +
  • tajo-site.xml - configuration for other tajo modules.
  • +
+

Each config consists of a pair of a name and a value. If you want to set the config name a.b.c with the value 123, add the following element to an appropriate file.

+
<property>
+  <name>a.b.c</name>
+  <value>123</value>
+</property>
+
+
+

Tajo has a variety of internal configs. If you don’t set some config explicitly, the default config will be used for for that config. Tajo is designed to use only a few of configs in usual cases. You may not be concerned with the configuration.

+

In default, there is no tajo-site.xml in ${TAJO}/conf directory. If you set some configs, first copy $TAJO_HOME/conf/tajo-site.xml.templete to tajo-site.xml. Then, add the configs to your tajo-site.

+
+
+

tajo-env.sh¶

+

tajo-env.sh is a shell script file. The main purpose of this file is to set shell environment variables for TajoMaster and TajoWorker java program. So, you can set some variable as follows:

+
VARIABLE=value
+
+
+

If a value is a literal string, type this as follows:

+
VARIABLE='value'
+
+
+
+
+ + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: tajo/site/docs/0.10.0/configuration/service_config_default.html URL: http://svn.apache.org/viewvc/tajo/site/docs/0.10.0/configuration/service_config_default.html?rev=1665114&view=auto ============================================================================== --- tajo/site/docs/0.10.0/configuration/service_config_default.html (added) +++ tajo/site/docs/0.10.0/configuration/service_config_default.html Mon Mar 9 02:35:26 2015 @@ -0,0 +1,315 @@ + + + + + + + + + + Cluster Service Configuration Defaults — Apache Tajo 0.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +
+

Cluster Service Configuration Defaults¶

+
+

Tajo Master Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Master Umbilical Rpctajo.master.umbilical-rpc.address localhost:26001
Tajo Master Client Rpctajo.master.client-rpc.address localhost:26002
Tajo Master Info Httptajo.master.info-http.address 0.0.0.0:26080
Tajo Resource Tracker Rpctajo.resource-tracker.rpc.address localhost:26003
Tajo Catalog Client Rpctajo.catalog.client-rpc.address localhost:26005
+
+

Tajo Worker Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Worker Peer Rpctajo.worker.peer-rpc.address 0.0.0.0:28091
Tajo Worker Client Rpctajo.worker.client-rpc.address 0.0.0.0:28092
Tajo Worker Info Httptajo.worker.info-http.address 0.0.0.0:28080
+
+
+
+ + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: tajo/site/docs/0.10.0/configuration/service_config_defaults.html URL: http://svn.apache.org/viewvc/tajo/site/docs/0.10.0/configuration/service_config_defaults.html?rev=1665114&view=auto ============================================================================== --- tajo/site/docs/0.10.0/configuration/service_config_defaults.html (added) +++ tajo/site/docs/0.10.0/configuration/service_config_defaults.html Mon Mar 9 02:35:26 2015 @@ -0,0 +1,343 @@ + + + + + + + + + + Cluster Service Configuration Defaults — Apache Tajo 0.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +
+

Cluster Service Configuration Defaults¶

+
+

Tajo Master Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Master Umbilical Rpctajo.master.umbilical-rpc.address localhost:26001
Tajo Master Client Rpctajo.master.client-rpc.address localhost:26002
Tajo Master Info Httptajo.master.info-http.address 0.0.0.0:26080
Tajo Resource Tracker Rpctajo.resource-tracker.rpc.address localhost:26003
Tajo Catalog Client Rpctajo.catalog.client-rpc.address localhost:26005
+
+

Tajo Worker Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Worker Peer Rpctajo.worker.peer-rpc.address 0.0.0.0:28091
Tajo Worker Client Rpctajo.worker.client-rpc.address 0.0.0.0:28092
Tajo Worker Info Httptajo.worker.info-http.address 0.0.0.0:28080
+
+
+
+ + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Added: tajo/site/docs/0.10.0/configuration/service_configuration_defaults.html URL: http://svn.apache.org/viewvc/tajo/site/docs/0.10.0/configuration/service_configuration_defaults.html?rev=1665114&view=auto ============================================================================== --- tajo/site/docs/0.10.0/configuration/service_configuration_defaults.html (added) +++ tajo/site/docs/0.10.0/configuration/service_configuration_defaults.html Mon Mar 9 02:35:26 2015 @@ -0,0 +1,315 @@ + + + + + + + + + + Cluster Service Configuration Defaults — Apache Tajo 0.8.0 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+
+ +
+
+
+ +
+

Cluster Service Configuration Defaults¶

+
+

Tajo Master Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Master Umbilical Rpctajo.master.umbilical-rpc.address localhost:26001
Tajo Master Client Rpctajo.master.client-rpc.address localhost:26002
Tajo Master Info Httptajo.master.info-http.address 0.0.0.0:26080
Tajo Resource Tracker Rpctajo.resource-tracker.rpc.address localhost:26003
Tajo Catalog Client Rpctajo.catalog.client-rpc.address localhost:26005
+
+

Tajo Worker Configuration Defaults¶

+ ++++++ + + + + + + + + + + + + + + + + + + + + + + + + +
Service NameConfig Property NameDescriptiondefault address
Tajo Worker Peer Rpctajo.worker.peer-rpc.address 0.0.0.0:28091
Tajo Worker Client Rpctajo.worker.client-rpc.address 0.0.0.0:28092
Tajo Worker Info Httptajo.worker.info-http.address 0.0.0.0:28080
+
+
+
+ + +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file