#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 WriteBufferFromHDFS : public BufferWithOwnMemory { struct WriteBufferFromHDFSImpl; std::unique_ptr impl; public: WriteBufferFromHDFS(const std::string & hdfs_name_, size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE); WriteBufferFromHDFS(WriteBufferFromHDFS &&) = default; void nextImpl() override; ~WriteBufferFromHDFS() override; void sync() override; }; } #endif