...
Tip | ||
---|---|---|
| ||
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 Variable | Default 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.
Command | What 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 | ||||
---|---|---|---|---|
| ||||
# 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 | ||||
---|---|---|---|---|
| ||||
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys |
Usage
Command | What 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 Variable | Default 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 | ||||
---|---|---|---|---|
| ||||
# 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.
Command | Usage |
---|---|
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
cd $MY_SQROOT/sql/scripts |
...
sqstart
sqcheck |
Management Scripts
Component | Start | scriptStop | scriptStatus | ||
---|---|---|---|---|---|
For all All of Trafodion | sqstart | sqstop | sqcheck | ||
For DCS (Database Connectivity ServiceServices) | dcsstartdcstart | dcsstop | dcscheck | ||
For REST serverServer | reststart | reststop | For | ||
LOB | serverServer | lobstart | lobstop | ||
RMS | serverServer | 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 | ||||
---|---|---|---|---|
| ||||
# 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 | ||
---|---|---|
| ||
$ sqlci >> initialize trafodion; |
...
. . . >> exit |
...
;
$ |
Validate Your Installation
You can use sqlci or trafci (connects via DCS) to validate your installation.
Code Block | ||||
---|---|---|---|---|
| ||||
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.