Open
Conversation
Author
|
I resolved all 2.7 compatibility issues. Would appreciate if somebody can point me at the right direction to deal with "Failed to establish a new connection: [Errno 111] Connection refused',))" failures. Looks like it has nothing to do with the source code but rather an environment problem. |
mtth
reviewed
Feb 14, 2021
hdfs/glob.py
Outdated
| import fnmatch | ||
| import re | ||
|
|
||
| from hdfs import Client |
|
|
||
|
|
||
| def glob(client, hdfs_path): | ||
| """Return a list of paths matching a pathname pattern. |
hdfs/glob.py
Outdated
Comment on lines
20
to
26
| Sample usages: | ||
|
|
||
| .. code-block:: python | ||
|
|
||
| glob(client, './foo/bar/*') | ||
| glob(client, './foo/bar/file[0-9].txt') | ||
| glob(client, './foo/bar/file?.txt') |
Owner
There was a problem hiding this comment.
Unindent sample usage? Same for iglob below.
| glob(client, './foo/bar/file?.txt') | ||
|
|
||
| """ | ||
| return list(iglob(client, hdfs_path)) |
Owner
There was a problem hiding this comment.
glob provides little value over iglob: it saves just the list call. What do you think about only exposing iglob, possibly renaming it to glob?
hdfs/glob.py
Outdated
| yield posixpath.join(dirname, name) | ||
|
|
||
|
|
||
| def glob1(client, dirname, pattern): |
Owner
There was a problem hiding this comment.
Prefix this (and the other functions below) with an underscore?
Author
|
Hey @mtth any opinion on my latest updates and comments? Are you good with the changes? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Glob module for HDFS client. The source code was ported from Python 3.4 and tested.