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/07/19 14:51:48 UTC

[GitHub] [cassandra] smiklosovic commented on a change in pull request #1051: CASSANDRA-16725 - implement nodetool getauditlog

smiklosovic commented on a change in pull request #1051:
URL: https://github.com/apache/cassandra/pull/1051#discussion_r672370681



##########
File path: src/java/org/apache/cassandra/audit/AuditLogOptionsCompositeData.java
##########
@@ -0,0 +1,162 @@
+/*
+ * 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.audit;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
+
+import org.apache.cassandra.config.ParameterizedClass;
+
+public class AuditLogOptionsCompositeData
+{
+    private static final String[] ITEM_NAMES = new String[]{ "audit_logs_dir",
+                                                             "archive_command",
+                                                             "roll_cycle",
+                                                             "block",
+                                                             "max_queue_weight",
+                                                             "max_log_size",
+                                                             "max_archive_retries",
+                                                             "enabled",
+                                                             "included_keyspaces",
+                                                             "excluded_keyspaces",
+                                                             "included_categories",
+                                                             "excluded_categories",
+                                                             "included_users",
+                                                             "excluded_users",
+                                                             "logger" };
+
+    private static final String[] ITEM_DESC = new String[]{ "directory where audit data are stored",
+                                                            "archive command for audit data",
+                                                            "how often to roll BinLog segments so they can potentially be reclaimed",
+                                                            "indicates if the BinLog should block if the it falls behind or should drop bin log records",
+                                                            "maximum weight of in memory queue for records waiting to be written to the binlog file before blocking or dropping the log records",
+                                                            "maximum size of the rolled files to retain on disk before deleting the oldest file",
+                                                            "number of times to retry an archive command",
+                                                            "boolean telling if we are enabled or not",
+                                                            "included keyspaces",
+                                                            "excluded keyspaces",
+                                                            "included categories",
+                                                            "excluded categories",
+                                                            "included users",
+                                                            "excluded users",
+                                                            "audit logger implementation class name" };

Review comment:
       I do not want to do this differently, actually. This is done like it is here across the whole project, I just do not want to introduce just another way how we do it, it is just good enough how it is, in my opinion.




-- 
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