You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/12/09 01:38:46 UTC

[GitHub] [cassandra] yifan-c commented on a change in pull request #1303: Allow column_index_size_in_kb to be configurable through nodetool

yifan-c commented on a change in pull request #1303:
URL: https://github.com/apache/cassandra/pull/1303#discussion_r765358215



##########
File path: src/java/org/apache/cassandra/service/StorageService.java
##########
@@ -5833,6 +5830,18 @@ public void setCachedReplicaRowsFailThreshold(int threshold)
         logger.info("updated replica_filtering_protection.cached_rows_fail_threshold to {}", threshold);
     }
 
+    public int getColumnIndexSizeInKB()
+    {
+        return DatabaseDescriptor.getColumnIndexSizeInKB();
+    }
+
+    public void setColumnIndexSize(int columnIndexSizeInKB)
+    {
+        int oldValueInKB = DatabaseDescriptor.getColumnIndexSizeInKB();
+        DatabaseDescriptor.setColumnIndexSize(columnIndexSizeInKB);
+        logger.info("setColumnIndexSize: column index size set to {} KiB (was {} KiB)", columnIndexSizeInKB, oldValueInKB);

Review comment:
       How about "Updated column_index_size_in_kb to ..."? The other methods log the message in this format. 

##########
File path: src/java/org/apache/cassandra/tools/nodetool/GetColumnIndexSize.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.NodeToolCmd;
+
+@Command(name = "getcolumnindexsize", description = "Print the granularity of the collation index of rows within a partition in KiB")
+public class GetColumnIndexSize extends NodeToolCmd

Review comment:
       Personally, adding 2 nodetool commands just for getter and setter is an overkill. But there are existing nodetools already doing so. 🤷 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org