Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgray
borderWidth1
borderStylesolid

Describes the steps required to build and run Apache Trafodion.

Table of Contents

 

...

Supported Platforms

  • Red Hat or Centos 6.x (6.4 or later) versions are supported as development and production platforms.

...

Ensure that the Java environment exists and points to your JDK installation.  By default Java is located in /usr/lib/java-<version>
Code Block
languagebash
$ echo $JAVA_HOME
 
$ which java
/usr/bin/java
$ export JAVA_HOME=/usr/bin
$/jvm/java-1.7.0-openjdk.x86_64
Note
You should export JAVA_HOME in your .bashrc or .profile file.

Setup Passwordless SSH 

You need to be able to ssh to localhost without having to specify a password. The method used to set up passwordless SSH keys depends on whether you're downloading the Trafodion source directly using hub clone.

If You're Using Hub Clone

Check to see if you have passwordless SSH setup.

Code Block
languagetext
titlepasswordless ssh setup correctly
ssh localhost
Last login: Fri Nov  6 22:44:00 2015 from 192.168.1.9

If passwordless SSH is not setup, please do so now.  The following is an example of setting up passwordless SSH using id_rsa keys.  You can choose the method that best represents your environment.

If You've set up your ssh keys using the method described in https://github.com/settings/ssh, which means that you already have an existing set of ssh keys. Simply copy both the id_rsa and .pub and id_rsa.pub to the your ~/.ssh directory.

Then, do the following:

Code Block
languagetext
titleModify the ssh Environment
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa.pub
echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config
chmod go-w ~/.ssh/config

If You Downloaded and Unpacked the SourceEnsure that you've set up passwordless authentication.you need to create your keys first, then do the following:

Code Block
languagetext
titleSetup passwordless ssh Not Correctly Setup
ssh localhost
gtapper@localhost's password:
Last login: Fri Nov  6 22:44:00 2015 from 192.168.1.9

If you see the above, then setup passwordless ssh doing the following:

Code Block
languagetext
titleSetup passwordless ssh
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa.pub
echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config
chmod go-w ~/.ssh/config

Verify Trafodion Download

Verify that the Trafodion source has been either:

  • Downloaded and unpackaged.
  • Cloned from github.

If not, please do so now. Refer to Contributor Workflow - Code/Docs.

Install Required Build Tools

Refer to  Required Build Tools for instructions.

Verify System Limits

-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa.pub
echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config
chmod go-w ~/.ssh/config

Verify Trafodion Download

Verify that the Trafodion source has been either:

  • Downloaded and unpackaged.
  • Cloned from github.

If not, please do so now.

To download from github, refer to Contributor Workflow - Code/Docs.
Otherwise downloaded and untar the source tar file from Apache Trafodion Incubator release.

Install Required Build Tools

Refer to  Required Build Tools for instructions.

Verify System Limits

Please check that the system limits in your environment are appropriate for Apache Trafodion. If they are not, then you will need to increase the limits Please check that the system limits in your environment are appropriate for Apache Trafodion. If they are not, then you will need to increase the limits or Trafodion cannot start.

...

Please refer to this article for information on how you change system limits.

Build Trafodion

Start

...

a

...

new

...

ssh

...

session.

...

Use

...

the

...

following

...

commands

...

to

...

set

...

up

...

the

...

Trafodion

...

environmental

...

variables.

The <Trafodion source directory> is source tree base for Trafodion.
The <tools installation directory> is where Trafodion required tools are located. 

 
Code Block
languagetext
cd <download<Trafodion source directory>/incubator-trafodion
export TOOLSDIR=<tools installation directory>
source ./env.sh
 

...

Code Block
languagetext
titleVerify Build
$ sqvers -u
MY_SQROOT=/home/gtappercentos/incubatorapache-trafodion-1.3.0-incubating/core/sqf
who@host=gtapper@box01centos@mysystem
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91.x86_64
SQ_MBTYPE=64d (64-debug)
linux=2.6.32-504.1.3.el6.x86_64
redhat=6.67
NO patches
Most common Apache_Trafodion Release 21.03.0 (Build debug [gtappercentos], branch 392b99b-trafweb, date 06Nov15)
UTT count is 1
[87]     Release 21.03.0 (Build debug [gtappercentos], branch 392b99b-trafweb, date 06Nov15)
          export/lib/hbase-trx-cdh5_3-21.03.0.jar
          export/lib/hbase-trx-hbase_98_4-21.03.0.jar
          export/lib/hbase-trx-hdp2_2-21.03.0.jar
          export/lib/hbase-trx-mapr4_0-21.03.0.jar
          export/lib/sqmanvers.jar
          export/lib/trafodion-dtm-21.03.0.jar
          export/lib/trafodion-sql-21.03.0.jar
          export/lib/trafodion-utility-2.0.0.jar
$

The output should show that eight several jar files exist.  The number of files differs based on the version of Trafodion you downloaded.

 

Setup Test Environment

You should test your installation using:

  • A local Hadoop environment
  • Trafodion installation

You're Your installation approach depends on whether you already have installed Hadoop.

...

Code Block
languagetext
titleBuild Binary Files
cd <download<Trafodion source directory>/incubator-trafodion
make package

The binary tar files will be created in <download <Trafodion source directory>/incubator-trafodion/distribution directory. 

Install a Local Hadoop Environment

...

Code Block
languagetext
titleIf Starting a New ssh Session
# Ensure that the Trafodion environmental variables have been loaded.
cd <download<Trafodion source directory>/incubator-trafodion
source ./env.sh

Install the Hadoop software.

...

Code Block
languagetext
$ swstatus
56 java servers and 2 mysqld processes are running
713   NameNode
19513 HMaster
1003  SecondaryNameNode
838   DataNode
1173  ResourceManager
1298  NodeManager
$ 

Five Six java servers as shown above and two mysqld processes should be running.

...

You need to do the following each time you download new source code.

Code Block
languagetext
cd <Trafodion <downloadsource directory>/incubator-trafodion
source ./env.sh
cd $MY_SQROOT/etc
# delete ms.env, if it exists
rm ms.env
cd $MY_SQROOT/sql/scripts
sqgen 

...

Code Block
languagetext
titleIf Starting a New ssh Session
# Ensure that the Trafodion environmental variables have been loaded.
cd <download<Trafodion source directory>/incubator-trafodion
source ./env.sh

Assumption: Trafodion is up and running.

...

Code Block
languagesql
titlesqlci or trafci
get schemas;
create table table1 (a int);
invoke table1;
insert into table1 values (1), (2), (3), (4);
select * from table1;
exit;

Assuming no errors, you're installation has been successful. You can start working on your modifications.

...

;

Assuming no errors, your installation has been successful. You can start working on your modifications.

 

Note

If you are not able to start up the environment or if there are problems running sqlci or trafci, then verify that the all the processes are up and running. swstatus should show at 6 java servers and 2 mysql processes. sqcheck should indicate all processes are running. If processes are not running as expected, please stop Trafodion by running sqstop, stop the Hadoop processes by running swstopall, then restart by running swstartall and sqstart. Sometimes Trafodion processes do not terminate cleanly, you can run ckillall to quickly terminate all Trafodion processes. If problems persist please review logs:

Hadoop, HBase, and Hive logs are located in $MY_SQROOT/sql/local_hadoop/*/logs
  SQL logs are located in $MY_SQROOT/logs.