Skip to content

Commit

Permalink
remove useless clickhouse applications (pingcap#4539)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhe1989 authored Mar 31, 2022
1 parent 6ed39f5 commit 9d1ad77
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 3,157 deletions.
514 changes: 0 additions & 514 deletions dbms/src/Server/Benchmark.cpp

This file was deleted.

81 changes: 1 addition & 80 deletions dbms/src/Server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
option(ENABLE_CLICKHOUSE_ALL "Enable all tools" ON)
option(ENABLE_CLICKHOUSE_SERVER "Enable server" ${ENABLE_CLICKHOUSE_ALL})
option(ENABLE_CLICKHOUSE_CLIENT "Enable client" ${ENABLE_CLICKHOUSE_ALL})
option(ENABLE_CLICKHOUSE_LOCAL "Enable local" OFF)
option(ENABLE_CLICKHOUSE_BENCHMARK "Enable benchmark" OFF)
option(ENABLE_CLICKHOUSE_PERFORMANCE "Enable performance" OFF)
option(ENABLE_CLICKHOUSE_TOOLS "Enable tools: compressor format extract-from-config-lib" OFF)
option(ENABLE_TIFLASH_DTTOOL "Enable dttool: tools to manage dmfile" ${ENABLE_CLICKHOUSE_ALL})
option(ENABLE_TIFLASH_DTWORKLOAD "Enable dtworkload: tools to test and stress DeltaTree" ${ENABLE_CLICKHOUSE_ALL})

Expand All @@ -48,30 +44,10 @@ target_link_libraries(clickhouse-server-lib PRIVATE ${TIFLASH_PROXY_LIBRARY})
target_link_libraries (clickhouse-server-lib PUBLIC clickhouse_common_io daemon clickhouse_storages_system clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)
target_include_directories (clickhouse-server-lib PUBLIC ${TiFlash_SOURCE_DIR}/libs/libdaemon/include)

add_library (clickhouse-local-lib LocalServer.cpp)
target_link_libraries (clickhouse-local-lib clickhouse-server-lib clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)

add_library (clickhouse-extract-from-config-lib ${SPLIT_SHARED} ExtractFromConfig.cpp)
target_link_libraries (clickhouse-extract-from-config-lib clickhouse_common_config clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})

add_library (clickhouse-client-lib Client.cpp)
target_link_libraries (clickhouse-client-lib clickhouse_functions clickhouse_aggregate_functions ${LINE_EDITING_LIBS} ${Boost_PROGRAM_OPTIONS_LIBRARY})
target_include_directories (clickhouse-client-lib PRIVATE ${READLINE_INCLUDE_DIR})

add_library (clickhouse-benchmark-lib ${SPLIT_SHARED} Benchmark.cpp)
target_link_libraries (clickhouse-benchmark-lib clickhouse-client-lib clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
target_include_directories (clickhouse-benchmark-lib PRIVATE ${PCG_RANDOM_INCLUDE_DIR})

add_library (clickhouse-performance-test-lib ${SPLIT_SHARED} PerformanceTest.cpp)
target_link_libraries (clickhouse-performance-test-lib clickhouse_common_io dbms ${Boost_PROGRAM_OPTIONS_LIBRARY})
target_include_directories (clickhouse-performance-test-lib PRIVATE ${PCG_RANDOM_INCLUDE_DIR})

add_library (clickhouse-compressor-lib ${SPLIT_SHARED} Compressor.cpp)
target_link_libraries (clickhouse-compressor-lib clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})

add_library (clickhouse-format-lib ${SPLIT_SHARED} Format.cpp)
target_link_libraries (clickhouse-format-lib dbms clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})

add_library(tiflash-dttool-lib ${SPLIT_SHARED} DTTool/DTToolBench.cpp DTTool/DTToolMigrate.cpp DTTool/DTToolInspect.cpp)
target_link_libraries(tiflash-dttool-lib PUBLIC dbms daemon clickhouse_common_io ${Boost_PROGRAM_OPTIONS_LIBRARY})
target_include_directories(tiflash-dttool-lib PUBLIC ${TiFlash_SOURCE_DIR}/libs/libdaemon/include)
Expand All @@ -90,24 +66,11 @@ if (CLICKHOUSE_SPLIT_BINARY)
target_link_libraries (clickhouse-server clickhouse-server-lib)
add_executable (clickhouse-client clickhouse-client.cpp)
target_link_libraries (clickhouse-client clickhouse-client-lib)
add_executable (clickhouse-local clickhouse-local.cpp)
target_link_libraries (clickhouse-local clickhouse-local-lib)
add_executable (clickhouse-benchmark clickhouse-benchmark.cpp)
target_link_libraries (clickhouse-benchmark clickhouse-benchmark-lib clickhouse_aggregate_functions)
add_executable (clickhouse-performance-test clickhouse-performance-test.cpp)
target_link_libraries (clickhouse-performance-test clickhouse-performance-test-lib dbms)
add_executable (clickhouse-extract-from-config clickhouse-extract-from-config.cpp)
target_link_libraries (clickhouse-extract-from-config clickhouse-extract-from-config-lib)
# Also in utils
add_executable (clickhouse-compressor clickhouse-compressor.cpp)
target_link_libraries (clickhouse-compressor clickhouse-compressor-lib)
add_executable (clickhouse-format clickhouse-format.cpp)
target_link_libraries (clickhouse-format clickhouse-format-lib)
add_executable (tiflash-dttool DTTool/tiflash-dttool.cpp)
target_link_libraries (tiflash-dttool tiflash-dttool-entry-object)

