Versions Compared

Key

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



Excerpt

Contains how-to information referenced from other chapters in this guide.


...

Table of Contents
maxLevel4
indent20px

...

Code Block
languagebash
# Move to the directory where you want to install the Trafodion source code.
cd mysource

# Clone the Trafodion source code
git clone git://gitgithub.com/apache.org/incubator-trafodion.git

# Change to the source-tree directory
cd incubator-trafodion
 
# Register your fork as a remote branch
git remote add <your-github-id>_fork git@github.com:<your-github-id>/incubator-trafodion


Code Block
languagebash
titleExample: Clone Repository
# Move to the directory where you want to install the Trafodion source code.
cd mysource

# Clone the Trafodion source code
git clone git://gitgithub.com/apache.org/incubator-trafodion.git

# Register your fork as a remote branch
cd incubator-trafodion
git remote add trafdeveloper_fork git@github.com:trafdeveloper/incubator-trafodion

Create Task Branch

...

Code Block
languagebash
titleExample: Create Task Branch
# Ensure that you have the latest changes
git fetch --all

# Checkout source
git checkout -b TRAFODION-1507 origin/master

Merge Changes

Merge changes from the master branch using the following commands:

Code Block
languagetext
titleMerge Changes
git fetch origin ; git merge origin/master

 

Commit Changes

Do the following:

...

Code Block
languagebash
titleExample: Checkout Code
git checkout TRAFODION-1507

  Anchorhow-to-build-tools-manual-installhow-to-build-tools-manual-install

Build Tools Manual Install

In the sections below, the <tool installation directory> is the directory where you want the tool to be installed.

