Set 0 to pyarrow.fs.HadoopFileSystem
port in v2 API to make it consistent to the v1 API behavior
#225
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the v2 API, it fails to connect to HDFS whereas v1 (legacy API) is fine.
The v1 API uses the pyarrow deprecated function pyarrow.hdfs.connect, while v2 uses the new recommended one pyarrow.fs.HadoopFileSystem.
In both API, pfio doesn't explicitly specify port number, however
hdfs.connect
uses0
for the defaultport
, butfs.HadoopFileSystem
sets8020
. I found that this mismatch causes the issue where pfio+HDFS works with v1 but doesn't work with v2.If I modify the v2 API to explicitly specfy 0 to the port argument when instantiating
pyarrow.fs.HadoopFileSystem
, it seems to work as expected.This PR proposes to introduce this change.
I guess this change should be related to how the storage environment is set up, so if there's a better way to configure port, please let me know.