From db0b78ab2737c0d72ff172f94ed8f7732150f687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Saint-Jacques?= Date: Fri, 11 Oct 2013 14:54:45 -0400 Subject: [PATCH] Validate properties for custom serializers We use specifics encoder/decoder for our producers/consumers, they get correctly initialized by the Producer/Consumer. The only downside is the validate() function of VerifiableProperties that pollutes our log stream. This patch allows custom serializers keys to validate correctly if they begin with the "external" prefix, for example: external.my.encoder.param=true will not raise a WARN. --- core/src/main/scala/kafka/utils/VerifiableProperties.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/scala/kafka/utils/VerifiableProperties.scala b/core/src/main/scala/kafka/utils/VerifiableProperties.scala index a288ad5..b070bb4 100644 --- a/core/src/main/scala/kafka/utils/VerifiableProperties.scala +++ b/core/src/main/scala/kafka/utils/VerifiableProperties.scala @@ -200,7 +200,7 @@ class VerifiableProperties(val props: Properties) extends Logging { Collections.list(props.propertyNames).map(_.toString).sorted } for(key <- propNames) { - if (!referenceSet.contains(key)) + if (!referenceSet.contains(key) && !key.startsWith("external")) warn("Property %s is not valid".format(key)) else info("Property %s is overridden to %s".format(key, props.getProperty(key))) -- 1.7.10.2 (Apple Git-33)