mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
fix build error
This commit is contained in:
parent
c47bb97fce
commit
68fc3e761d
@ -4,15 +4,6 @@ set (SRCS
|
||||
${CMAKE_CURRENT_LIST_DIR}/ThriftHiveMetastore.cpp
|
||||
)
|
||||
|
||||
# set(THRIFT_COMPILER_PATH ${ClickHouse_BINARY_DIR}/contrib/thrift-cmake/thrift-compiler)
|
||||
# add_custom_command(
|
||||
# OUTPUT ${SRCS}
|
||||
# COMMAND ${THRIFT_COMPILER_PATH}
|
||||
# ARGS -r --gen cpp -out ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/hive_metastore.thrift
|
||||
# COMMENT "Running cpp thrift compiler for hive_metastore.thrift"
|
||||
# DEPENDS ${THRIFT_COMPILER}
|
||||
# VERBATIM)
|
||||
|
||||
add_library(hivemetastore ${SRCS})
|
||||
target_link_libraries(hivemetastore PUBLIC ${THRIFT_LIBRARY})
|
||||
target_include_directories(hivemetastore SYSTEM PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
@ -450,6 +450,7 @@ if (USE_HDFS)
|
||||
|
||||
if (USE_ORC AND USE_PARQUET)
|
||||
dbms_target_link_libraries(PRIVATE hivemetastore)
|
||||
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/hive-metastore)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
||||
#include <Interpreters/Lemmatizers.h>
|
||||
#include <filesystem>
|
||||
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
#include <ThriftHiveMetastore.h>
|
||||
#include <thrift/protocol/TBinaryProtocol.h>
|
||||
#include <thrift/transport/TBufferTransports.h>
|
||||
@ -163,7 +163,7 @@ struct ContextSharedPart
|
||||
mutable std::mutex storage_policies_mutex;
|
||||
/// Separate mutex for re-initialization of zookeeper session. This operation could take a long time and must not interfere with another operations.
|
||||
mutable std::mutex zookeeper_mutex;
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
/// Separate mutex for re-initialization of hive metastore client. This operation could take a long time and must not interfere with another operations.
|
||||
mutable std::mutex hive_metastore_mutex;
|
||||
#endif
|
||||
@ -179,7 +179,7 @@ struct ContextSharedPart
|
||||
mutable std::map<String, zkutil::ZooKeeperPtr> auxiliary_zookeepers; /// Map for auxiliary ZooKeeper clients.
|
||||
ConfigurationPtr auxiliary_zookeepers_config; /// Stores auxiliary zookeepers configs
|
||||
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
mutable std::map<String, HMSClientPtr> hive_metastore_clients; /// Map for hive metastore clients
|
||||
#endif
|
||||
|
||||
@ -1824,7 +1824,7 @@ zkutil::ZooKeeperPtr Context::getZooKeeper() const
|
||||
return shared->zookeeper;
|
||||
}
|
||||
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
HMSClientPtr Context::getHMSClient(const String & name) const
|
||||
{
|
||||
using namespace apache::thrift;
|
||||
|
@ -174,7 +174,7 @@ private:
|
||||
std::unique_ptr<ContextSharedPart> shared;
|
||||
};
|
||||
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
class HMSClient;
|
||||
using HMSClientPtr = std::shared_ptr<HMSClient>;
|
||||
#endif
|
||||
@ -693,7 +693,7 @@ public:
|
||||
// Reload Zookeeper
|
||||
void reloadZooKeeperIfChanged(const ConfigurationPtr & config) const;
|
||||
|
||||
#if USE_HDFS
|
||||
#if USE_HDFS && USE_ORC && USE_PARQUET
|
||||
HMSClientPtr getHMSClient(const String & name) const;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user