Skip to content

Commit

Permalink
rename all theflash to tiflash (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
marsishandsome authored Feb 4, 2020
1 parent 6143805 commit 250270c
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 51 deletions.
8 changes: 4 additions & 4 deletions dbms/src/Common/ErrorCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ namespace ErrorCodes
extern const int STD_EXCEPTION = 1001;
extern const int UNKNOWN_EXCEPTION = 1002;

extern const int THEFLASH_UNHANDLED_TYPE_CONVERTION = 9000;
extern const int THEFLASH_BAD_REQUEST = 9001;
extern const int THEFLASH_ENCODER_ERROR = 9002;
extern const int THEFLASH_SESSION_ERROR = 9003;
extern const int TIFLASH_UNHANDLED_TYPE_CONVERTION = 9000;
extern const int TIFLASH_BAD_REQUEST = 9001;
extern const int TIFLASH_ENCODER_ERROR = 9002;
extern const int TIFLASH_SESSION_ERROR = 9003;
extern const int DECIMAL_OVERFLOW_ERROR = 9004;
extern const int FILE_SIZE_NOT_MATCH = 9005;
extern const int PAGE_SIZE_NOT_MATCH = 9006;
Expand Down
10 changes: 5 additions & 5 deletions dbms/src/Functions/tests/strings_pad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ TEST_F(StringPad, string_pad_string_unit_Test)

auto &factory = FunctionFactory::instance();

std::vector<String> strs{"hello", "hello, world", "It's TheFlash", " ", ""};
std::vector<String> strs{"hello", "hello, world", "It's TiFlash", " ", ""};

MutableColumnPtr csp = ColumnString::create();
for (const auto &str: strs)
Expand Down Expand Up @@ -187,7 +187,7 @@ TEST_F(StringPad, string_pad_empty_padding_unit_Test)

auto &factory = FunctionFactory::instance();

std::vector<String> strs{"hello", "hello, world", "It's TheFlash", " ", ""};
std::vector<String> strs{"hello", "hello, world", "It's TiFlash", " ", ""};

MutableColumnPtr csp = ColumnString::create();
for (const auto &str: strs)
Expand Down Expand Up @@ -262,7 +262,7 @@ TEST_F(StringPad, string_pad_utf8_padding_unit_Test)

auto &factory = FunctionFactory::instance();

std::vector<String> strs{"你好,", "你好, 世界", "这是 TheFlash", " ", ""};
std::vector<String> strs{"你好,", "你好, 世界", "这是 TiFlash", " ", ""};

MutableColumnPtr csp = ColumnString::create();
for (const auto &str: strs)
Expand Down Expand Up @@ -339,7 +339,7 @@ TEST_F(StringPad, string_pad_fixed_utf8_padding_unit_Test)

auto &factory = FunctionFactory::instance();

std::vector<String> strs{"你好,", "你好, 世界", "这是 TheFlash", " ", ""};
std::vector<String> strs{"你好,", "你好, 世界", "这是 TiFlash", " ", ""};

MutableColumnPtr csp = ColumnFixedString::create(30);
for (const auto &str: strs)
Expand Down Expand Up @@ -568,7 +568,7 @@ TEST_F(StringPad, string_pad_empty_utf8_padding_unit_Test)

auto &factory = FunctionFactory::instance();

std::vector<String> strs{"你好,", "你好, 世界", "这是 TheFlash", " ", ""};
std::vector<String> strs{"你好,", "你好, 世界", "这是 TiFlash", " ", ""};

MutableColumnPtr csp = ColumnString::create();
for (const auto &str: strs)
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Interpreters/SharedQueries.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace DB
{
namespace ErrorCodes
{
extern const int THEFLASH_BAD_REQUEST;
extern const int TIFLASH_BAD_REQUEST;
}

struct SharedQuery
Expand Down Expand Up @@ -98,7 +98,7 @@ class SharedQueries
String msg = "SharedQueries: more clients than they claimed! expected " + toString(clients) + ", got "
+ toString(query.connected_clients);
LOG_WARNING(log, msg);
throw Exception(msg, ErrorCodes::THEFLASH_BAD_REQUEST);
throw Exception(msg, ErrorCodes::TIFLASH_BAD_REQUEST);
}
query.connected_clients++;

Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Raft/RaftService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ grpc::Status RaftService::ApplySnapshot(grpc::ServerContext *, CommandServerRead
catch (...)
{
tryLogCurrentException(log, "gRPC ApplyCommandBatch error");
return grpc::Status(grpc::StatusCode::UNKNOWN, "Runtime error, check theflash log for detail.");
return grpc::Status(grpc::StatusCode::UNKNOWN, "Runtime error, check tiflash log for detail.");
}
}

Expand Down
72 changes: 36 additions & 36 deletions dbms/src/Server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,102 +98,102 @@ if (CLICKHOUSE_SPLIT_BINARY)
target_link_libraries (clickhouse-clang clickhouse-compiler-lib)
add_executable (clickhouse-lld clickhouse-lld.cpp)
target_link_libraries (clickhouse-lld clickhouse-compiler-lib)
install (TARGETS clickhouse-clang clickhouse-lld RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
install (TARGETS clickhouse-clang clickhouse-lld RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list (APPEND CLICKHOUSE_ALL_TARGETS clickhouse-clang clickhouse-lld)
endif ()

install (TARGETS clickhouse-server ${CLICKHOUSE_ALL_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
install (TARGETS clickhouse-server ${CLICKHOUSE_ALL_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)

add_custom_target (clickhouse-bundle ALL DEPENDS ${CLICKHOUSE_ALL_TARGETS})
add_custom_target (theflash ALL DEPENDS clickhouse-bundle)
add_custom_target (tiflash ALL DEPENDS clickhouse-bundle)
else ()
add_executable (theflash main.cpp)
target_link_libraries (theflash clickhouse_common_io)
target_include_directories (theflash BEFORE PRIVATE ${COMMON_INCLUDE_DIR})
target_include_directories (theflash PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
add_executable (tiflash main.cpp)
target_link_libraries (tiflash clickhouse_common_io)
target_include_directories (tiflash BEFORE PRIVATE ${COMMON_INCLUDE_DIR})
target_include_directories (tiflash PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

if (USE_EMBEDDED_COMPILER)
target_link_libraries (theflash clickhouse-compiler-lib)
target_link_libraries (tiflash clickhouse-compiler-lib)
endif ()
if (ENABLE_CLICKHOUSE_SERVER)
target_link_libraries (theflash clickhouse-server-lib)
target_link_libraries (tiflash clickhouse-server-lib)
endif ()
if (ENABLE_CLICKHOUSE_CLIENT)
target_link_libraries (theflash clickhouse-client-lib)
target_link_libraries (tiflash clickhouse-client-lib)
endif ()
if (ENABLE_CLICKHOUSE_LOCAL)
target_link_libraries (theflash clickhouse-local-lib)
target_link_libraries (tiflash clickhouse-local-lib)
endif ()
if (ENABLE_CLICKHOUSE_BENCHMARK)
target_link_libraries (theflash clickhouse-benchmark-lib)
target_link_libraries (tiflash clickhouse-benchmark-lib)
endif ()
if (ENABLE_CLICKHOUSE_PERFORMANCE)
target_link_libraries (theflash clickhouse-performance-test-lib)
target_link_libraries (tiflash clickhouse-performance-test-lib)
endif ()
if (ENABLE_CLICKHOUSE_TOOLS)
target_link_libraries (theflash
target_link_libraries (tiflash
clickhouse-extract-from-config-lib
clickhouse-compressor-lib
clickhouse-format-lib
)
endif ()
if (ENABLE_CLICKHOUSE_COPIER)
target_link_libraries (theflash clickhouse-copier-lib)
target_link_libraries (tiflash clickhouse-copier-lib)
endif ()

set (CLICKHOUSE_BUNDLE)
if (ENABLE_CLICKHOUSE_SERVER)
add_custom_target (clickhouse-server ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-server DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-server DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
add_custom_target (clickhouse-server ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-server DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-server DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-server)
endif ()
if (ENABLE_CLICKHOUSE_CLIENT)
add_custom_target (clickhouse-client ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-client DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-client DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
add_custom_target (clickhouse-client ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-client DEPENDS tiflash)
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 theflash clickhouse-local DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-local DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
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 theflash clickhouse-benchmark DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-benchmark DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
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 theflash clickhouse-performance-test DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-performance-test DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
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_CLICKHOUSE_TOOLS)
add_custom_target (clickhouse-extract-from-config ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-extract-from-config DEPENDS theflash)
add_custom_target (clickhouse-compressor ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-compressor DEPENDS theflash)
add_custom_target (clickhouse-format ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-format DEPENDS theflash)
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 theflash)
DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-extract-from-config clickhouse-compressor clickhouse-format)
endif ()
if (ENABLE_CLICKHOUSE_COPIER)
add_custom_target (clickhouse-copier ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-copier DEPENDS theflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-copier DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
add_custom_target (clickhouse-copier ALL COMMAND ${CMAKE_COMMAND} -E create_symlink tiflash clickhouse-copier DEPENDS tiflash)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/clickhouse-copier DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-copier)
endif ()
# install always because depian package want this files:
add_custom_target (clickhouse-clang ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-clang DEPENDS theflash)
add_custom_target (clickhouse-lld ALL COMMAND ${CMAKE_COMMAND} -E create_symlink theflash clickhouse-lld DEPENDS theflash)
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)
list(APPEND CLICKHOUSE_BUNDLE clickhouse-clang clickhouse-lld)

install (TARGETS theflash RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
install (TARGETS tiflash RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)

install (FILES
${CMAKE_CURRENT_BINARY_DIR}/clickhouse-clang
${CMAKE_CURRENT_BINARY_DIR}/clickhouse-lld
DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT theflash)
DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT tiflash)

add_custom_target (clickhouse-bundle ALL DEPENDS ${CLICKHOUSE_BUNDLE})
endif ()
Expand All @@ -204,4 +204,4 @@ add_test(NAME GLIBC_required_version COMMAND bash -c "readelf -s ${CMAKE_CURRENT
install (
FILES config.xml users.xml
DESTINATION ${CLICKHOUSE_ETC_DIR}/clickhouse-server
COMPONENT theflash)
COMPONENT tiflash)
2 changes: 1 addition & 1 deletion release-centos7/build/build-tiflash-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cmake "$SRCPATH" \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE
make -j $NPROC

cp -f "$build_dir/dbms/src/Server/theflash" "$install_dir/tiflash"
cp -f "$build_dir/dbms/src/Server/tiflash" "$install_dir/tiflash"
cp -f "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" "$install_dir/libtiflash_proxy.so"

# copy gtest binary under Debug mode
Expand Down
2 changes: 1 addition & 1 deletion release-centos7/build/build-tiflash-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ cmake "$SRCPATH" \

make -j $NPROC

cp -f "$build_dir/dbms/src/Server/theflash" "$install_dir/tiflash"
cp -f "$build_dir/dbms/src/Server/tiflash" "$install_dir/tiflash"
cp -f "${SRCPATH}/libs/libtiflash-proxy/libtiflash_proxy.so" "$install_dir/libtiflash_proxy.so"
2 changes: 1 addition & 1 deletion tests/_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
export build_dir="../../build"
fi

export storage_bin="$build_dir/dbms/src/Server/theflash"
export storage_bin="$build_dir/dbms/src/Server/tiflash"

# Serve config for launching
export storage_server_config="../../running/config/config.xml"
Expand Down

0 comments on commit 250270c

Please sign in to comment.