Repository navigation
Fewer open files - #7303
Fewer open files#7303
Conversation
| else: | ||
| for piece, fn in zip(dataset.pieces, fns): | ||
| md = piece.get_metadata() | ||
| md = cls.collect_file_metadata(piece.path, fs, None) |
There was a problem hiding this comment.
@rjzamora it sounds like you have a better solution for this upstream?
There was a problem hiding this comment.
Maybe you are referring to #7295 ? (Which fixes a different problem with the create_metadata_file code path)
There was a problem hiding this comment.
ah ok. So does this seem like a reasonable solution? The issue was that pyarrow was doing fs.open in get_metadata and then never closing.
There was a problem hiding this comment.
Ah, that makes sense. In that case, this looks like a good solution - Thanks for addressing this!
The only other change that might make sense is to take advantage of the fact that collect_file_metadata can handle the set_file_path update if we pass fn as the last argument. The one complication is that we would need to pass piece.path.replace(base + fs.sep, "") in the case that fn_partitioned is True. I don't feel strongly one way or the other, but if you use collect_file_metadata for the file-path update, you can remove the set_file_path logic below.
0b95dc0 to
ebc44d6
Compare
|
@jsignell a lot of these failing tests look like they might be solved with fsspec/filesystem_spec#630 Right now the legacy pyarrow tests are trying to push a |
|
All the other local test failures seemed to be resolved easily by merging the main branch. I can't push to your branch, but if you merge main I think that will help. |
|
fsspec/filesystem_spec#630 is merged. After the next |
|
I took out the arrow bit for now. So this is only a partial fix, but uncontroversialal |
black dask/flake8 dask