[
https://issues.apache.org/jira/browse/FLINK-32327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17737781#comment-17737781
]
Chesnay Schepler commented on FLINK-32327:
------------------------------------------
Only the kafka python tests are failing.
{code}
Jun 15 12:16:11 =========================== short test summary info
============================
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_compile
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_set_bootstrap_severs
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_set_delivery_guarantee
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_set_property
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_set_record_serializer
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaSinkTests::test_set_transactional_id_prefix
Jun 15 12:16:11 FAILED
pyflink/datastream/connectors/tests/test_kafka.py::KafkaRecordSerializationSchemaTests::test_set_topic_selector
{code}
> Python Kafka connector runs into strange NullPointerException
> -------------------------------------------------------------
>
> Key: FLINK-32327
> URL: https://issues.apache.org/jira/browse/FLINK-32327
> Project: Flink
> Issue Type: Sub-task
> Components: API / Python
> Reporter: Chesnay Schepler
> Priority: Major
>
> The following error occurs when running the python kafka tests:
> (this uses a slightly modified version of the code, but the error also
> happens without it)
> {code:python}
> def set_record_serializer(self, record_serializer:
> 'KafkaRecordSerializationSchema') \
> -> 'KafkaSinkBuilder':
> """
> Sets the :class:`KafkaRecordSerializationSchema` that transforms
> incoming records to kafka
> producer records.
>
> :param record_serializer: The
> :class:`KafkaRecordSerializationSchema`.
> """
> # NOTE: If topic selector is a generated first-column selector, do
> extra preprocessing
> j_topic_selector =
> get_field_value(record_serializer._j_serialization_schema,
> 'topicSelector')
>
> caching_name_suffix =
> 'KafkaRecordSerializationSchemaBuilder.CachingTopicSelector'
> if
> j_topic_selector.getClass().getCanonicalName().endswith(caching_name_suffix):
> class_name = get_field_value(j_topic_selector, 'topicSelector')\
> .getClass().getCanonicalName()
> > if class_name.startswith('com.sun.proxy') or
> class_name.startswith('jdk.proxy'):
> E AttributeError: 'NoneType' object has no attribute 'startswith'
> {code}
> My assumption is that {{getCanonicalName}} returns {{null}} for some objects,
> and this set of objects may have increased in Java 17. I tried adding a null
> check, but that caused other tests to fail.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)