You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/03/22 20:31:32 UTC

[kafka] branch 2.0 updated (6310496 -> 67ff477)

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

kkarantasis pushed a change to branch 2.0
in repository https://gitbox.apache.org/repos/asf/kafka.git.


    from 6310496  KAFKA-9601: Stop logging raw connector config values (#8165)
     new 6f01213  MINOR: Update Connect error message to point to the correct config validation REST endpoint (#7991)
     new 67ff477  KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/kafka/common/config/provider/ConfigProvider.java    | 1 +
 .../src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java  | 2 +-
 .../apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)


[kafka] 02/02: KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)

Posted by kk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 67ff4776b2202dbde0ff9eb45b5d4413994572d7
Author: Tom Bentley <to...@users.noreply.github.com>
AuthorDate: Sun Mar 22 19:58:21 2020 +0000

    KAFKA-9634: Add note about thread safety in the ConfigProvider interface (#8205)
    
    In Kafka Connect, a ConfigProvider instance can be used concurrently (e.g. via a PUT request to the `/connector-plugins/{connectorType}/config/validate` REST endpoint), but there is no mention of concurrent usage in the Javadocs of the ConfigProvider interface.
    
    It's worth calling out that implementations need to be thread safe.
    
    Reviewers: Konstantine Karantasis <ko...@confluent.io>
---
 .../java/org/apache/kafka/common/config/provider/ConfigProvider.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java b/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
index 8561511..fe65ddf 100644
--- a/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
+++ b/clients/src/main/java/org/apache/kafka/common/config/provider/ConfigProvider.java
@@ -25,6 +25,7 @@ import java.util.Set;
 
 /**
  * A provider of configuration data, which may optionally support subscriptions to configuration changes.
+ * Implementations are required to safely support concurrent calls to any of the methods in this interface.
  */
 public interface ConfigProvider extends Configurable, Closeable {
 


[kafka] 01/02: MINOR: Update Connect error message to point to the correct config validation REST endpoint (#7991)

Posted by kk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6f0121339053acc8506ba6ab606094161f7f0692
Author: nicolasguyomar <ni...@gmail.com>
AuthorDate: Sun Mar 22 20:42:45 2020 +0100

    MINOR: Update Connect error message to point to the correct config validation REST endpoint (#7991)
    
    When incorrect connector configuration is detected, the returned exception message suggests to check the connector's configuration against the `{connectorType}/config/validate` endpoint.
    
    Changing the error message to refer to the exact REST endpoint which is `/connector-plugins/{connectorType}/config/validate`
    
    This aligns the exception message with the documentation at: https://kafka.apache.org/documentation/#connect_rest
    
    Reviewers: Konstantine Karantasis <ko...@confluent.io>
---
 .../src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java  | 2 +-
 .../apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
index 106b788..579f74d 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java
@@ -419,7 +419,7 @@ public abstract class AbstractHerder implements Herder, TaskStatus.Listener, Con
             callback.onCompletion(
                 new BadRequestException(
                     messages.append(
-                        "\nYou can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
+                        "\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
                     ).toString()
                 ), null
             );
diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
index a23ee10..00ae675 100644
--- a/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
+++ b/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerderTest.java
@@ -608,7 +608,7 @@ public class StandaloneHerderTest {
             capture.getValue().getMessage(),
             "Connector configuration is invalid and contains the following 1 error(s):\n" +
                 error + "\n" +
-                "You can also find the above list of errors at the endpoint `/{connectorType}/config/validate`"
+                "You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
         );
 
         PowerMock.verifyAll();