A remote endpoint for Apache Hadoop WebHDFS. More...
#include <hdfs.hpp>
Public Member Functions | |
WebHdfsEndpoint (std::string url) | |
Create an WebHDFS endpoint from a url. More... | |
WebHdfsEndpoint (std::string host, std::string port, std::string remote_file_path, std::optional< std::string > username=std::nullopt) | |
Create an WebHDFS endpoint from the host, port, file path and optionally username. More... | |
void | setopt (CurlHandle &curl) override |
Set needed connection options on a curl handle. More... | |
std::string | str () const override |
Get a description of this remote point instance. More... | |
std::size_t | get_file_size () override |
Get the size of the remote file. More... | |
void | setup_range_request (CurlHandle &curl, std::size_t file_offset, std::size_t size) override |
Set up the range request in order to read part of a file given the file offset and read size. | |
![]() | |
RemoteEndpointType | remote_endpoint_type () const noexcept |
Get the type of the remote file. More... | |
Static Public Member Functions | |
static bool | is_url_valid (std::string const &url) noexcept |
Whether the given URL is valid for the WebHDFS endpoints. More... | |
Additional Inherited Members | |
![]() | |
RemoteEndpoint (RemoteEndpointType remote_endpoint_type) | |
![]() | |
RemoteEndpointType | _remote_endpoint_type {RemoteEndpointType::AUTO} |
A remote endpoint for Apache Hadoop WebHDFS.
If KvikIO is run within a Docker, the argument --network host
needs to be passed to the docker run
command.
|
explicit |
Create an WebHDFS endpoint from a url.
url | The WebHDFS HTTP/HTTPS url to the remote file. |
|
explicit |
Create an WebHDFS endpoint from the host, port, file path and optionally username.
host | Host |
port | Port |
remote_file_path | Remote file path |
username | User name |
|
overridevirtual |
|
staticnoexcept |
Whether the given URL is valid for the WebHDFS endpoints.
url | A URL. |
|
overridevirtual |
Set needed connection options on a curl handle.
Subsequently, a call to curl.perform()
should connect to the endpoint.
curl | The curl handle. |
Implements kvikio::RemoteEndpoint.
|
overridevirtual |
Get a description of this remote point instance.
Implements kvikio::RemoteEndpoint.