"SequoiaDB Giant Sequoia Database" getMaster()

grammar

rg.getMaster()

Get the master node of the current partition group.

return value

Returns the primary node of the current partition group, the type is an SdbNode object.

error

error code

Example

Get the master node of the group1 partition group, and perform related node-level operations through this node:

var rg = db.getRG("group1")
var node = rg.getMaster()
println(node)
hostname1:11830
println(node.constructor.name)
SdbNode
node.help()

   --Instance methods for class "SdbNode":
   connect()                  - Connect the database to the current node.
   getHostName()              - Return the hostname of a node.
   getNodeDetail()            - Return the information of the current node.
   getServiceName()           - Return the server name of a node.
   start()                    - Start the current node.
   stop()                     - Stop the current node.

Click on Jushan Database Documentation Center for more information

Guess you like

Origin blog.csdn.net/lshanhsnshan/article/details/113112470