mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Initial commit
This commit is contained in:
parent
7100a74e41
commit
8e12eedbb3
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -64,3 +64,6 @@
|
||||
[submodule "contrib/cppkafka"]
|
||||
path = contrib/cppkafka
|
||||
url = https://github.com/mfontanini/cppkafka.git
|
||||
[submodule "contrib/cassandra"]
|
||||
path = contrib/cassandra
|
||||
url = https://github.com/datastax/cpp-driver.git
|
||||
|
@ -236,6 +236,7 @@ include (cmake/find_protobuf.cmake)
|
||||
include (cmake/find_hdfs3.cmake)
|
||||
include (cmake/find_consistent-hashing.cmake)
|
||||
include (cmake/find_base64.cmake)
|
||||
include (cmake/find_cassandra.cmake)
|
||||
if (ENABLE_TESTS)
|
||||
include (cmake/find_gtest.cmake)
|
||||
endif ()
|
||||
|
12
cmake/find_cassandra.cmake
Normal file
12
cmake/find_cassandra.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
if (NOT DEFINED ENABLE_CASSANDRA OR ENABLE_CASSANDRA)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
||||
message (WARNING "submodule contrib/cassandra is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
else()
|
||||
set (CASSANDRA_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
|
||||
set (CASSANDRA_LIBRARY cassandra)
|
||||
set (USE_CASSANDRA 1)
|
||||
|
||||
message(STATUS "Using cassandra: ${CASSANDRA_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
9
contrib/CMakeLists.txt
vendored
9
contrib/CMakeLists.txt
vendored
@ -219,5 +219,12 @@ if (USE_INTERNAL_HDFS3_LIBRARY)
|
||||
endif ()
|
||||
|
||||
if (USE_BASE64)
|
||||
add_subdirectory (base64-cmake)
|
||||
add_subdirectory(base64-cmake)
|
||||
endif()
|
||||
|
||||
if (USE_CASSANDRA)
|
||||
# TODO osfavstov: cassandra/CMakeLists.txt change
|
||||
# 5: set(CASS_ROOT_DIR "${CMAKE_SOURCE_DIR}/contrib/cassandra");
|
||||
# 10: include(${ClickHouse_SOURCE_DIR}/contrib/cassandra/cmake/modules/CppDriver.cmake)
|
||||
add_subdirectory(cassandra)
|
||||
endif()
|
1
contrib/cassandra
vendored
Submodule
1
contrib/cassandra
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit fd9b73d4acfd85293ab304be64e2e1e2109e521d
|
@ -18,6 +18,7 @@
|
||||
#cmakedefine01 USE_XXHASH
|
||||
#cmakedefine01 USE_INTERNAL_LLVM_LIBRARY
|
||||
#cmakedefine01 USE_PROTOBUF
|
||||
#cmakedefine01 USE_CASSANDRA
|
||||
|
||||
#cmakedefine01 CLICKHOUSE_SPLIT_BINARY
|
||||
#cmakedefine01 LLVM_HAS_RTTI
|
||||
|
@ -11,7 +11,7 @@ generate_code(CacheDictionary_generate2 UInt8 UInt16 UInt32 UInt64 UInt128 Int8
|
||||
generate_code(CacheDictionary_generate3 UInt8 UInt16 UInt32 UInt64 UInt128 Int8 Int16 Int32 Int64 Float32 Float64 Decimal32 Decimal64 Decimal128)
|
||||
add_headers_and_sources(clickhouse_dictionaries ${CMAKE_CURRENT_BINARY_DIR}/generated/)
|
||||
|
||||
add_library(clickhouse_dictionaries ${LINK_MODE} ${clickhouse_dictionaries_sources})
|
||||
add_library(clickhouse_dictionaries ${LINK_MODE} ${clickhouse_dictionaries_sources} CassandraDBDictionarySource.cpp CassandraDBDictionarySource.h)
|
||||
target_link_libraries(clickhouse_dictionaries PRIVATE clickhouse_common_io pocoext ${MYSQLXX_LIBRARY} ${BTRIE_LIBRARIES})
|
||||
|
||||
if(Poco_SQL_FOUND AND NOT USE_INTERNAL_POCO_LIBRARY)
|
||||
@ -36,4 +36,8 @@ if(USE_POCO_MONGODB)
|
||||
target_link_libraries(clickhouse_dictionaries PRIVATE ${Poco_MongoDB_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(USE_CASSANDRA)
|
||||
target_include_directories(clickhouse_dictionaries SYSTEM PRIVATE ${CASSANDRA_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
add_subdirectory(Embedded)
|
||||
|
1
dbms/src/Dictionaries/CassandraDBDictionarySource.cpp
Normal file
1
dbms/src/Dictionaries/CassandraDBDictionarySource.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "CassandraDBDictionarySource.h"
|
16
dbms/src/Dictionaries/CassandraDBDictionarySource.h
Normal file
16
dbms/src/Dictionaries/CassandraDBDictionarySource.h
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <Common/config.h>
|
||||
|
||||
#if USE_CASSANDRA
|
||||
|
||||
# include "DictionaryStructure.h"
|
||||
# include "IDictionarySource.h"
|
||||
# include <cassandra.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user