michaelsembwever commented on code in PR #2254:
URL: https://github.com/apache/cassandra/pull/2254#discussion_r1184985305


##########
src/java/org/apache/cassandra/schema/CompressionParams.java:
##########
@@ -402,29 +411,47 @@ private static Integer parseChunkLength(String 
chLengthKB) throws ConfigurationE
      */
     private static int removeChunkLength(Map<String, String> options)
     {
-        if (options.containsKey(CHUNK_LENGTH_IN_KB))
-        {
-            if (options.containsKey(CHUNK_LENGTH_KB))
+        Integer chunk_length_in_kb = null;
+        String key = null;
+        if (options.containsKey(CHUNK_LENGTH)) {
+            key = CHUNK_LENGTH;
+            String value = options.remove(CHUNK_LENGTH);
+            try
             {
-                throw new ConfigurationException(format("The '%s' option must 
not be used if the chunk length is already specified by the '%s' option",
-                                                        CHUNK_LENGTH_KB,
-                                                        CHUNK_LENGTH_IN_KB));
+                chunk_length_in_kb =  new 
DataStorageSpec.IntKibibytesBound(value).toKibibytes();
+            } catch (IllegalArgumentException e) {

Review Comment:
   nit: braces on newline.



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

Reply via email to