v1.10

Document

How to Start SequoiaDB

Basic Operation

Data Model

Database Management

Aggregation

Index

Replication

Cluster

Connector

Reference

Development

Release Note

FAQ

  • Content
  • Comments
  • History

Deploy a Cluster

Explanation:

(1) This section will take the easiest deployment as an example to introduce configuration and startup steps.

(2) The following manipulation supposes that SequoiaDB is installed under the catalog "/opt/sequoiadb".

(3) All of "sdb" service processes run as "sdbadmin", please ensure all of the database files have the "sdbadmin" read and write permissions.

    su sdbadmin 
    /opt/sequoiadb/bin/sdb
    var oma = new Oma("localhost", 11790)
    oma.createData(11810, "/opt/sequoiadb/database/standalone/11810")
    (Here 11810 is the port of database service. To avoid port conflicts and other issues, not the database port configuration in the random port range. Such as: Most linux default random port range of 32768~61000 can be configured in the database port 32767 or less.)
    oma.startNode(11810)
    Finish configuration and startup of database
Note: When configuring a cluster mode, make sure that the mapping between the server and the host name is correct, details, refer to the system configuration needs to ensure that the communication between the nodes, the nodes of the firewall is turned off.

Instruction:

  (1) This section will introduce the steps of configuration and startup by taking highly accessible deployment as an example.

  (2) The follpwing steps is based on the fact that SequoiaDB is installed under the catalog "/opt/sequoiadb".

  (3) All of "sdb" service processes run as "sdbadmin", please ensure all of the database files have the "sdbadmin" read and write permission.

    Check the configuration

    service status of SequoiaDB in each database server: service sdbcm status

    If the system prompts "sdbcm is running", we can know that service is running, or please run the following command to reconfigurate service program: service sdbcm start

    1. Switch to "sdbadmin"

    su sdbadmin 

    2. On any database server (the following steps are manipulated on this server), Start SequoiaDB Shell console

    /opt/sequoiadb/bin/sdb
    var oma = new Oma("localhost", 11790)
    oma.createCoord(18800, "/opt/sequoiadb/database/coord/18800")
    oma.startNode(18800)

    3: Configurate and start catalog nodes with statements

    1. Connect to the temporary Coord node, and insert instructions in Shell.

    > var db = new Sdb("localhost",18800)
    Here 18800 is the port number of this Coord node.

    2. Create a catalog node group

    > db.createCataRG("sdbserver1", 11800, "/opt/sequoiadb/database/cata/11800")

    Here "sdbserver1" is the hostname of the 1st server.

    Here "11800" is the service port of catalog node. (The port is configured not to conflict with a random port, other ports in the following configuration also requires attention.

    " /opt/sequoiadb/database/cata/11800" is the path of data file of catalog node.

    3. Wait for 5 second, and add 2 more catalog nodes

    > var cataRG = db.getRG("SYSCatalogGroup");
    > var node1 = cataRG.createNode("sdbserver2", 11800,"/opt/sequoiadb/database/cata/11800") 
    > var node2 = cataRG.createNode("sdbserver3", 11800,"/opt/sequoiadb/database/cata/11800")
    > node1.start()> node2.start()
    Note:

    When creating a node, the first parameter should be "hostname", rather than IP of the host.

  • 1. Create data node group

    > var dataRG = db.createRG("datagroup")

    2. Add data node

    > dataRG.createNode("sdbserver1", 11820, "/opt/sequoiadb/database/data/11820")
    > dataRG.createNode("sdbserver2", 11820,"/opt/sequoiadb/database/data/11820")
    > dataRG.createNode("sdbserver3", 11820, "/opt/sequoiadb/database/data/11820")
    Note:

    When creating a node, the first parameter should be "hostname", rather than IP of the host.

    3. Start data node group

    > dataRG.start()
  • var rg = db.createCoordRG()
rg.createNode("sdbserver1", 11810, "/opt/sequoiadb/database/coord/11810")
rg.createNode("sdbserver2", 11810, "/opt/sequoiadb/database/coord/11810")
rg.createNode("sdbserver3", 11810, "/opt/sequoiadb/database/coord/11810")
rg.start()
  • Step6: Delete the temporary Coord node.
    var oma = new Oma("localhost", 11790)
    oma.removeCoord(18800)

    End

  • Restart the operating system

    ps –elf | grep sequoiadb can see the current node is starting Booted nldes. After starting the process called: sequoiadb (service name) is starting the process name is generallly:

    /opt/sequoiadb/bin/sequoiadb –c /opt/sequoiadb/conf/local/(service name)

    Manually start a specific node

    /opt/sequoiadb

    1. Connect to the coord node
      $ /opt/sequoiadb/bin/sdb
      > var db = new Sdb("localhost", 11810) ;
    2. Get partition group
      > dataRG = db.getRG ( "<datagroup1>" ) ;
    3. Get the data node
      > dataNode = dataRG.getNode ( "<hostname1>", "<servicename1>" ) ;
    4. Start Node
      > dataNode.start() ;

    Manually start the data set

    When a data cluster group is stopped, users can sdb command line using the following steps to start the data set. This action starts the data set of all data nodes.

    1. Connect to the coord node
      $ /opt/sequoiadb/bin/sdb
      > var db = new Sdb("localhost", 11810) ;
      
    2. > dataRG = db.getRG ( "<datagroup1>" ) ;
    3. > dataRG.start();

    Manually stop a specific node

    Users can sdb command line using the following steps to stop the data nodes.

    1. Connect to the coord node
      $ /opt/sequoiadb/bin/sdb
      > var db = new Sdb("localhost", 11810) ;
    2. Get replica group
      > dataRG = db.getRG ( "<datagroup1>" ) ;
    3. Get the data node
      > dataNode = dataRG.getNode ( "<hostname1>", "<servicename1>" ) ;
    4. > dataNode.stop() ;

    Manually stop data set

    User can sdb command line using the following steps to stop the data set. This action will stop all data node in the data set.

    1. Connect to the coord node
      $ /opt/sequoiadb/bin/sdb
      > var db = new Sdb("localhost", 11810) ;
    2. Get replica group
      > dataRG = db.getRG ( "<datagroup1>" ) ;
    3. > dataRG.stop() ;

    Use the kill command to stop the data node

    Users can use kill -15 normal stop data node. The data in this way to stop the node is considered normal stops. Users use kill -9 forcibly stop data node. The data in this way to stop the node is considered abnormal stop. If the node using the normal boot process, it will be sdbcm process attempts to restart. Starts with the other noed in the current data synchronization group.

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

    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.

    Beijing:
    Tower R, No.8 North Star East Road, Chaoyang District, Beijing,China
    Guangzhou:
    Tower A, No.22 Qinglan Street, Panyu District, Guangzhou,China
    Shenzhen:
    Tsing Hua Tech Park, Nanshan District, Shenzhen,China
    Tel:400-8038-339
    E-mail:contact@sequoiadb.com