mirror of https://github.com/apache/cassandra
add nodeprobe cancelpending
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@880918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6691b2c295
commit
43bf9e237c
|
|
@ -287,4 +287,9 @@ public class TokenMetadata
|
|||
{
|
||||
return getEndPoint(getSuccessor(getToken(endPoint)));
|
||||
}
|
||||
|
||||
public void clearPendingRanges()
|
||||
{
|
||||
pendingRanges.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1046,4 +1046,9 @@ public final class StorageService implements IEndPointStateChangeSubscriber, Sto
|
|||
{
|
||||
return replicationStrategy_;
|
||||
}
|
||||
|
||||
public void cancelPendingRanges()
|
||||
{
|
||||
tokenMetadata_.clearPendingRanges();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,13 @@ public interface StorageServiceMBean
|
|||
*/
|
||||
public void loadBalance() throws IOException, InterruptedException;
|
||||
|
||||
/**
|
||||
* cancel writes to nodes that are set to be changing ranges.
|
||||
* Only do this if the reason for the range changes no longer exists
|
||||
* (e.g., a bootstrapping node was killed or crashed.)
|
||||
*/
|
||||
public void cancelPendingRanges();
|
||||
|
||||
/** set the logging level at runtime */
|
||||
public void setLog4jLevel(String classQualifier, String level);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -393,6 +393,11 @@ public class NodeProbe
|
|||
ssProxy.move(newToken);
|
||||
}
|
||||
|
||||
public void cancelPendingRanges()
|
||||
{
|
||||
ssProxy.cancelPendingRanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out the size of the queues in the thread pools
|
||||
*
|
||||
|
|
@ -488,7 +493,7 @@ public class NodeProbe
|
|||
HelpFormatter hf = new HelpFormatter();
|
||||
String header = String.format(
|
||||
"%nAvailable commands: ring, info, cleanup, compact, cfstats, snapshot [name], clearsnapshot, " +
|
||||
"tpstats, flush, decommission, move, loadbalance, " +
|
||||
"tpstats, flush, decommission, move, loadbalance, cancelpending, " +
|
||||
" getcompactionthreshold, setcompactionthreshold [minthreshold] ([maxthreshold])");
|
||||
String usage = String.format("java %s -host <arg> <command>%n", NodeProbe.class.getName());
|
||||
hf.printHelp(usage, "", options, header);
|
||||
|
|
@ -563,6 +568,10 @@ public class NodeProbe
|
|||
}
|
||||
probe.move(arguments[1]);
|
||||
}
|
||||
else if (cmdName.equals("cancelpending"))
|
||||
{
|
||||
probe.cancelPendingRanges();
|
||||
}
|
||||
else if (cmdName.equals("snapshot"))
|
||||
{
|
||||
String snapshotName = "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue