#pragma once #include #if USE_HDFS #include #include #include #include namespace DB { /** Accepts HDFS path to file and opens it. * Closes file by himself (thus "owns" a file descriptor). */ class ReadBufferFromHDFS : public BufferWithOwnMemory { struct ReadBufferFromHDFSImpl; std::unique_ptr impl; public: ReadBufferFromHDFS(const std::string & hdfs_name_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE); ReadBufferFromHDFS(ReadBufferFromHDFS &&) = default; ~ReadBufferFromHDFS() override; bool nextImpl() override; }; } #endif