From 0d4979794dd219ccb5c6b42098450ab554abacd9 Mon Sep 17 00:00:00 2001 From: Eric Marnadi Date: Thu, 7 Nov 2024 14:58:31 -0800 Subject: [PATCH] adding jsonignore filter back --- .../spark/sql/pulsar/PulsarConfigurationUtils.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/scala/org/apache/spark/sql/pulsar/PulsarConfigurationUtils.scala b/src/main/scala/org/apache/spark/sql/pulsar/PulsarConfigurationUtils.scala index 621d21c..39c1386 100644 --- a/src/main/scala/org/apache/spark/sql/pulsar/PulsarConfigurationUtils.scala +++ b/src/main/scala/org/apache/spark/sql/pulsar/PulsarConfigurationUtils.scala @@ -18,17 +18,15 @@ import java.util.Locale import scala.reflect._ -import org.apache.pulsar.client.impl.conf.{ - ClientConfigurationData, - ProducerConfigurationData, - ReaderConfigurationData -} +import com.fasterxml.jackson.annotation.JsonIgnore +import org.apache.pulsar.client.impl.conf.{ClientConfigurationData, ProducerConfigurationData, ReaderConfigurationData} object PulsarConfigurationUtils { private def nonIgnoredFields[T: ClassTag] = { classTag[T].runtimeClass.getDeclaredFields .filter(f => !Modifier.isStatic(f.getModifiers)) + .filter(f => f.getDeclaredAnnotation(classOf[JsonIgnore]) == null) .map(_.getName) }