smiklosovic commented on code in PR #4699:
URL: https://github.com/apache/cassandra/pull/4699#discussion_r3026508648


##########
src/java/org/apache/cassandra/db/guardrails/Guardrails.java:
##########
@@ -1853,6 +1864,60 @@ public boolean getUnsetTrainingMinFrequencyEnabled()
         return DEFAULT_CONFIG.getUnsetTrainingMinFrequencyEnabled();
     }
 
+    @Override
+    public String getMinimumClientDriverVersionsWarned()
+    {
+        try
+        {
+            return 
JsonUtils.JSON_OBJECT_MAPPER.writeValueAsString(DEFAULT_CONFIG.getMinimumClientDriverVersionsWarned());
+        }
+        catch (Throwable t)
+        {
+            throw new RuntimeException("Unable to serialize 
minimum_client_driver_versions_warned configuration", t);
+        }
+    }
+
+    @Override
+    public String getMinimumClientDriverVersionsDisallowed()
+    {
+        try
+        {
+            return 
JsonUtils.JSON_OBJECT_MAPPER.writeValueAsString(DEFAULT_CONFIG.getMinimumClientDriverVersionsDisallowed());
+        }
+        catch (Throwable t)
+        {
+            throw new RuntimeException("Unable to serialize 
minimum_client_driver_versions_disallowed configuration", t);
+        }
+    }
+
+    @Override
+    public void setMinimumClientDriverVersionsWarned(String value)
+    {
+        try
+        {
+            DEFAULT_CONFIG.setMinimumClientDriverVersionsWarned(
+                    JsonUtils.JSON_OBJECT_MAPPER.readValue(value, new 
TypeReference<Map<String, String>>() {}));
+        }
+        catch (Throwable t)
+        {
+            throw new RuntimeException(t);
+        }
+    }
+
+    @Override
+    public void setMinimumClientDriverVersionsDisallowed(String value)
+    {
+        try
+        {
+            DEFAULT_CONFIG.setMinimumClientDriverVersionsDisallowed(
+                    JsonUtils.JSON_OBJECT_MAPPER.readValue(value, new 
TypeReference<Map<String, String>>() {}));
+        }
+        catch (Throwable t)
+        {
+            throw new RuntimeException(t);
+        }
+    }

Review Comment:
   this is fine, we can address in other patch if really necessary but for now 
it is just about cathing it all and throwing general RTE, yes, we want this. 



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