You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ew...@apache.org on 2018/06/17 05:35:31 UTC

[kafka] branch 1.1 updated: KAFKA-7047: Added SimpleHeaderConverter to plugin isolation whitelist

This is an automated email from the ASF dual-hosted git repository.

ewencp pushed a commit to branch 1.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/1.1 by this push:
     new bca1eaf  KAFKA-7047: Added SimpleHeaderConverter to plugin isolation whitelist
bca1eaf is described below

commit bca1eaff8c8c2fb55952c66be70dce34f88461c0
Author: Randall Hauch <rh...@gmail.com>
AuthorDate: Sat Jun 16 22:23:20 2018 -0700

    KAFKA-7047: Added SimpleHeaderConverter to plugin isolation whitelist
    
    This was originally missed when headers were added as part of KIP-145 in AK 1.1. An additional unit test was added in line with the StringConverter.
    
    This should be backported to the AK `1.1` branch so that it is included in the next bugfix release. The `SimpleHeaderConverter` class that we're referencing was first added in the 1.1.0 release, so there's no reason to backport earlier.
    
    Author: Randall Hauch <rh...@gmail.com>
    
    Reviewers: Ewen Cheslack-Postava <ew...@confluent.io>
    
    Closes #5204 from rhauch/kafka-7047
---
 .../java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java   | 1 +
 .../org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java    | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java
index d490bde..182cdfc 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java
@@ -128,6 +128,7 @@ public class PluginUtils {
             + "|file\\..*"
             + "|converters\\..*"
             + "|storage\\.StringConverter"
+            + "|storage\\.SimpleHeaderConverter"
             + ")$";
 
     private static final DirectoryStream.Filter<Path> PLUGIN_PATH_FILTER = new DirectoryStream
diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java
index 4bc6e15..7233c6c 100644
--- a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java
+++ b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/isolation/PluginUtilsTest.java
@@ -146,6 +146,9 @@ public class PluginUtilsTest {
         assertTrue(PluginUtils.shouldLoadInIsolation(
                 "org.apache.kafka.connect.storage.StringConverter")
         );
+        assertTrue(PluginUtils.shouldLoadInIsolation(
+                "org.apache.kafka.connect.storage.SimpleHeaderConverter")
+        );
     }
 
     @Test

-- 
To stop receiving notification emails like this one, please contact
ewencp@apache.org.