gramática
rg.getMaster ()
Obtenga el nodo maestro del grupo de particiones actual.
valor de retorno
Devuelve el nodo principal del grupo de particiones actual, el tipo es un objeto SdbNode.
error
Ejemplo
Obtenga el nodo principal del grupo de particiones group1 y realice operaciones relacionadas a nivel de nodo a través de este nodo:
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.
Haga clic en Jushan Database Documentation Center para obtener más información.