public class DbGroupAdmin
extends java.lang.Object
ReplicationGroupAdmin
in a convenient command line utility. For example, it
can be used to display replication group information, or to remove a node
from the replication group.
Note: This utility does not handle security and authorization. It is left to the user to ensure that the utility is invoked with proper authorization.
See main(java.lang.String...)
for a full description of the command line
arguments.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
DbGroupAdmin.Command |
Constructor and Description |
---|
DbGroupAdmin(java.lang.String groupName,
java.util.Set<java.net.InetSocketAddress> helperSockets)
Create a DbGroupAdmin instance for programmatic use.
|
Modifier and Type | Method and Description |
---|---|
void |
dumpGroup()
Display group information.
|
static void |
main(java.lang.String... args)
Usage:
|
void |
removeMember(java.lang.String name)
Remove a node from the replication group.
|
void |
transferMaster(java.lang.String nodeList,
java.lang.String timeout)
Transfers the master role from the current master to one of the replicas
specified in the argument list.
|
void |
updateAddress(java.lang.String nodeName,
java.lang.String newHostName,
int newPort)
Update the network address for a specified node.
|
public DbGroupAdmin(java.lang.String groupName, java.util.Set<java.net.InetSocketAddress> helperSockets)
groupName
- replication group namehelperSockets
- set of host and port pairs for group members which
can be queried to obtain group information.public static void main(java.lang.String... args) throws java.lang.Exception
java {com.sleepycat.je.rep.util.DbGroupAdmin | -jar je-<version>.jar DbGroupAdmin} -groupName <group name> # name of replication group -helperHosts <host:port> # identifier for one or more members # of the replication group which can be # contacted for group information, in # this format: # hostname[:port][,hostname[:port]]* -dumpGroup # dump group information -removeMember <node name># node to be removed -updateAddress <node name> <new host:port> # update the network address for a specified # node. The node should not be alive when # updating address -transferMaster [-force] <node1,node2,...> <timeout>
java.lang.Exception
public void dumpGroup()
public void removeMember(java.lang.String name)
name
- name of the node to be removedReplicationGroupAdmin.removeMember(java.lang.String)
public void updateAddress(java.lang.String nodeName, java.lang.String newHostName, int newPort)
ReplicationGroupAdmin.updateAddress(java.lang.String, java.lang.String, int)
for more information.nodeName
- the name of the node whose address will be updatednewHostName
- the new host name of the nodenewPort
- the new port number of the nodepublic void transferMaster(java.lang.String nodeList, java.lang.String timeout)
nodeList
- comma-separated list of nodestimeout
- in
same form as accepted by duration config paramsReplicatedEnvironment.transferMaster(java.util.Set<java.lang.String>, int, java.util.concurrent.TimeUnit)
Copyright (c) 2004-2012 Oracle. All rights reserved.