BISON

 

  • Tested Version: 3.0
  • Downloadhttp://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz (http://ftp.gnu.org/gnu/bison/)
  • Considerations: Refer to the bison INSTALL file for detailed instructions.
  • Determine Bison Version:

    Code Block
    languagebash
    which bison
    bison --version

     

    • If the version is older than 3.0, then do the following:

      Code Block
      languagebash
      tar -xzf bison-3.0.tar.gz
      cd bison-3.0
      ./configure --prefix=<tool installation directory>/bison_3_linux
      make
      make check
      make install

      The make check step may return errors like the following that can be ignored.

      Code Block
      languagebash
      make[3]: Entering directory `<mydir>/bison-3.0'
        YACC     examples/calc++/calc++-parser.stamp
        CXX      examples/calc++/examples_calc___calc__-calc++-driver.o
        LEX      examples/calc++/calc++-scanner.cc
        CXX      examples/calc++/examples_calc___calc__-calc++-scanner.o
        g++: ./examples/calc++/calc++-scanner.cc: No such file or directory
        g++: no input file

      Adjust your PATH to ensure that the correct version is chosen. Rerun the bison --version to verify.

ICU

 

  • Tested Version: 4.4.0
  • Downloadhttp://download.icu-project.org/files/icu4c/4.4/icu4c-4_4-src.tgz (http://site.icu-project.org/download)
  • Install:

    Code Block
    languagebash
    tar -xzf icu4c-4_4-src.tgz
    cd icu/source
    ./runConfigureICU Linux --with-library-suffix=Nv44 --prefix=<tool installation directory>/icu4.4/linux64
    make && make check
    make install

    The following make check errors can be ignored.

    Code Block
    languagebash
    [All tests passed successfully...]
    Elapsed Time: 00:00:12.126
    make[2]: Leaving directory `/home/centos/icu/source/test/cintltst'
    ---------------
    ALL TESTS SUMMARY:
    ok:  testdata iotest cintltst
    ===== ERRS:  intltest
    make[1]: ** [check-recursive] Error 1
    make[1]: Leaving directory `/home/centos/icu/source/test'
    make: ** [check-recursive] Error 2

LLVM

 

  • Tested Version: 3.2
  • Downloadhttp://llvm.org/releases/3.2/llvm-3.2.src.tar.gz
  • ConsiderationUdis86 must be installed on the system before LLVM is built and installed. Building LLVM takes some time to complete, be patient.
  • Install:

    Code Block
    languagebash
    # Set BASE_DIR to the top-level directory where the LLVM source will be
    # unpacked and the objects compiled.
    BASE_DIR=<your-base-dir>
    cd $BASE_DIR
    tar xzf llvm-3.2.src.tar.gz
    
    export MY_UDIS_INSTALL_DIR=<udis-installation-directory>/udis86-1.7.2
    export MY_LLVM_INSTALL_DIR=<llvm-installation-directory>/dest-llvm-3.2/
    export MY_LLVM_SRC_DIR=$BASE_DIR/llvm-3.2.src
    export MY_LLVM_OBJ_DIR=$BASE_DIR/llvm-3.2.obj/
    export LD_LIBRARY_PATH=$MY_UDIS_INSTALL_DIR/lib:$LD_LIBRARY_PATH
    export C_INCLUDE_PATH=$MY_UDIS_INSTALL_DIR/include
    export CPATH=$MY_UDIS_INSTALL_DIR/include
    
    mkdir -p $MY_LLVM_OBJ_DIR/release
    cd $MY_LLVM_OBJ_DIR/release
    
    $MY_LLVM_SRC_DIR/configure --prefix=$MY_LLVM_INSTALL_DIR/release \
    --enable-optimized --enable-jit \
    --enable-shared --enable-targets=x86,x86_64,cpp \
    --with-udis86=$MY_UDIS_INSTALL_DIR/lib \
    CFLAGS=-fgnu89-inline
    
    make libs-only
    make install-libs
    
    mkdir -p $MY_LLVM_OBJ_DIR/debug
    cd $MY_LLVM_OBJ_DIR/debug
    
    $MY_LLVM_SRC_DIR/configure --prefix=$MY_LLVM_INSTALL_DIR/debug \
    --enable-optimized --enable-jit \
    --enable-debug-runtime --enable-debug-symbols \
    --enable-shared --enable-targets=x86,x86_64,cpp \
    --with-udis86=$MY_UDIS_INSTALL_DIR/lib \
    CFLAGS=-fgnu89-inline
    
    make libs-only
    make install-libs

Maven

 

MPICH

 

Force Core Dump on Specific SQL Error

You can force Trafodion to abort and core dump on a specific error. Use this method:

  • If you want to catch errors in processes other than sqlci, edit the $MY_SQROOT/etc/ms.env file and add the following line

    Code Block
    ABORT_ON_ERROR=<error-number>

    There is only one error number that will take effect, so if you have two lines of ABORT_ON_ERROR, the last one wins.

  • If you want to catch errors on all nodes of the cluster, copy the edited file to all nodes of the cluster:

    Code Block
    pdsh $MY_NODES $MY_SQROOT/etc/ms.env $MY_SQROOT/etc


 

  • If you want to catch errors in the sqlci program, export this environment variable, then run sqlci

  • Tested Version: 3.0.4
  • Downloadhttp://www.mpich.org/static/downloads/3.0.4/mpich-3.0.4.tar.gz (http://www.mpich.org/downloads)
  • Considerations: For more detailed instructions, see the README file that comes with the source.
  • Install:

    Code Block
    languagebash
    tar -xzf mpich-3.0.4.tar.gz
    cd mpich-3.0.4
    ./configure --prefix=<tool installation directory>/dest-mpich-3.0.4 --with-device=ch3:sock --disable-f77 --disable-fc
    make
    make check
    make install

    <tool installation directory> is the directory where you want MPICH to be installed. If you do not specify the --prefixoption, the default location is /usr/local.

Thrift

 

  • Tested Version: 0.9.0
  • Downloadhttp://archive.apache.org/dist/thrift/0.9.0/
  • Consideration: Behind a firewall, you may need the ant flags to specify a proxy.
  • Install:

    Code Block
    languagebash
    tar -xzf thrift-0.9.0.tar.gz
    cd thrift-0.9.0
    ./configure --prefix=<tool installation dir>/thrift-0.9.0 --without-qt
    make
    make install

Udis86

Zookeeper

...

Install:

...

languagebash

...

  • export ABORT_ON_ERROR=<error-number>
    sqlci


 

This will help you to debug when a query run into a SQL error, and it is hard to figure out which code path it runs into. Note that the changes in ms.env will affect all processes on that node and therefore could disrupt operation of your cluster.