Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][io] Fix the Alluxio sink to write messages successfully after the first file rotation #19247

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

sekikn
Copy link
Contributor

@sekikn sekikn commented Jan 17, 2023

Fixes #19174

Motivation

Currently, the Alluxio sink fails to write messages out after the first file rotation.

Modifications

This problem is caused by improper reuse of the CreateFilePOptions.Builder object. This PR fixes AlluxioSink to instantiate that object for every file creation.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Extend writeAndCloseTest to check subsequent output after the first file rotation.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: sekikn#7

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 17, 2023
@tisonkun tisonkun requested review from tisonkun and murong00 January 18, 2023 08:58
@tisonkun
Copy link
Member

/pulsarbot run-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2023

Codecov Report

Merging #19247 (afd803a) into master (334c3a5) will increase coverage by 2.73%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #19247      +/-   ##
============================================
+ Coverage     47.04%   49.77%   +2.73%     
- Complexity     9190    11588    +2398     
============================================
  Files           607      856     +249     
  Lines         57677    70497   +12820     
  Branches       6007     7583    +1576     
============================================
+ Hits          27132    35092    +7960     
- Misses        27598    31605    +4007     
- Partials       2947     3800     +853     
Flag Coverage Δ
unittests 49.77% <100.00%> (+2.73%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...org/apache/pulsar/io/alluxio/sink/AlluxioSink.java 57.31% <100.00%> (ø)
.../pulsar/broker/service/SharedConsumerAssignor.java 5.55% <0.00%> (-46.30%) ⬇️
...apache/pulsar/broker/service/EntryAndMetadata.java 0.00% <0.00%> (-40.75%) ⬇️
.../apache/pulsar/broker/loadbalance/LoadManager.java 61.11% <0.00%> (-16.67%) ⬇️
...n/java/org/apache/pulsar/broker/service/Topic.java 9.09% <0.00%> (-9.10%) ⬇️
...roker/service/persistent/MessageDeduplication.java 43.23% <0.00%> (-7.43%) ⬇️
...sistent/PersistentDispatcherMultipleConsumers.java 52.82% <0.00%> (-5.13%) ⬇️
...pulsar/broker/service/PulsarCommandSenderImpl.java 75.51% <0.00%> (-4.60%) ⬇️
.../org/apache/pulsar/broker/admin/v2/Namespaces.java 56.50% <0.00%> (-1.49%) ⬇️
...g/apache/pulsar/broker/admin/impl/BrokersBase.java 60.45% <0.00%> (-1.37%) ⬇️
... and 289 more

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@tisonkun
Copy link
Member

Merging...

Thanks for your contribution!

@tisonkun tisonkun merged commit ea4f7eb into apache:master Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connector doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug][io] The Alluxio sink fails to write messages out after the first file rotation
3 participants