(request, hdfs_connection)
| 339 | |
| 340 | @pytest.fixture |
| 341 | def hdfs(request, hdfs_connection): |
| 342 | request.config.pyarrow.requires('hdfs') |
| 343 | if not pa.have_libhdfs(): |
| 344 | pytest.skip('Cannot locate libhdfs') |
| 345 | |
| 346 | from pyarrow.fs import HadoopFileSystem |
| 347 | |
| 348 | host, port, user = hdfs_connection |
| 349 | fs = HadoopFileSystem(host, port=port, user=user) |
| 350 | |
| 351 | return dict( |
| 352 | fs=fs, |
| 353 | pathfn=lambda p: p, |
| 354 | allow_move_dir=True, |
| 355 | allow_append_to_file=True, |
| 356 | ) |
| 357 | |
| 358 | |
| 359 | @pytest.fixture |