Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MariaDB + RocksDB Cloud support #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ option(WITH_SNAPPY "build with SNAPPY" OFF)
option(WITH_LZ4 "build with lz4" OFF)
option(WITH_ZLIB "build with zlib" OFF)
option(WITH_ZSTD "build with zstd" OFF)
option(WITH_KAFKA "build with librdkafka (system)" ON)
option(WITH_AWS "build with aws-sdk-cpp (GIT submodule)" ON)
if(MSVC)
# Defaults currently different for GFLAGS.
# We will address find_package work a little later
Expand Down Expand Up @@ -115,6 +117,25 @@ else()
include_directories(${ZSTD_INCLUDE_DIR})
list(APPEND THIRDPARTY_LIBS ${ZSTD_LIBRARIES})
endif()

if(WITH_KAFKA)
# System lib used
# rdkafka uses pkgconfig instead of Findrdkafka.cmake
# https://stackoverflow.com/questions/29191855/what-is-the-proper-way-to-use-pkg-config-from-cmake
# find_package(rdkafka REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(RDKAFKA REQUIRED rdkafka++)
add_definitions(-DUSE_KAFKA)
include_directories(${RDKAFKA_INCLUDE_DIR})
list(APPEND THIRDPARTY_LIBS ${RDKAFKA_LIBRARIES})
endif()

if(WITH_AWS)
add_definitions(-DUSE_AWS)
list(APPEND THIRDPARTY_LIBS aws-cpp-sdk-s3 aws-cpp-sdk-kinesis aws-cpp-sdk-core)
include_directories(../../aws-sdk-cpp/aws-cpp-sdk-s3/include ../../aws-sdk-cpp/aws-cpp-sdk-kinesis/include ../../aws-sdk-cpp/aws-cpp-sdk-core/include)
link_directories(../../aws-sdk-cpp/aws-cpp-sdk-s3 ../../aws-sdk-cpp/aws-cpp-sdk-kinesis ../../aws-sdk-cpp/aws-cpp-sdk-core)
endif()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will be able to offer a better way to work with AWS SDK, soon.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spetrunia did you made any progress with that ?

endif()

string(TIMESTAMP GIT_DATE_TIME "%Y/%m/%d %H:%M:%S" UTC)
Expand Down Expand Up @@ -456,6 +477,18 @@ add_subdirectory(third-party/gtest-1.7.0/fused-src/gtest)
# Main library source code

set(SOURCES
cloud/aws/aws_env.cc
cloud/aws/aws_kafka.cc
cloud/aws/aws_kinesis.cc
cloud/aws/aws_log.cc
cloud/aws/aws_retry.cc
cloud/aws/aws_s3.cc
cloud/db_cloud_impl.cc
cloud/cloud_env.cc
cloud/cloud_env_options.cc
cloud/manifest_reader.cc
cloud/purge.cc
cloud/cloud_manifest.cc
cache/clock_cache.cc
cache/lru_cache.cc
cache/sharded_cache.cc
Expand Down
Loading