-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 Alluxio sink to respect the alluxioMasterHost property #19172
[fix][io] Fix Alluxio sink to respect the alluxioMasterHost property #19172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
thanks
/pulsarbot rerun-failure-checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! +1 to merge
Codecov Report
@@ Coverage Diff @@
## master #19172 +/- ##
============================================
+ Coverage 47.22% 47.40% +0.17%
+ Complexity 10713 9503 -1210
============================================
Files 713 633 -80
Lines 69697 59892 -9805
Branches 7485 6239 -1246
============================================
- Hits 32914 28391 -4523
+ Misses 33096 28383 -4713
+ Partials 3687 3118 -569
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Interesting. I'm trying to execute the test locally but always get:
It seems Alluxio 2.7.3 doesn't support Apple M1 chip and thus the case. |
Merging... |
Motivation
Currently, the Alluxio sink always refers to localhost regardless of the
alluxioMasterHost
property.Suppose we have a local Pulsar cluster (192.168.2.2) and a remote Alluxio cluster (192.168.33.10), as follows:
Build the Alluxio sink on the master branch and deploy it to the local Pulsar:
Enable the Alluxio sink and ingest some messages into the topic in question:
As the error messages indicate, the Alluxio sink tried to access the local address (192.168.2.2), in spite of the value of
alluxioMasterHost
(192.168.33.10).Modifications
The reason of this behavior is in the following line.
https://github.com/apache/pulsar/blob/master/pulsar-io/alluxio/src/main/java/org/apache/pulsar/io/alluxio/sink/AlluxioSink.java#L95
The value of
alluxioMasterHost
is set to the default configuration in that line, but the configuration object which is really used to createFileSystem
is already instantiated before it, so it's ineffective.https://github.com/apache/pulsar/blob/master/pulsar-io/alluxio/src/main/java/org/apache/pulsar/io/alluxio/sink/AlluxioSink.java#L100
This PR fixes this wrong implementation.
Verifying this change
I manually ensured that the ingested messages were output as an Alluxio file with this PR, as follows:
Before ingesting messages:
During ingestion:
After ingestion:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: sekikn#5
A few tests failed, but all of them seem to be unrelated to this fix.