Skip to content

HDFS CI failing  #8018

Closed
Closed

Description

@jsignell

There is a new failure on hdfs ci

___________________ ERROR at setup of test_read_text_unicode ___________________

request = <SubRequest 'hdfs' for <Function test_read_text_unicode>>

    @pytest.fixture
    def hdfs(request):
>       _maybe_set_hadoop_classpath()
E       NameError: name '_maybe_set_hadoop_classpath' is not defined

dask/bytes/tests/test_hdfs.py:39: NameError

https://github.com/dask/dask/runs/3291151260 for instance

@martindurant

Activity

  1. martindurant commented on Aug 10, 2021

    @martindurant
    Member

    Is this definitely happening in a run that is supposed to execute HDFS tests?

    If the import fail, it looks like all the tests should be skipped, but maybe not.

    @jorisvandenbossche , did a recent change in pyarrow remove pyarrow.[_]hdfs._maybe_set_hadoop_classpath ? Is there an alternative? I recall we had a problem just calling HadoopFileSystem() directly without explicit _connect().

  2. jorisvandenbossche commented on Aug 10, 2021

    @jorisvandenbossche
    Member

    I think the tests are not properly skipped. There is

    require_pyarrow = pytest.mark.skipif(not pyarrow, reason="pyarrow not installed")

    but it's only applied to a single test that uses pyarrow directly. But all other tests also require pyarrow.

    (which doesn't explain why it only started to fail now of course)

  3. jorisvandenbossche commented on Aug 10, 2021

    @jorisvandenbossche
    Member

    And the build seems to use pyarrow 0.15, which has https://github.com/apache/arrow/blob/apache-arrow-0.15.1/python/pyarrow/hdfs.py. So it has both _maybe_set_hadoop_classpath and connect in a pyarrow.hdfs module, but that combination doesn't seem to be available in the try/except import sequence at

    try:
    from pyarrow.hdfs import _connect, _maybe_set_hadoop_classpath
    except ImportError:
    try:
    from pyarrow._hdfs import _maybe_set_hadoop_classpath
    from pyarrow._hdfs import connect as _connect
    except ImportError:
    pyarrow = False

  4. martindurant commented on Aug 10, 2021

    @martindurant
    Member

    How about the following:

    try:
        from pyarrow.hdfs import _maybe_set_hadoop_classpath
        phd = pyarrow.hdfs
    except ImportError:
        try:
            from pyarrow._hdfs import _maybe_set_hadoop_classpath
            phd = pyarrow._hdfs
        except ImportError:
            pyarrow = False
    
    try:
        _connect = phd._connect
    except AttributeError:
        try:
            _connect = phd.connect
        except AttributeError
            pyarrow = False
    
    basedir = "/tmp/test-dask"
    
    
    # This mark doesn't check the minimum pyarrow version.
    require_pyarrow = pytest.mark.skipif(not pyarrow, reason="pyarrow not installed")
    
    
    @pytest.fixture
    @require_pyarrow
    def hdfs(request):
        _maybe_set_hadoop_classpath()
        ...
  5. jorisvandenbossche commented on Aug 10, 2021

    @jorisvandenbossche
    Member

    Do you know for which version the pyarrow._hdfs is actually needed?

  6. martindurant commented on Aug 10, 2021

    @martindurant
    Member

    No idea! :)

  7. added
    tests
    on Oct 14, 2021
  8. jcrist commented on May 5, 2022

    @jcrist
    Member

    The HDFS tests are now failing further on install (the docker container used to test them has python 3.7 installed, while dask is now 3.8+ only). I could possibly spend some time and fix CI here, but I'm feeling a bit inclined to drop this whole CI build and delete a bunch of stuff. We no longer have any HDFS-specific branching in dask itself, so it's more a test that the hdfs filesystem works. Since HDFS is less commonly used than other filesystems, and is imposing some CI burden on us, I'd rather delete this build than spend time fixing things. cc @jrbourbeau for thoughts.

  9. jrbourbeau commented on May 5, 2022

    @jrbourbeau
    Member

    Thanks for bringing this up @jcrist. Yeah, I agree if we no longer have custom logic around HDFS in dask and are instead relying on fsspec, then dropping the HDFS build seems like a win to me. cc @martindurant for visibility

  10. martindurant commented on May 5, 2022

    @martindurant
    Member

    agreed

  11. jcrist commented on May 5, 2022

    @jcrist
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions