public class ClusterTool extends Object
Usage: ClusterTool <cluster-dir> <command> [options]
describe: prints out all descriptors in the file.
pid: prints PID of cluster component.
recovery-plan: [service count] prints recovery plan of cluster component.
recording-log: prints recording log of cluster component.
errors: prints Aeron and cluster component error logs.
list-members: print leader memberId, active members list, and passive members list.
remove-member: [memberId] requests removal of a member specified in memberId.
remove-passive: [memberId] requests removal of passive member specified in memberId.
backup-query: [delay] get time of next backup query or set time of next backup query.
invalidate-latest-snapshot: Mark the latest snapshot as invalid so previous is loaded.
snapshot: Trigger a snapshot on the leader.
suspend: Suspend reading from the ingress channel.
resume: Resume reading from the ingress channel.
shutdown: Do an orderly stop of the cluster with a snapshot.
abort: Stop the cluster without a snapshot.
| Modifier and Type | Field and Description |
|---|---|
static String |
AERON_CLUSTER_TOOL_DELAY_PROP_NAME
Delay in nanoseconds to be applied to an operation such as when the new cluster backup query will occur.
|
static String |
AERON_CLUSTER_TOOL_TIMEOUT_PROP_NAME
Timeout in nanoseconds for the tool to wait while trying to perform an operation.
|
| Constructor and Description |
|---|
ClusterTool() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
abort(File clusterDir,
PrintStream out) |
static void |
describe(PrintStream out,
ClusterMarkFile[] serviceMarkFiles) |
static void |
describe(PrintStream out,
File clusterDir) |
static void |
errors(PrintStream out,
ClusterMarkFile[] serviceMarkFiles) |
static void |
errors(PrintStream out,
File clusterDir) |
static boolean |
invalidateLatestSnapshot(PrintStream out,
File clusterDir) |
static boolean |
listMembers(ClusterMembership clusterMembership,
File clusterDir,
long timeoutMs) |
static void |
listMembers(PrintStream out,
File clusterDir) |
static void |
main(String[] args)
Main method for launching the process.
|
static boolean |
markFileExists(File clusterDir) |
static void |
nextBackupQuery(PrintStream out,
File clusterDir,
long delayMs) |
static long |
nextBackupQueryDeadlineMs(ClusterMarkFile markFile) |
static boolean |
nextBackupQueryDeadlineMs(ClusterMarkFile markFile,
long timeMs) |
static long |
nextBackupQueryDeadlineMs(File clusterDir) |
static boolean |
nextBackupQueryDeadlineMs(File clusterDir,
long timeMs) |
static void |
pid(PrintStream out,
File clusterDir) |
static void |
printNextBackupQuery(PrintStream out,
File clusterDir) |
static boolean |
queryClusterMembers(ClusterMarkFile markFile,
long timeoutMs,
ClusterMembership clusterMembership) |
static boolean |
queryClusterMembers(ClusterNodeControlProperties controlProperties,
long timeoutMs,
ClusterMembership clusterMembership) |
static void |
recordingLog(PrintStream out,
File clusterDir) |
static void |
recoveryPlan(PrintStream out,
File clusterDir,
int serviceCount) |
static boolean |
removeMember(ClusterMarkFile markFile,
int memberId,
boolean isPassive) |
static boolean |
removeMember(File clusterDir,
int memberId,
boolean isPassive) |
static void |
removeMember(PrintStream out,
File clusterDir,
int memberId,
boolean isPassive) |
static boolean |
resume(File clusterDir,
PrintStream out) |
static boolean |
shutdown(File clusterDir,
PrintStream out) |
static boolean |
snapshot(File clusterDir,
PrintStream out) |
static boolean |
suspend(File clusterDir,
PrintStream out) |
static boolean |
toggleClusterState(PrintStream out,
File clusterDir,
ConsensusModule.State expectedState,
ClusterControl.ToggleState toggleState,
boolean waitForToggleToComplete,
long defaultTimeoutMs) |
public static final String AERON_CLUSTER_TOOL_TIMEOUT_PROP_NAME
public static final String AERON_CLUSTER_TOOL_DELAY_PROP_NAME
public static void main(String[] args)
args - passed to the process.public static void describe(PrintStream out, File clusterDir)
public static void pid(PrintStream out, File clusterDir)
public static void recoveryPlan(PrintStream out, File clusterDir, int serviceCount)
public static void recordingLog(PrintStream out, File clusterDir)
public static void errors(PrintStream out, File clusterDir)
public static void listMembers(PrintStream out, File clusterDir)
public static void removeMember(PrintStream out, File clusterDir, int memberId, boolean isPassive)
public static void printNextBackupQuery(PrintStream out, File clusterDir)
public static void nextBackupQuery(PrintStream out, File clusterDir, long delayMs)
public static void describe(PrintStream out, ClusterMarkFile[] serviceMarkFiles)
public static void errors(PrintStream out, ClusterMarkFile[] serviceMarkFiles)
public static boolean markFileExists(File clusterDir)
public static boolean listMembers(ClusterMembership clusterMembership, File clusterDir, long timeoutMs)
public static boolean queryClusterMembers(ClusterMarkFile markFile, long timeoutMs, ClusterMembership clusterMembership)
public static boolean queryClusterMembers(ClusterNodeControlProperties controlProperties, long timeoutMs, ClusterMembership clusterMembership)
public static boolean removeMember(File clusterDir, int memberId, boolean isPassive)
public static boolean removeMember(ClusterMarkFile markFile, int memberId, boolean isPassive)
public static long nextBackupQueryDeadlineMs(File clusterDir)
public static long nextBackupQueryDeadlineMs(ClusterMarkFile markFile)
public static boolean nextBackupQueryDeadlineMs(File clusterDir, long timeMs)
public static boolean nextBackupQueryDeadlineMs(ClusterMarkFile markFile, long timeMs)
public static boolean invalidateLatestSnapshot(PrintStream out, File clusterDir)
public static boolean snapshot(File clusterDir, PrintStream out)
public static boolean suspend(File clusterDir, PrintStream out)
public static boolean resume(File clusterDir, PrintStream out)
public static boolean shutdown(File clusterDir, PrintStream out)
public static boolean abort(File clusterDir, PrintStream out)
public static boolean toggleClusterState(PrintStream out, File clusterDir, ConsensusModule.State expectedState, ClusterControl.ToggleState toggleState, boolean waitForToggleToComplete, long defaultTimeoutMs)
Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.