You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rh...@apache.org on 2019/05/16 03:13:45 UTC

[kafka] branch 2.0 updated (765ebf6 -> 58e6f0d)

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

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


    from 765ebf6  KAFKA-8363: Fix parsing bug for config providers (#6726)
     new 0dee89e  KAFKA-8320 : fix retriable exception package for source connectors (#6675)
     new 58e6f0d  MINOR: Enable console logs in Connect tests (#6745)

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/connect/runtime/WorkerSourceTask.java    | 6 +++---
 connect/runtime/src/test/resources/log4j.properties                | 7 +++++--
 2 files changed, 8 insertions(+), 5 deletions(-)


[kafka] 02/02: MINOR: Enable console logs in Connect tests (#6745)

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

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

commit 58e6f0d3ff4c5c2d03249a9207667c3201415153
Author: Konstantine Karantasis <ko...@confluent.io>
AuthorDate: Wed May 15 20:05:52 2019 -0700

    MINOR: Enable console logs in Connect tests (#6745)
    
    Author: Konstantine Karantasis <ko...@confluent.io>
    Reviewer: Randall Hauch <rh...@gmail.com>
---
 connect/runtime/src/test/resources/log4j.properties | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/connect/runtime/src/test/resources/log4j.properties b/connect/runtime/src/test/resources/log4j.properties
index 1feedb8..a396aee 100644
--- a/connect/runtime/src/test/resources/log4j.properties
+++ b/connect/runtime/src/test/resources/log4j.properties
@@ -14,11 +14,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ##
-log4j.rootLogger=OFF, stdout
+log4j.rootLogger=INFO, stdout
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d] (%t) %p %m (%c:%L)%n
 
 log4j.logger.org.reflections=ERROR
-log4j.logger.org.apache.kafka=ERROR
+log4j.logger.kafka=WARN
+log4j.logger.org.apache.kafka.connect=DEBUG
+log4j.logger.org.apache.kafka.connect.runtime.distributed=DEBUG
+log4j.logger.org.apache.kafka.connect.integration=DEBUG


[kafka] 01/02: KAFKA-8320 : fix retriable exception package for source connectors (#6675)

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

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

commit 0dee89ed13faa04a0ebb00ae3f80355d6ee32066
Author: Magesh Nandakumar <ma...@gmail.com>
AuthorDate: Wed May 15 15:20:20 2019 -0700

    KAFKA-8320 : fix retriable exception package for source connectors (#6675)
    
    WorkerSourceTask is catching the exception from wrong package org.apache.kafka.common.errors. It is not clear from the API standpoint as to which package the connect framework supports - the one from common or connect. The safest thing would be to support both the packages even though it's less desirable.
    
    Author: Magesh Nandakumar <ma...@gmail.com>
    Reviewers: Arjun Satish <ar...@confluent.io>, Randall Hauch <rh...@gmail.com>
---
 .../java/org/apache/kafka/connect/runtime/WorkerSourceTask.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
index 623a210..14f71a5 100644
--- a/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
+++ b/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
@@ -21,7 +21,6 @@ import org.apache.kafka.clients.producer.KafkaProducer;
 import org.apache.kafka.clients.producer.ProducerRecord;
 import org.apache.kafka.clients.producer.RecordMetadata;
 import org.apache.kafka.common.KafkaException;
-import org.apache.kafka.common.errors.RetriableException;
 import org.apache.kafka.common.header.internals.RecordHeaders;
 import org.apache.kafka.common.metrics.Sensor;
 import org.apache.kafka.common.metrics.stats.Avg;
@@ -31,6 +30,7 @@ import org.apache.kafka.common.metrics.stats.Total;
 import org.apache.kafka.common.metrics.stats.Value;
 import org.apache.kafka.common.utils.Time;
 import org.apache.kafka.connect.errors.ConnectException;
+import org.apache.kafka.connect.errors.RetriableException;
 import org.apache.kafka.connect.header.Header;
 import org.apache.kafka.connect.header.Headers;
 import org.apache.kafka.connect.runtime.ConnectMetrics.MetricGroup;
@@ -242,7 +242,7 @@ class WorkerSourceTask extends WorkerTask {
     protected List<SourceRecord> poll() throws InterruptedException {
         try {
             return task.poll();
-        } catch (RetriableException e) {
+        } catch (RetriableException | org.apache.kafka.common.errors.RetriableException e) {
             log.warn("{} failed to poll records from SourceTask. Will retry operation.", this, e);
             // Do nothing. Let the framework poll whenever it's ready.
             return null;
@@ -340,7 +340,7 @@ class WorkerSourceTask extends WorkerTask {
                             }
                         });
                 lastSendFailed = false;
-            } catch (RetriableException e) {
+            } catch (org.apache.kafka.common.errors.RetriableException e) {
                 log.warn("{} Failed to send {}, backing off before retrying:", this, producerRecord, e);
                 toSend = toSend.subList(processed, toSend.size());
                 lastSendFailed = true;