Public Repository

Last pushed: a year ago
Short Description
Single node Apache Trafodion 2.1, running on top of HDP 2.4
Full Description

Apache WebPage:

Install docker:

  1. Edit /etc/yum.repos.d/docker-main.repo :
    name=Docker main Repository
  2. Install docker: yum install docker-engine
  3. Start docker daemon: service docker start

System Requirement:

at least 4GB memory for your Linux host which runs docker.

Fetch image:

docker pull trafodion/quickstart:2.1


docker run -it --privileged=true -h 59b3d431c55c --name=59b3d431c55c -p 8080:8080 -p 23400-23405:23400-23405 -p 4200-4206:4200-4206 -p 24400:24400 trafodion2.1 start
options explanation:

-d                                    Run in daemon mode
-h  [hostname]                        Specify the docker hostname
-p  [hostport:dockerport]             Map the port from host to docker
--privileged=true                     Required

start is used to start all Hadoop and Trafodion services while docker is starting.
Trafodion will be started automatically within 5 minutes (if not, please start Hadoop manually from Hadoop webpage: http://localhost:8080). Then you can ssh to the docker:

ssh -p 2201 trafodion@localhost

The password of trafodion is traf123.

check trafodion running status using sqcheck:

[trafodion@trafdocker ~]$ sqcheck
Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.

The SQ environment is up!

Process        Configured    Actual        Down
-------        ----------    ------        ----
DTM                2        2        
RMS                4        4        
DcsMaster          1        1        
DcsServer          1        1        
mxosrvr            2        2

If not up, please use sqstart to start Trafodion 2.1
run trafodion CLI using trafci:

[trafodion@trafdocker ~]$ trafci

Welcome to Apache Trafodion Command Interface 
Copyright (c) 2015-2016 Apache Software Foundation

Host Name/IP Address: localhost:23400
User Name: zz

Connected to Trafodion 

SQL>get tables;



--- SQL operation complete.

JDBC connection:

Copy JDBC driver jar file from the docker to host:
scp -P 2201 trafodion@localhost:/home/trafodion/trafodion-2.1.0/export/lib/jdbcT4.jar /path/to/jdbcT4.jar

Add jar file to CLASSPATH:
export CLASSPATH=$CLASSPATH:/path/to/jdbcT4.jar

Then you can use JDBC to connect Trafodion from host, below is a sample JAVA code:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
public class con {
    protected static String url = "jdbc:t4jdbc://";     //set your docker's IP address
    protected static String driverClass = "org.trafodion.jdbc.t4.T4Driver";
    protected static String user = "zz";
    protected static String pwd = "zz";
    protected static Connection conn;
    public static void main(String[] args) throws Exception {
        conn = DriverManager.getConnection(url, user, pwd);
        String sql = "select * from test01";
        PreparedStatement ps = conn.prepareStatement(sql);
        ResultSet rs = ps.executeQuery();
        while ({
JDBC connect from another host

Modify /home/trafodion/trafodion-2.1.0/dcs-2.1.0/conf/dcs-site.xml within docker, remove below section:


Add below section:

<value>echo {docker's ip}, {host's ip}</value>

For example:



run dokcer ps to get your container ID, and use docker stop {container_id} to stop it.

Docker Pull Command