...
If you haven’t done so already, then download the Trafodion source tree. Refer to the Source Download instructions in the How-To chapter.
Set Up Environmental Variables
Use the following commands to set up the Trafodion environmental variables.
Info |
---|
|
You should have set up the TOOLSDIR environment variable in your .bashrc or .profile already. as part of installing the Trafodion build tools. If you have not, please do so now. Refer to Install Required Build Tools. If you need to over-ride a value set in the core/sqf/sqenvcom.sh file, you may set the variables in ~/.trafodion. See core/sqf/LocalSettingsTemplate.sh file for more info. |
Trafodion can be built in one of two flavors, debug or release. The default flavor is debug.
Code Block |
---|
language | bash |
---|
title | Set Default (Debug) Environment |
---|
|
cd <Trafodion source directory>
source ./env.sh |
Code Block |
---|
language | bash |
---|
title | Set Release Build Environment |
---|
|
cd <Trafodion source directory>/core/sqf
source ./sqenvr.sh
cd ../.. |
Info |
---|
|
Test to make sure environment variables are set afterwards. |
Example
Code Block |
---|
language | bash |
---|
title | Set Up Environmental Variables |
---|
|
$ cd mysource/incubator-trafodion
$ source ./env.sh
If you are ready to build Trafodion, perform one of the following options:
make all (Build Trafodion, DCS, and REST) OR
make package (Build Trafodion, DCS, REST, and Client drivers) OR
make package-all (Build Trafodion, DCS, REST, Client drivers, and Tests)
If Trafodion has been built and you want test:
Execute the install_local_hadoop script which performs a single node
install using a popular Hadoop distribution
cd /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/sql/scripts
install_local_hadoop [-p <port option>]
install_traf_components
configure Trafodion and start the processes
HAVE FUN!
You can also choose to install_local_hadoop before building Trafodion.
$ env | grep LLVM
LLVM=/root/trafodion-build-tools/dest-llvm-3.2 |
Anchor |
---|
| build-source-build-trafodion-components |
---|
| build-source-build-trafodion-components |
---|
|
Build Trafodion Components
All make options sets up your environment to run a debug version of the Trafodion server-side code on the server where you are building the code. This is refereed to as "Trafodion" in the table below.
Info |
---|
You use the generated tar files in case you want to install Trafodion on a different development environment. (To be documented later.) |
Command | What It Builds |
---|
make all | Trafodion, DCS, and REST. |
make package | Trafodion, DCS, REST, and Client Drivers. It does not build RPMs which are needed for an Ambri Ambari install |
make package-all | Trafodion, DCS, REST, Client Drivers, RPMs and tests for all components. This builds the complete set of binaries needed. |
Info |
---|
|
If the build fails, you might want to rerun the make step. Trafodion downloads many dependencies and sometimes one of the download operations fail. Rerunning the build generally works. If the build continues to fail after a few tries, then rerun the make with the -j 1 option to run the build in non-parallel mode, which makes it easier to locate errors. |
Anchor |
---|
| build-make-all |
---|
| build-make-all |
---|
|
make all
...