Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleTime Saver

install_local_hadoop downloads Hadoop, HBase, Hive, and MySql jar files from the internet. To avoid this overhead, you can download the required files into a separate directory and set the environment variable MY_LOCAL_SW_DIST to point to this directory.

Usage

Default ports.

Port VariableDefault Value
MY_DCS_MASTER_PORT
23400
MY_DCS_MASTER_INFO_PORT
24400
MY_REST_SERVER_PORT
4200
MY_REST_SERVER_SECURE_PORT
4201

Command Options.

CommandWhat It Does
install_local_hadoop
Uses default ports for all services.
install_local_hadoop -p fromDisplay
Start Hadoop with a port number range determined from the DISPLAY environment variable.
install_local_hadoop -p rand
Start with any random port number range between 9000 and 49000.
install_local_hadoop -p <port >
Start with the specified port number.

Sample Procedure

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

Prerequisite

You need to ensure that you've set up passwordless authentication.

...

Code Block
languagetext
titleSetup passwordless ssh
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 

Usage

CommandWhat It Does
install_local_hadoop
Uses default ports for all services.
install_local_hadoop -p fromDisplay
Start Hadoop with a port number range determined from the DISPLAY environment variable.
install_local_hadoop -p rand
Start with any random port number range between 9000 and 49000.
install_local_hadoop -p <port >
Start with the specified port number.

Default ports.

Port VariableDefault Value
MY_DCS_MASTER_PORT
23400
MY_DCS_MASTER_INFO_PORT
24400
MY_REST_SERVER_PORT
4200
MY_REST_SERVER_SECURE_PORT
4201


Sample Procedure

 

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

Install the Hadoop software.

...

Six java servers and two mysqld processes should be running.

 

...

Manage Hadoop Environment 

Use the following commands to manage the Hadoop environment.

CommandUsage
swstartall
Start the complete Hadoop environment.
swstopall
Stops the complete Hadoop environment.
swstatus
Checks the status of the Hadoop environment.
swuninstall_local_hadoop

...

Removes the Hadoop installation.

...

...

Running Trafodion

This section describes how to start Trafodion and run operations. 

...

Each Time New Source is Downloaded

Start a new ssh session and set up environment:

...

.

Code Block
languagetext
cd <download directory>/apache-trafodion-1.3.0-incubating

...


source 

...

./env.sh

...


cd $MY_SQROOT/etc

...


# delete ms.env, if it exists

...


rm ms.env

...


cd $MY_SQROOT/sql/scripts

...


sqgen 

Start

...

Trafodion

...

Code Block
languagetext
cd $MY_SQROOT/sql/scripts

...


sqstart
sqcheck 

Management Scripts

script scriptFor serverFor server  
ComponentStartStopStatus
For all All of Trafodion
sqstart
sqstop
sqcheck
For DCS (Database Connectivity ServiceServices)dcsstart
dcstart
dcsstop
dcscheck
For REST serverServer
reststart
reststop
 
LOB Server
lobstart
lobstop
 
RMS Server
rmsstart
rmsstop
rmscheck

Create Trafodion Metadata

 

Checking the status of Trafodion and its components

There are several health check scripts that are available which will provide the status of Trafodion. They are :

sqcheck   (For all of Trafodion)
dcscheck  (For Database Connectivity Service)
rmscheck  (For RMS Server)

Create Trafodion metadata

 If you started a new ssh session, be sure to

...

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

Assumption: Trafodion is up and running, you can now start up a SQL command line  interface and initialize Trafodion

   sqlci 

Perform the following statements:

...

.

Use sqlci to create the Trafodion metadata.

Code Block
languagetext
$ sqlci
>> initialize trafodion;

...


.
.
.
>> exit

...

;
$

Validate Your Installation

You can use sqlci or trafci (connects via DCS) to validate your installation.

Code Block
languagesql
titlesqlci or trafci
get schemas;

Validate 

Test your setup by using "sqlci" or "trafci" (uses DCS to connect to the SQL engine):

...

create table table1 (a int);

...


invoke table1;

...


insert into table1 values (1), (2), (3), (4);

...


select * from table1;

...


exit;

You are done and ready to go!Assuming no errors, you're installation has been successful. You can start working on your modifications.