TomerWizman commented on a change in pull request #11250:
URL: https://github.com/apache/kafka/pull/11250#discussion_r703454226



##########
File path: 
streams/src/test/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapterTest.java
##########
@@ -306,4 +327,33 @@ public String name() {
 
         return parameters;
     }
+
+    @Test
+    public void shouldLogWarningWhenSettingWalOptions() throws Exception {
+
+        try (final LogCaptureAppender appender = 
LogCaptureAppender.createAndRegister(RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.class))
 {
+
+            final RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter 
adapter
+                    = new 
RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter(new DBOptions(), new 
ColumnFamilyOptions());
+
+            for (final Method method : 
RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.class.getDeclaredMethods())
 {
+                if (walRelatedMethods.contains(method.getName())) {
+                    method.invoke(adapter, 
getDBOptionsParameters(method.getParameterTypes()));
+                }
+            }
+
+            final List<String> walOptions = Arrays.asList("walDir", 
"walFilter", "walRecoveryMode", "walBytesPerSync", "walSizeLimitMB", 
"manualWalFlush", "maxTotalWalSize", "walTtlSeconds");

Review comment:
       @cadonna 
   I Thought about it also.
   To do that I need to remove the "set" from the method name and to 
de-capitalize the first letter of the option. 
   I think this is a bit overkill because:
   1. I got checkstyle errors trying to use something like toLowerCase()... 
   2. Its going to be ugly to do it without additional StringUtils helper libs 
(like apache commons-lang StringUtils which I saw we dont have)
    




-- 
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: jira-unsubscr...@kafka.apache.org

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


Reply via email to