kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject kafka git commit: KAFKA-4375; Reset interrupt state in a few places where InterruptedException is caught
Date Fri, 09 Dec 2016 19:36:40 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 36528df08 -> 9684487b4


KAFKA-4375; Reset interrupt state in a few places where InterruptedException is caught

See https://issues.apache.org/jira/browse/KAFKA-4375

Author: Stig Rohde Døssing <sdo@it-minds.dk>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #2100 from srdo/KAFKA-4375


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/9684487b
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/9684487b
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/9684487b

Branch: refs/heads/trunk
Commit: 9684487b43234b0800d31f689bde48422b7faf87
Parents: 36528df
Author: Stig Rohde Døssing <sdo@it-minds.dk>
Authored: Fri Dec 9 11:18:34 2016 -0800
Committer: Jason Gustafson <jason@confluent.io>
Committed: Fri Dec 9 11:18:38 2016 -0800

----------------------------------------------------------------------
 clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java  | 1 +
 .../org/apache/kafka/common/security/kerberos/KerberosLogin.java    | 1 +
 clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java | 1 +
 clients/src/main/java/org/apache/kafka/common/utils/Utils.java      | 1 +
 4 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9684487b/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java b/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java
index 78dad18..8beb107 100644
--- a/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java
+++ b/clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java
@@ -433,6 +433,7 @@ public class Metrics implements Closeable {
                 this.metricsScheduler.awaitTermination(30, TimeUnit.SECONDS);
             } catch (InterruptedException ex) {
                 // ignore and continue shutdown
+                Thread.currentThread().interrupt();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/9684487b/clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosLogin.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosLogin.java
b/clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosLogin.java
index 48f9f93..63112e9 100644
--- a/clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosLogin.java
+++ b/clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosLogin.java
@@ -276,6 +276,7 @@ public class KerberosLogin extends AbstractLogin {
                 t.join();
             } catch (InterruptedException e) {
                 log.warn("Error while waiting for Login thread to shutdown: " + e, e);
+                Thread.currentThread().interrupt();
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/kafka/blob/9684487b/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java b/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java
index 1e32c6c..d331f9a 100644
--- a/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java
+++ b/clients/src/main/java/org/apache/kafka/common/utils/SystemTime.java
@@ -45,6 +45,7 @@ public class SystemTime implements Time {
             Thread.sleep(ms);
         } catch (InterruptedException e) {
             // just wake up early
+            Thread.currentThread().interrupt();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/9684487b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
index 3cd80c4..c3c1045 100755
--- a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
+++ b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java
@@ -303,6 +303,7 @@ public class Utils {
             Thread.sleep(ms);
         } catch (InterruptedException e) {
             // this is okay, we just wake up early
+            Thread.currentThread().interrupt();
         }
     }
 


Mime
View raw message