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

BUG: Read hdfs:/// is broken since 2.1.0 #58078

Open
3 tasks done
yli7-bloomberg opened this issue Mar 29, 2024 · 0 comments
Open
3 tasks done

BUG: Read hdfs:/// is broken since 2.1.0 #58078

yli7-bloomberg opened this issue Mar 29, 2024 · 0 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@yli7-bloomberg
Copy link

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas as pd
filename ='hdfs:///dir/file1'
df = pd.read_parquet(filename) # This will fail, as pa_fs.FileSystem.from_uri(path) does not like hdfs:///, it wants hdfs://host_name/ instead. This will lead to error in bad URI format. 
df = pd.read_parquet(filename, storage_options={}) # This will go through, as fsspec.core.url_to_fs understands hdfs:///

Issue Description

0359f17?diff=split&w=0

The above change from 2.1.0, which uses pyarrow fs instead of fsspec seems introduced the problem above. And by reading the code, you can force it to the same old behavior by passing in empty storage_options

Expected Behavior

file with hdfs:/// can be load properly.

Installed Versions

INSTALLED VERSIONS

commit : ba1cccd
python : 3.9.18.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-150-generic
Version : #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None

pandas : 2.1.0
numpy : 1.26.1
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 63.4.3
pip : 22.2.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.3
IPython : 7.34.0
pandas_datareader : None
bs4 : None
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : 2023.10.0
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 14.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2023.10.0
scipy : None
sqlalchemy : 1.4.46
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None

@yli7-bloomberg yli7-bloomberg added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

1 participant