mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
674 B
C++
29 lines
674 B
C++
#pragma once
|
|
|
|
#include <Common/config.h>
|
|
|
|
#if USE_HDFS
|
|
#include <IO/ReadBuffer.h>
|
|
#include <IO/BufferWithOwnMemory.h>
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
namespace DB
|
|
{
|
|
/** Accepts HDFS path to file and opens it.
|
|
* Closes file by himself (thus "owns" a file descriptor).
|
|
*/
|
|
class ReadBufferFromHDFS : public BufferWithOwnMemory<ReadBuffer>
|
|
{
|
|
struct ReadBufferFromHDFSImpl;
|
|
std::unique_ptr<ReadBufferFromHDFSImpl> 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
|