Versions Compared

Key

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

 

If you follow the installation instructions, Trafodion should start up correctly. However, since each system has a somewhat different setup, you may encounter problems during or after an install. This page talks about how Trafodion objects are set up, what CLASSPATHs and objects are required, and related topics. It also lists common installation problems and their solutions. If you need to solve such issues or if these topics interest you, please read on.

...

sudo su - trafodion
echo $MY_SQROOT
echo $DCS_INSTALL_DIR
pdsh $MY_NODES pwd
echo $CLASSPATH

...

Trafodion Class Path

The class path is probably the main place where issues with Trafodion installation surface. It's a long CLASSPATH, consisting of the following parts:

...

sudo su - trafodion

# stop Trafodion
sqstop

cd $MY_SQROOT
# patch environment, for example in this file
vi sqenvcom.sh

# now use the pdcp command to copy the patched file to all nodes
# The $MY_NODES variable is handy to do this.
pdcp $MY_NODES sqenvcom.sh $PWD

# test the patch on all nodes by checking the classpath
pdsh $MY_NODES echo $CLASSPATH | grep /usr/lib/hbase/hbase-trx | wc -l

# copy other needed files
pdcp $MY_NODES /somedir/newjar.jar /somedir

# secure the new file
pdsh $MY_NODES chmod 644 /somedir/newjar.jar

# validate that the HBase-trx jars are in the right place (see HBase setup topic above)
# note that we put the name with wildcards in quotes, so it is resolved on the target system
pdsh $MY_NODES ls -l "/usr/lib/hbase/lib/*trx*"

# use a new shell (important) to generate a new environment for Trafodion
ssh localhost
sqgen
exit

# exit all shells with the old environment and restart Trafodion
exit
sudo su - trafodion
sqstart

 

Security

Trafodion uses a Java interface to access HBase, and the native libhdfs library to access the HDFS files of Hive tables. If you have set permissions for HBase and HDFS, they must permit the trafodion user ID to access the necessary HBase tables and HDFS files. The easiest way to test this is to run HBase, Hive and HDFS commands as the trafodion user. See above for simple test that can be done in the HBase shell. 

Processes and Network

Again, due to the fact that Trafodion manages a cluster, there are a few special things to know and check. Trafodion has its own set of processes. As the trafodion user, you can use the sqps command to display all the Trafodion processes running on the cluster. Example (simplified): 

sudo su - trafodion
$ sqps
...
[$Z000LSB] NID,PID(os)  PRI TYPE STATES  NAME        PARENT      PROGRAM
[$Z000LSB] ------------ --- ---- ------- ----------- ----------- ---------------
[$Z000LSB] 000,00022519 001 DTM  ES--A-- $TM0        NONE        tm             
[$Z000LSB] 000,00024392 001 GEN  ES--A-- $Z000JWX    NONE        mxosrvr        
[$Z000LSB] 000,00024441 001 GEN  ES--A-- $Z000JYB    NONE        mxosrvr        
[$Z000LSB] 000,00005348 001 GEN  ES--A-- $Z0004CT    $Z000JWX    tdm_arkcmp     
[$Z000LSB] 000,00013085 001 GEN  ES--A-- $Z000ANV    $Z0004CT    tdm_arkcmp     
[$Z000LSB] 001,00022612 001 DTM  ES--A-- $TM1        NONE        tm             
...

...

  • Make sure that the Hive configuration directory (e.g. /etc/hive/conf) is in the class path
  • Try to connect manually to the Hive metastore, using the information from hive-site.xml
  • As the trafodion user, run the hive shell and try some simple commands
    sudo su - trafodion
    hive
      show tables;
      select count(*) from <some table>;
      quit;
    
  • Make sure that libhdfs is in the LD_LIBRARY_PATH. This is usually set up correctly by default.

...

Transactional Recovery

Trafodion implements the ability to recover transactions after an HBase crash. This feature is enabled by default.

...

  begin work;
  set parserflags 131072;
  delete from "_MD_".objects where object_uid = <num>;
  delete from "_MD_".columns where object_uid = <num>;
  delete from "_MD_".keys where object_uid = <num>;
  delete from "_MD_".tables where table_uid = <num>;
  delete from "_MD_".table_constraints where table_uid = <num>;

 If all is well at this point, then…

  commit work;
  exit;

...

Emergency Recovery

There may be times when you would like to refresh the Trafodion instance and matching HBase objects. NOTE: This will destroy all tables that were created in Trafodion! You can perform a series of steps that will stop the Trafodion instance and then clean out the HBase and ZooKeeper objects. You may then restart the Trafodion instance and reinitialize the Trafodion objects.

...