Skip to content

KAFKA-10050: kafka_log4j_appender.py fixed for JDK11#8731

Merged
ijuma merged 2 commits intoapache:trunkfrom
nizhikov:KAFKA-10050
May 28, 2020
Merged

KAFKA-10050: kafka_log4j_appender.py fixed for JDK11#8731
ijuma merged 2 commits intoapache:trunkfrom
nizhikov:KAFKA-10050

Conversation

@nizhikov
Copy link
Copy Markdown
Contributor

kafka_log4j_appender.py broken on JDK11 by #befd80b38d3ccb1aa0c6d99a899129fd5cf27774
This fix just setup node version for log4j appender.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@nizhikov
Copy link
Copy Markdown
Contributor Author

Hello, @ijuma

I found that kafka_log4j_appender.py broken for JDK11.
This was broken by my patch - befd80b

I've prepared oneliner fix

Can you, please, take a look?

@ijuma
Copy link
Copy Markdown
Member

ijuma commented May 27, 2020

Thanks for the PR. Can you elaborate how the original change broke it? I don't see anything obviously related.

@nizhikov
Copy link
Copy Markdown
Contributor Author

nizhikov commented May 27, 2020

I added call of fix_opts_for_new_jvm here.

But node variable for kafka_log4j_appender.py don't have an attribute 'version'.
The fix just adds this attribute from the corresponding Kafka version.

  File "/opt/kafka-dev/tests/kafkatest/services/kafka_log4j_appender.py", line 48, in start_cmd
    cmd = fix_opts_for_new_jvm(node)
  File "/opt/kafka-dev/tests/kafkatest/services/kafka/util.py", line 36, in fix_opts_for_new_jvm
    if node.version == LATEST_0_8_2 or node.version == LATEST_0_9 or node.version == LATEST_0_10_0 or node.version == LATEST_0_10_1 or node.version == LATEST_0_10_2 or node.version == LATEST_0_11_0 or node.version == LATEST_1_0:
AttributeError: 'ClusterNode' object has no attribute 'version'

Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, LGTM.

@ijuma ijuma merged commit 2951b6d into apache:trunk May 28, 2020
Kvicii pushed a commit to Kvicii/kafka that referenced this pull request May 30, 2020
* 'trunk' of github.com:apache/kafka: (36 commits)
  Remove redundant `containsKey` call in KafkaProducer (apache#8761)
  KAFKA-9494; Include additional metadata information in DescribeConfig response (KIP-569) (apache#8723)
  KAFKA-10061; Fix flaky `ReassignPartitionsIntegrationTest.testCancellation` (apache#8749)
  KAFKA-9130; KIP-518 Allow listing consumer groups per state (apache#8238)
  KAFKA-9501: convert between active and standby without closing stores (apache#8248)
  KAFKA-10056; Ensure consumer metadata contains new topics on subscription change (apache#8739)
  MINOR: Log the reason for coordinator discovery failure (apache#8747)
  KAFKA-10029; Don't update completedReceives when channels are closed to avoid ConcurrentModificationException (apache#8705)
  MINOR: remove unnecessary timeout for admin request (apache#8738)
  MINOR: Relax Percentiles test (apache#8748)
  MINOR: regression test for task assignor config (apache#8743)
  MINOR: Update documentation.html to refer to 2.6 (apache#8745)
  MINOR: Update documentation.html to refer to 2.5 (apache#8744)
  KAFKA-9673: Filter and Conditional SMTs (apache#8699)
  KAFKA-9971: Error Reporting in Sink Connectors (KIP-610) (apache#8720)
  KAFKA-10052: Harden assertion of topic settings in Connect integration tests (apache#8735)
  MINOR: Slight MetadataCache tweaks to avoid unnecessary work (apache#8728)
  KAFKA-9802; Increase transaction timeout in system tests to reduce flakiness (apache#8736)
  KAFKA-10050: kafka_log4j_appender.py fixed for JDK11 (apache#8731)
  KAFKA-9146: Add option to force delete active members in StreamsResetter (apache#8589)
  ...

# Conflicts:
#	core/src/main/scala/kafka/log/Log.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants