-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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_parquet fails for hdfs:// files with latest fsspec #50639
Comments
+1 this has a significant impact for us as users of Pandas + HDFS. |
Adding more details. The error message given is the following
|
It looks like fsspec has updated this in 2022.1.0 in PR#1154 to be able to make a read of an pyarrow file seekable, but requires passing the
It is unclear to me how to pass the seekable option to the |
This is fixed on master since fsspec/filesystem_spec#1186 |
Sounds like this was an upstream issue that has been fixed so closing |
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
Issue Description
fsspec has changed the backend for hdfs to use the new filesystem in pyarrow in 2022.10.0. This seems to break compatibility with pandas as this apparently gives back a non seekable file now which pandas expects.
One solution could be to have pandas require
fsspec<=2022.8.2
which is the last version which worked.Another option would be to look upstream to fsspec and have them guarantee a seekable filehandle.
A third would be to modify the pandas reader to detect a non seekable filehandle and buffer the file.
Expected Behavior
read_parquet should continue to work with hdfs remote files as it did with earlier versions of the fsspec dependency
Installed Versions
INSTALLED VERSIONS
commit : 8dab54d
python : 3.8.13.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-77-generic
Version : #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.5.2
numpy : 1.24.1
pytz : 2022.7
dateutil : 2.8.2
setuptools : 51.3.3
pip : 20.3.4
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.26.0
pandas_datareader: None
bs4 : None
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2022.11.0
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 10.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: