mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
5ec179377a
They have been superseded by a new include resolution configuration that lives outside clickhouse source tree.
39 lines
818 B
C++
39 lines
818 B
C++
#include <Common/config.h>
|
|
#include <memory>
|
|
#include <type_traits>
|
|
#include <Poco/URI.h>
|
|
|
|
#if USE_HDFS
|
|
#include <hdfs/hdfs.h>
|
|
|
|
namespace DB
|
|
{
|
|
namespace detail
|
|
{
|
|
struct HDFSBuilderDeleter
|
|
{
|
|
void operator()(hdfsBuilder * builder_ptr)
|
|
{
|
|
hdfsFreeBuilder(builder_ptr);
|
|
}
|
|
};
|
|
struct HDFSFsDeleter
|
|
{
|
|
void operator()(hdfsFS fs_ptr)
|
|
{
|
|
hdfsDisconnect(fs_ptr);
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
using HDFSBuilderPtr = std::unique_ptr<hdfsBuilder, detail::HDFSBuilderDeleter>;
|
|
using HDFSFSPtr = std::unique_ptr<std::remove_pointer_t<hdfsFS>, detail::HDFSFsDeleter>;
|
|
|
|
// set read/connect timeout, default value in libhdfs3 is about 1 hour, and too large
|
|
/// TODO Allow to tune from query Settings.
|
|
HDFSBuilderPtr createHDFSBuilder(const Poco::URI & hdfs_uri);
|
|
HDFSFSPtr createHDFSFS(hdfsBuilder * builder);
|
|
}
|
|
#endif
|