Browse Source

KAFKA-7043: Modified plugin isolation whitelist with recently added converters (KIP-305)

Several recently-added converters are included in the plugin isolation whitelist, similarly to the `StringConverter`. This is a change in the implementation, and does not affect the approved KIP. Several unit tests were added to verify they are being loaded in isolation, again similarly to `StringConverter`.

These changes should be applied only to `trunk` and `2.0`, since these converters were added as part of KIP-305 for AK 2.0.

Author: Randall Hauch <rhauch@gmail.com>

Reviewers: Magesh Nandakumar <magesh.n.kumar@gmail.com>, Konstantine Karantasis <konstantine@confluent.io>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5198 from rhauch/kafka-7043
pull/4782/merge
Randall Hauch 7 years ago committed by Ewen Cheslack-Postava
parent
commit
22356d55ef
  1. 5
      connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java
  2. 15
      connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java

5
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java

@ -127,6 +127,11 @@ public class PluginUtils { @@ -127,6 +127,11 @@ public class PluginUtils {
+ "|json\\..*"
+ "|file\\..*"
+ "|converters\\..*"
+ "|storage\\.DoubleConverter"
+ "|storage\\.FloatConverter"
+ "|storage\\.IntegerConverter"
+ "|storage\\.LongConverter"
+ "|storage\\.ShortConverter"
+ "|storage\\.StringConverter"
+ "|rest\\.basic\\.auth\\.extension\\.BasicAuthSecurityRestExtension"
+ ")"

15
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java

@ -146,6 +146,21 @@ public class PluginUtilsTest { @@ -146,6 +146,21 @@ public class PluginUtilsTest {
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.converters.ByteArrayConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.DoubleConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.FloatConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.IntegerConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.LongConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.ShortConverter")
);
assertTrue(PluginUtils.shouldLoadInIsolation(
"org.apache.kafka.connect.storage.StringConverter")
);

Loading…
Cancel
Save