michaelsembwever commented on a change in pull request #1051:
URL: https://github.com/apache/cassandra/pull/1051#discussion_r678212304
##########
File path: src/java/org/apache/cassandra/config/DatabaseDescriptor.java
##########
@@ -3139,7 +3149,7 @@ public static AuditLogOptions getAuditLoggingOptions()
public static void setAuditLoggingOptions(AuditLogOptions
auditLoggingOptions)
{
- conf.audit_logging_options = auditLoggingOptions;
+ conf.audit_logging_options = new
AuditLogOptions.Builder(auditLoggingOptions).build();
Review comment:
nit: this line should be the only change in this file. Can all the
import statement changes be reverted please.
##########
File path: src/java/org/apache/cassandra/db/virtual/AuditLogOptionsTable.java
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.db.virtual;
+
+import org.apache.cassandra.audit.AuditLogManager;
+import org.apache.cassandra.audit.AuditLogOptions;
+import org.apache.cassandra.db.DecoratedKey;
+import org.apache.cassandra.db.marshal.*;
+import org.apache.cassandra.dht.LocalPartitioner;
+import org.apache.cassandra.schema.TableMetadata;
+
+final class AuditLogOptionsTable extends AbstractVirtualTable
+{
+ private static final String NAME = "name";
+ private static final String AUDIT_LOGS_DIR = "audit_logs_dir";
+ private static final String ARCHIVE_COMMAND = "archive_command";
+ private static final String ROLL_CYCLE = "roll_cycle";
+ private static final String BLOCK = "block";
+ private static final String MAX_QUEUE_WEIGHT = "max_queue_weight";
+ private static final String MAX_LOG_SIZE = "max_log_size";
+ private static final String MAX_ARCHIVE_RETRIES = "max_archive_retries";
+ private static final String ENABLED = "enabled";
+ private static final String INCLUDED_KEYSPACES = "included_keyspaces";
+ private static final String EXCLUDED_KEYSPACES = "excluded_keyspaces";
+ private static final String INCLUDED_CATEGORIES = "included_categories";
+ private static final String EXCLUDED_CATEGORIES = "excluded_categories";
+ private static final String INCLUDED_USERS = "included_users";
+ private static final String EXCLUDED_USERS = "excluded_users";
+ private static final String LOGGER = "logger";
Review comment:
curiosity: before we remove this vtable… if we move these constants into
`AuditLogOptions`, would this remove the duplication of this string literals in
this class and in `AuditLogOptionsCompositeData.AuditLogOption` ?
(this was the primary purpose of raising during this review the vtable code.)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]