set (CLICKHOUSE_ALL_TARGETS clickhouse-server clickhouse-client clickhouse-local clickhouse-benchmark clickhouse-performance-test
clickhouse-extract-from-config clickhouse-format)
set (CLICKHOUSE_ALL_TARGETS clickhouse-server clickhouse-client clickhouse-extract-from-config clickhouse-format)

if (USE_EMBEDDED_COMPILER)
add_executable (clickhouse-clang clickhouse-clang.cpp)
Expand Down Expand Up @@ -199,28 +162,12 @@ else ()
if (ENABLE_CLICKHOUSE_CLIENT)
target_link_libraries (tiflash clickhouse-client-lib)
endif ()
if (ENABLE_CLICKHOUSE_LOCAL)
target_link_libraries (tiflash clickhouse-local-lib)
endif ()
if (ENABLE_CLICKHOUSE_BENCHMARK)
target_link_libraries (tiflash clickhouse-benchmark-lib)
endif ()
if (ENABLE_CLICKHOUSE_PERFORMANCE)
target_link_libraries (tiflash clickhouse-performance-test-lib)
endif ()
if (ENABLE_TIFLASH_DTTOOL)
target_link_libraries(tiflash tiflash-dttool-entry-object)
endif ()
if (ENABLE_TIFLASH_DTWORKLOAD)
target_link_libraries(tiflash dt-workload-lib)
endif ()
if (ENABLE_CLICKHOUSE_TOOLS)
target_link_libraries (tiflash
clickhouse-extract-from-config-lib
clickhouse-compressor-lib
clickhouse-format-lib
)
endif ()

set (CLICKHOUSE_BUNDLE)
if (ENABLE_CLICKHOUSE_SERVER)
Expand All @@ -233,37 +180,11 @@ else ()
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-client DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-client)
endif ()
if (ENABLE_CLICKHOUSE_LOCAL)
add_custom_target (clickhouse-local ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-local DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-local DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-local)
endif ()
if (ENABLE_CLICKHOUSE_BENCHMARK)
add_custom_target (clickhouse-benchmark ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-benchmark DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-benchmark DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-benchmark)
endif ()
if (ENABLE_CLICKHOUSE_PERFORMANCE)
add_custom_target (clickhouse-performance-test ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-performance-test DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-performance-test DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-performance-test)
endif ()
if (ENABLE_TIFLASH_DTTOOL)
add_custom_target (tiflash-dttool ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash tiflash-dttool DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/tiflash-dttool DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE tiflash-dttool)
endif ()
if (ENABLE_CLICKHOUSE_TOOLS)
add_custom_target (clickhouse-extract-from-config ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-extract-from-config DEPENDS tiflash)
add_custom_target (clickhouse-compressor ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-compressor DEPENDS tiflash)
add_custom_target (clickhouse-format ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-format DEPENDS tiflash)
install (FILES
${CMAKE_CURRENT_BINARY_DIR}/clickhouse-extract-from-config
${CMAKE_CURRENT_BINARY_DIR}/clickhouse-compressor
${CMAKE_CURRENT_BINARY_DIR}/clickhouse-format
DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-extract-from-config clickhouse-compressor clickhouse-format)
endif ()
# install always because depian package want this files:
add_custom_target (clickhouse-clang ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-clang DEPENDS tiflash)
add_custom_target (clickhouse-lld ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-lld DEPENDS tiflash)
Expand Down
141 changes: 0 additions & 141 deletions dbms/src/Server/Compressor.cpp

This file was deleted.

100 changes: 0 additions & 100 deletions dbms/src/Server/ExtractFromConfig.cpp

This file was deleted.

Loading

0 comments on commit 9d1ad77

Please sign in to comment.