public class JMXNodeTool extends org.apache.cassandra.tools.NodeProbe implements INodeToolObservable
Constructor and Description |
---|
JMXNodeTool(IConfiguration config) |
JMXNodeTool(java.lang.String host,
int port)
Hostname and Port to talk to will be same server for now optionally we might want the ip to
poll.
|
JMXNodeTool(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(INodeToolObserver observer) |
void |
cleanup() |
void |
close() |
static JMXNodeTool |
connect(IConfiguration config) |
static JMXNodeTool |
createNewConnection(IConfiguration config)
A means to clean up existing and recreate the JMX connection to the Cassandra process.
|
void |
deleteObserver(INodeToolObserver observer) |
org.codehaus.jettison.json.JSONObject |
estimateKeys()
You must do the compaction before running this to remove the duplicate tokens out of the
server.
|
static javax.management.MBeanServerConnection |
getMbeanServerConn(IConfiguration config)
Returns plain MBeanServer Connection
|
static <T> T |
getRemoteBean(java.lang.Class<T> clazz,
java.lang.String mbeanName,
IConfiguration config,
boolean mxbean) |
org.codehaus.jettison.json.JSONObject |
info() |
static JMXNodeTool |
instance(IConfiguration config)
try to create if it is null.
|
boolean |
isIncrementalBackupsEnabled() |
void |
refresh(java.util.List<java.lang.String> keyspaces) |
void |
repair(boolean isSequential,
boolean localDataCenterOnly) |
void |
repair(boolean isSequential,
boolean localDataCenterOnly,
boolean primaryRange) |
org.codehaus.jettison.json.JSONArray |
ring(java.lang.String keyspace) |
void |
setIncrementalBackupsEnabled(boolean enabled) |
org.codehaus.jettison.json.JSONObject |
statusInformation() |
clearSnapshot, decommission, describeRing, disableAutoCompaction, disableHintedHandoff, drain, effectiveOwnership, enableAutoCompaction, enableHintedHandoff, enableHintedHandoff, forceKeyspaceCleanup, forceKeyspaceCleanup, forceKeyspaceCompaction, forceKeyspaceFlush, forceRemoveCompletion, forceRepairAsync, forceRepairAsync, forceRepairRangeAsync, forceRepairRangeAsync, getAndResetGCStats, getCacheMetric, getCacheServiceMBean, getCfsProxy, getClusterName, getColumnFamilyMetric, getColumnFamilyStoreMBeanProxies, getCompactionHistory, getCompactionManagerProxy, getCompactionMetric, getCompactionThroughput, getCurrentGenerationNumber, getDataCenter, getDroppedMessages, getEndpoint, getEndpoints, getEndpointSnitchInfoProxy, getExceptionCount, getGossipInfo, getHeapMemoryUsage, getHostIdMap, getInterDCStreamThroughput, getJoiningNodes, getKeyspaces, getLeavingNodes, getLiveNodes, getLoadMap, getLoadString, getLocalHostId, getLoggingLevels, getMovingNodes, getOperationMode, getOwnership, getPartitioner, getPartitionSample, getProxyMetric, getRack, getReadRepairAttempted, getReadRepairRepairedBackground, getReadRepairRepairedBlocking, getReleaseVersion, getRemovalStatus, getSchemaVersion, getSnapshotDetails, getSpProxy, getSSTables, getStorageMetric, getStreamStatus, getStreamThroughput, getThreadPoolMBeanProxies, getTokens, getTokens, getTokenToEndpointMap, getUnreachableNodes, getUptime, invalidateCounterCache, invalidateKeyCache, invalidateRowCache, isFailed, isGossipRunning, isHandoffEnabled, isInitialized, isJoined, isNativeTransportRunning, isStarting, isThriftServerRunning, joinRing, loadNewSSTables, metricPercentilesAsArray, move, pauseHintsDelivery, rebuild, rebuildIndex, refreshSizeEstimates, reloadTriggers, removeNode, resetLocalSchema, resumeHintsDelivery, sampleKeyRange, scrub, scrub, setCacheCapacities, setCacheKeysToSave, setCompactionThreshold, setCompactionThroughput, setHintedHandoffThrottleInKB, setInterDCStreamThroughput, setLoggingLevel, setStreamThroughput, setTraceProbability, startGossiping, startNativeTransport, startThriftServer, stop, stopCassandraDaemon, stopGossiping, stopNativeTransport, stopThriftServer, takeMultipleColumnFamilySnapshot, takeSnapshot, trueSnapshotsSize, truncate, truncateHints, truncateHints, upgradeSSTables, upgradeSSTables
public JMXNodeTool(java.lang.String host, int port) throws java.io.IOException, java.lang.InterruptedException
NOTE: This class shouldn't be a singleton and this shouldn't be cached.
This will work only if cassandra runs.
java.io.IOException
java.lang.InterruptedException
public JMXNodeTool(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
@Inject public JMXNodeTool(IConfiguration config) throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public static JMXNodeTool instance(IConfiguration config) throws JMXConnectionException
JMXConnectionException
public static <T> T getRemoteBean(java.lang.Class<T> clazz, java.lang.String mbeanName, IConfiguration config, boolean mxbean) throws java.io.IOException, javax.management.MalformedObjectNameException
java.io.IOException
javax.management.MalformedObjectNameException
public static javax.management.MBeanServerConnection getMbeanServerConn(IConfiguration config) throws JMXConnectionException
config
- Configuration to initialize JMX ConnectionJMXConnectionException
public static JMXNodeTool createNewConnection(IConfiguration config) throws JMXConnectionException
JMXConnectionException
public static JMXNodeTool connect(IConfiguration config) throws JMXConnectionException
JMXConnectionException
public org.codehaus.jettison.json.JSONObject estimateKeys() throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
public org.codehaus.jettison.json.JSONObject info() throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
public org.codehaus.jettison.json.JSONObject statusInformation() throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
public org.codehaus.jettison.json.JSONArray ring(java.lang.String keyspace) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
public void repair(boolean isSequential, boolean localDataCenterOnly) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void repair(boolean isSequential, boolean localDataCenterOnly, boolean primaryRange) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void cleanup() throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void setIncrementalBackupsEnabled(boolean enabled)
setIncrementalBackupsEnabled
in class org.apache.cassandra.tools.NodeProbe
public boolean isIncrementalBackupsEnabled()
isIncrementalBackupsEnabled
in class org.apache.cassandra.tools.NodeProbe
public void refresh(java.util.List<java.lang.String> keyspaces) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in class org.apache.cassandra.tools.NodeProbe
java.io.IOException
public void addObserver(INodeToolObserver observer)
addObserver
in interface INodeToolObservable
observer
- to add to list of internal observers. This behavior is thread-safe.public void deleteObserver(INodeToolObserver observer)
deleteObserver
in interface INodeToolObservable
observer
- to be removed; behavior is thread-safe.