Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
timeout=self._timeout,
headers={'content-type': 'application/octet-stream'}, # For HttpFS.
**kwargs
)
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
* `'#LATEST'`: this marker gets expanded to the most recently updated file
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
"""
return self._session.request(
method=method,
url=url,
timeout=self._timeout,
headers={'content-type': 'application/octet-stream'}, # For HttpFS.
**kwargs
)
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
**kwargs
)
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
* `'#LATEST'`: this marker gets expanded to the most recently updated file
or folder. They can be combined using the `'{N}'` suffix. For example,
`'foo/#LATEST{2}'` is equivalent to `'foo/#LATEST/#LATEST'`.
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
* `'#LATEST'`: this marker gets expanded to the most recently updated file
or folder. They can be combined using the `'{N}'` suffix. For example,
`'foo/#LATEST{2}'` is equivalent to `'foo/#LATEST/#LATEST'`.
"""
path = hdfs_path
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
* `'#LATEST'`: this marker gets expanded to the most recently updated file
or folder. They can be combined using the `'{N}'` suffix. For example,
`'foo/#LATEST{2}'` is equivalent to `'foo/#LATEST/#LATEST'`.
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.
Currently supported markers:
* `'#LATEST'`: this marker gets expanded to the most recently updated file
or folder. They can be combined using the `'{N}'` suffix. For example,
headers={'content-type': 'application/octet-stream'}, # For HttpFS.
**kwargs
)
# Raw API endpoints
_append = _Request('POST', allow_redirects=False) # cf. `read`
_create = _Request('PUT', allow_redirects=False) # cf. `write`
_delete = _Request('DELETE')
_get_acl_status = _Request('GET')
_get_content_summary = _Request('GET')
_get_file_checksum = _Request('GET')
_get_file_status = _Request('GET')
_get_home_directory = _Request('GET')
_get_trash_root = _Request('GET')
_list_status = _Request('GET')
_mkdirs = _Request('PUT')
_modify_acl_entries = _Request('PUT')
_open = _Request('GET', stream=True)
_rename = _Request('PUT')
_set_acl = _Request('PUT')
_set_owner = _Request('PUT')
_set_permission = _Request('PUT')
_set_replication = _Request('PUT')
_set_times = _Request('PUT')
# Exposed endpoints
def resolve(self, hdfs_path):
"""Return absolute, normalized path, with special markers expanded.
:param hdfs_path: Remote path.