mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 14:11:58 +00:00
77bd2624ea
* Fix building without submodules * Fix more gcc9 warnings * was wrong! ../dbms/src/IO/WriteBufferAIO.cpp:277:54: error: result of comparison 'ssize_t' (aka 'long') > 9223372036854775807 is always false [-Werror,-Wtautological-type-limit-compare] if ((static_cast<ssize_t>(flush_buffer.offset()) > std::numeric_limits<off_t>::max()) || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * mimalloc off MI_OVERRIDE * Fix freebsd build * Fix shared build * Fix build in gcc9 * Fix split build * fix * fix * fix * fix * clean * zstd * Update CMakeLists.txt * Update Defines.h * Try fix -Wsign-compare * Freebsd fix * Add missing libs * Fix double-conversion include for copy-headers * Fix zlib link * Fix includes for arcadia * Fix includes for arcadia * Fix includes for arcadia * Freebsd fix * Arcadia fixes * Update QueryProfiler.cpp * Freebsd fix * clean * 19.11: Fixes for arcadia porting (#6223) * fix glibc-compatibility * M_LIBRARY fix * wip * Fix * Fix arm build * unwind fix * Update CMakeLists.txt
30 lines
675 B
C++
30 lines
675 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;
|
|
|
|
bool nextImpl() override;
|
|
|
|
~ReadBufferFromHDFS() override;
|
|
};
|
|
}
|
|
#endif
|