How to Start SequoiaDB

Basic Operation

Data Model

Database Management








Release Note


  • Content
  • Comments
  • History


  • Apache Hive 0.12.0
  • Apache Hive 0.11.0
  • Apache Hive 0.10.0
  • CDH-5.0.0-beta-2 Hive 0.12.0

hive-sequoiadb-apache.jar support for the Apache version of Hive Sequoiadb-Hive-Connector.

hive-sequoiadb-cdh-5.0.0-beta-2.jar support for the CDH5.0.0-beta-2 version of Hive-0.12 Sequoiadb-Hive-Connector.

1. Install adn configure Hadoop/Hive environment, start hadoop environment.

2. Copy the sequoiadb installation directory (by default in /opt/sequoiadb) of hadoop/hive-sequiadb-{version}.jar and java/sequoiadb.jar two files are copied to the hive/lib installation directory.

3. Modify the hive installation directory under bin/hive-site.xml file (if you do not exist, you can copy the $HIVE_HOME/conf/hive-default.xml.template to hive-site.xml file), add the following attributes:

   <description>Sequoiadb store handler jar file</description>
   <name> hive.auto.convert.join</name>
Note: Thesejar packages need to be stored at HDFS, and the path is the same as the file protocol.

Start hive shell command line window, execute the following command to create the data table.

hive> create external table sdb_tab(id INT, name STRING, value DOUBLE) stored by 
"com.sequoiadb.hive.SdbHiveStorageHandler" tblproperties("sdb.address" = "localhost:11810";)
Time taken: 0.386 seconds

Of which:

Sdb.address SequoiaDB coord node is used to specify the IP and port, if there are multiple coord node, you can write to multiple, separated by commas. Tables' databaserefres to Collectionspace in SequoiaDB, and tables refer to Collection in SequoiaDB.

hive> select * from new_tab;
0       false   0.0     ALGERIA
1       true    1.0     ARGENTINA
2       true    1.0     BRAZIL
3       true    1.0     CANADA
4       true    4.0     EGYPT
5       false   0.0     ETHIOPIA
6       true    3.0     FRANCE
7       true    3.0     GERMANY
8       true    2.0     INDIA
9       true    2.0     INDONESIA
Time taken: 0.306 seconds, Fetched: 10 row(s)
hive> insert overwrite table sdb_tab select * from hdfs_tab;
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_201310172156_0010, Tracking URL = http://bl465-5:50030/jobdetails.jsp?jobid=job_201310172156_0010
Kill Command = /opt/hadoop-hive/hadoop-1.2.1/libexec/../bin/hadoop job  -kill job_201310172156_0010
Hadoop job information for Stage-0: number of mappers: 1; number of reducers: 0
2013-10-18 04:44:47,733 Stage-0 map = 0%,  reduce = 0%
2013-10-18 04:44:49,763 Stage-0 map = 100%,  reduce = 0%, Cumulative CPU 1.85 sec
2013-10-18 04:44:50,777 Stage-0 map = 100%,  reduce = 0%, Cumulative CPU 1.85 sec
2013-10-18 04:44:51,795 Stage-0 map = 100%,  reduce = 100%, Cumulative CPU 1.85 sec
MapReduce Total cumulative CPU time: 1 seconds 850 msec
Ended Job = job_201310172156_0010
10 Rows loaded to sdb_tab
MapReduce Jobs Launched:
Job 0: Map: 1   Cumulative CPU: 1.85 sec   HDFS Read: 2301 HDFS Write: 0 SUCCESS
Total MapReduce CPU Time Spent: 1 seconds 850 msec
Time taken: 12.201 seconds

Description: When you import data into SequoiaDB table, make sure that you have created on HDFS file hdfs_tab data sheet, and Load data.

please login to comment.
Latest Comment
  • 2015-02-15

About Us

SequoiaDB is a financial-level distributed database vendor and is the first Chinese database listed in Gartner’s Magic Quadrant OPDBMS report. SequoiaDB has recently released version 3.0.
SequoiaDB is now penetrating the vertical sector Financial Industry quickly and had more than 50 banking clients and hundreds of enterprise customers in industries including government, telecommunication, Internet and IoT.

Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
Tsing Hua Tech Park, Nanshan District, Shenzhen,China