Repository: cassandra Updated Branches: refs/heads/trunk 589501d8e -> 0b5088798
Add nodetool cmd to print hinted handoff window Patch by Varun Gupta; Reviewed by Jeff Jirsa for CASSANDRA-13728 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0b508879 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0b508879 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0b508879 Branch: refs/heads/trunk Commit: 0b50887989a6c17e90f1f749206172cecd89c2d0 Parents: 589501d Author: Varun Gupta <var...@uber.com> Authored: Fri Aug 18 10:17:47 2017 -0700 Committer: Jeff Jirsa <jji...@apple.com> Committed: Thu Oct 19 21:11:04 2017 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/tools/NodeTool.java | 3 +- .../cassandra/tools/nodetool/HandoffWindow.java | 33 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b508879/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index bea407e..6d84bc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 4.0 + * Add nodetool cmd to print hinted handoff window (CASSANDRA-13728) * Checksum sstable metadata (CASSANDRA-13321, CASSANDRA-13593) * Add result set metadata to prepared statement MD5 hash calculation (CASSANDRA-10786) * Refactor GcCompactionTest to avoid boxing (CASSANDRA-13941) http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b508879/src/java/org/apache/cassandra/tools/NodeTool.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java b/src/java/org/apache/cassandra/tools/NodeTool.java index 640cf36..8618d87 100644 --- a/src/java/org/apache/cassandra/tools/NodeTool.java +++ b/src/java/org/apache/cassandra/tools/NodeTool.java @@ -147,7 +147,8 @@ public class NodeTool FailureDetectorInfo.class, RefreshSizeEstimates.class, RelocateSSTables.class, - ViewBuildStatus.class + ViewBuildStatus.class, + HandoffWindow.class ); Cli.CliBuilder<Runnable> builder = Cli.builder("nodetool"); http://git-wip-us.apache.org/repos/asf/cassandra/blob/0b508879/src/java/org/apache/cassandra/tools/nodetool/HandoffWindow.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/tools/nodetool/HandoffWindow.java b/src/java/org/apache/cassandra/tools/nodetool/HandoffWindow.java new file mode 100644 index 0000000..b4adb7f --- /dev/null +++ b/src/java/org/apache/cassandra/tools/nodetool/HandoffWindow.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.tools.nodetool; + +import io.airlift.airline.Command; +import org.apache.cassandra.tools.NodeProbe; +import org.apache.cassandra.tools.NodeTool; + +@Command(name = "handoffwindow", description = "Print current hinted handoff window") +public class HandoffWindow extends NodeTool.NodeToolCmd +{ + @Override + public void execute(NodeProbe probe) + { + System.out.println(String.format("Hinted handoff window is %s", + probe.getMaxHintWindow())); + } +} --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org