This is an automated email from the ASF dual-hosted git repository.
jgus pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new a3aea3c MINOR: Fixed clusterId reference in Metadata.update (#4360)
a3aea3c is described below
commit a3aea3cf4dbedb293f2d7859e0298bebc8e2185f
Author: Satish Duggana <[email protected]>
AuthorDate: Thu Dec 28 23:51:43 2017 +0530
MINOR: Fixed clusterId reference in Metadata.update (#4360)
Also fixed log message with respective error in KerberosLogin.login.
Reviewers: Jason Gustafson <[email protected]>
---
.../java/org/apache/kafka/clients/Metadata.java | 22 +++++++++++-----------
.../common/security/kerberos/KerberosLogin.java | 5 ++---
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/clients/src/main/java/org/apache/kafka/clients/Metadata.java
b/clients/src/main/java/org/apache/kafka/clients/Metadata.java
index 3b8c18a..b1da9de 100644
--- a/clients/src/main/java/org/apache/kafka/clients/Metadata.java
+++ b/clients/src/main/java/org/apache/kafka/clients/Metadata.java
@@ -217,13 +217,13 @@ public final class Metadata {
* Updates the cluster metadata. If topic expiry is enabled, expiry time
* is set for topics if required and expired topics are removed from the
metadata.
*
- * @param cluster the cluster containing metadata for topics with valid
metadata
+ * @param newCluster the cluster containing metadata for topics with valid
metadata
* @param unavailableTopics topics which are non-existent or have one or
more partitions whose
* leader is not known
* @param now current time in milliseconds
*/
- public synchronized void update(Cluster cluster, Set<String>
unavailableTopics, long now) {
- Objects.requireNonNull(cluster, "cluster should not be null");
+ public synchronized void update(Cluster newCluster, Set<String>
unavailableTopics, long now) {
+ Objects.requireNonNull(newCluster, "cluster should not be null");
this.needUpdate = false;
this.lastRefreshMs = now;
@@ -245,7 +245,7 @@ public final class Metadata {
}
for (Listener listener: listeners)
- listener.onMetadataUpdate(cluster, unavailableTopics);
+ listener.onMetadataUpdate(newCluster, unavailableTopics);
String previousClusterId = cluster.clusterResource().clusterId();
@@ -253,17 +253,17 @@ public final class Metadata {
// the listener may change the interested topics, which could
cause another metadata refresh.
// If we have already fetched all topics, however, another fetch
should be unnecessary.
this.needUpdate = false;
- this.cluster = getClusterForCurrentTopics(cluster);
+ this.cluster = getClusterForCurrentTopics(newCluster);
} else {
- this.cluster = cluster;
+ this.cluster = newCluster;
}
// The bootstrap cluster is guaranteed not to have any useful
information
- if (!cluster.isBootstrapConfigured()) {
- String clusterId = cluster.clusterResource().clusterId();
- if (clusterId == null ? previousClusterId != null :
!clusterId.equals(previousClusterId))
- log.info("Cluster ID: {}",
cluster.clusterResource().clusterId());
- clusterResourceListeners.onUpdate(cluster.clusterResource());
+ if (!newCluster.isBootstrapConfigured()) {
+ String newClusterId = newCluster.clusterResource().clusterId();
+ if (newClusterId == null ? previousClusterId != null :
!newClusterId.equals(previousClusterId))
+ log.info("Cluster ID: {}", newClusterId);
+ clusterResourceListeners.onUpdate(newCluster.clusterResource());
}
notifyAll();
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 a0aad54..b43d3b0 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
@@ -218,9 +218,8 @@ public class KerberosLogin extends AbstractLogin {
return;
}
} else {
- log.warn("[Principal={}]: Could not renew
TGT due to problem running shell command: '{} {}'; " +
- "exception was: %s. Exiting
refresh thread.",
- principal, kinitCmd, kinitArgs, e,
e);
+ log.warn("[Principal={}]: Could not renew
TGT due to problem running shell command: '{} {}'. " +
+ "Exiting refresh thread.",
principal, kinitCmd, kinitArgs, e);
return;
}
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].