Updated on 2025-02-27 GMT+08:00

CREATE NODE

Description

Creates a cluster node.

Precautions

CREATE NODE is an API of the cluster management tool. You are advised not to use this API, because doing so affects the cluster. Only an administrator has the permission to use this API.

Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
CREATE NODE nodename WITH
  (
    [ TYPE = nodetype,]
    [ HOST = hostname,]
    [ PORT = portnum,]
    [ HOST1 = 'hostname',]
    [ PORT1 = portnum,]
    [ HOSTPRIMARY [ = boolean ],]
    [ PRIMARY [ = boolean ],]
    [ PREFERRED [ = boolean ],]
    [ SCTP_PORT = portnum,]
    [ CONTROL_PORT = portnum,]
    [ SCTP_PORT1 = portnum,]
    [ CONTROL_PORT1 = portnum ]
  );

Parameters

  • nodename

    Specifies the node name.

    Value range: a string that complies with the Identifier Naming Conventions.

  • TYPE = nodetype

    Specifies the type of a node.

    Value range:

    • 'coordinator'
    • 'datanode'
  • HOST = hostname

    Specifies the name or IP address of the primary node corresponding to the specified node.

  • PORT = portnum

    Specifies the port number of the primary node to which the specified node is bound.

  • HOST1 = hostname

    Specifies the name or IP address of the standby node corresponding to the specified node.

  • PORT1 = portnum

    Specifies the port number of the standby node to which a node is bound.

  • HOSTPRIMARY
  • PRIMARY = boolean

    Specifies whether the node is a primary node or not. A primary node allows read/write operations. A non-primary node allows only read operations.

    Value range:

    • true
    • false (default value)
  • PREFERRED = boolean

    Specifies whether the node is a preferred node for read operations.

    Value range:

    • true
    • false (default value)
  • SCTP_PORT = portnum

    Specifies the port used by the TCP proxy communications library of the primary node to listen on the data transmission channel. TCP is used to listen on connections.

  • CONTROL_PORT = portnum

    Specifies the port used by the TCP proxy communications library of the primary node to listen on the control transmission channel. The TCP protocol is used to listen on connections.

  • SCTP_PORT1 = portnum

    Specifies the port used by the TCP proxy communications library of the standby node to listen on the data transmission channel. TCP is used to listen on connections.

  • CONTROL_PORT 1= portnum

    Specifies the port used by the TCP proxy communications library of the standby node to listen on the control channel. It is a TCP port.

Helpful Links

ALTER NODE and DROP NODE