diff --git a/CMakeLists.txt b/CMakeLists.txt index 8191f653a..9e25518f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,7 @@ ENDIF () SET_PROPERTY(DIRECTORY PROPERTY EP_BASE ${CMAKE_CURRENT_BINARY_DIR}/external) LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) -FIND_PACKAGE(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time chrono) +FIND_PACKAGE(Boost 1.53.0 REQUIRED COMPONENTS system filesystem thread regex date_time chrono atomic) FIND_PACKAGE(BISON REQUIRED) check_cxx_source_compiles("#include \n void main(){}" HAS_STD_FILESYSTEM) @@ -362,12 +362,12 @@ ENDIF () # releasenum is used by external scripts for various tasks. Leave it alone. CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum IMMEDIATE) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT columnstore-platform) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT columnstore-engine) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mcsconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/mcsconfig.h) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gitversionEngine.in ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine IMMEDIATE) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT columnstore-platform) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine DESTINATION ${ENGINE_SUPPORTDIR} COMPONENT columnstore-engine) IF (INSTALL_LAYOUT) # Do this or when MariaDB builds us we don't have GenError which is required for these @@ -375,8 +375,6 @@ IF (INSTALL_LAYOUT) ADD_DEPENDENCIES(funcexp GenError) ADD_DEPENDENCIES(oamcpp GenError) ADD_DEPENDENCIES(regr_mysql GenError) - # Component columnstore-engine automatically added by mysql_add_plugin() - SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} columnstore-platform columnstore-libs) # Don't know why, but this doesn't work if you make the above line PARENT_SCOPE SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} PARENT_SCOPE) IF (RPM) @@ -391,8 +389,6 @@ IF (INSTALL_LAYOUT) "%ignore /var/lib" "%ignore /var" ) - SET(CPACK_RPM_columnstore-platform_USER_FILELIST ${ignored} PARENT_SCOPE) - SET(CPACK_RPM_columnstore-libs_USER_FILELIST ${ignored} PARENT_SCOPE) SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${ignored} "%config(noreplace) ${INSTALL_SYSCONF2DIR}/*" PARENT_SCOPE) SET(SUSE_VERSION_NUMBER OFF) @@ -401,16 +397,15 @@ IF (INSTALL_LAYOUT) string(REGEX MATCH "VERSION = ([0-9]+)" SUSE "${SUSE_VERSION}") set(SUSE_VERSION_NUMBER "${CMAKE_MATCH_1}") ENDIF () - if (${SUSE_VERSION_NUMBER} EQUAL 12) - SETA(CPACK_RPM_columnstore-platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "MariaDB-columnstore-libs" "snappy" "jemalloc" "net-tools" PARENT_SCOPE) + SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "snappy" "jemalloc" "net-tools" PARENT_SCOPE) else () - SETA(CPACK_RPM_columnstore-platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "MariaDB-columnstore-libs" "snappy" "jemalloc" "net-tools" PARENT_SCOPE) + SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "snappy" "jemalloc" "net-tools" PARENT_SCOPE) endif() - SET(CPACK_RPM_columnstore-platform_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/preInstall_platform.sh PARENT_SCOPE) - SET(CPACK_RPM_columnstore-platform_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/postInstall_platform.sh PARENT_SCOPE) - SET(CPACK_RPM_columnstore-platform_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/preUn_platform.sh PARENT_SCOPE) + SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/preInstall_storage_engine.sh PARENT_SCOPE) + SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/postInstall_storage_engine.sh PARENT_SCOPE) + SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/build/preUn_storage_engine.sh PARENT_SCOPE) ENDIF () ELSE () diff --git a/build/debian/libs/postinst b/build/debian/libs/postinst deleted file mode 100644 index 1d4f073a5..000000000 --- a/build/debian/libs/postinst +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -e - -rpmmode=install - -echo "MariaDB ColumnStore install completed" - -exit 0 diff --git a/build/debian/libs/prerm b/build/debian/libs/prerm deleted file mode 100644 index 1ebd4eedf..000000000 --- a/build/debian/libs/prerm +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -exit 0 - diff --git a/build/debian/platform/postinst b/build/debian/platform/postinst deleted file mode 100644 index 06d654252..000000000 --- a/build/debian/platform/postinst +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e - -rpmmode=install - -columnstore-post-install --rpmmode=$rpmmode - -echo "MariaDB ColumnStore install completed" - -exit 0 diff --git a/build/debian/platform/prerm b/build/debian/platform/prerm deleted file mode 100644 index 260f52078..000000000 --- a/build/debian/platform/prerm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e - -columnstore-pre-uninstall - -exit 0 - diff --git a/build/debian/storageEngine/postinst b/build/debian/storageEngine/postinst old mode 100644 new mode 100755 index 1d4f073a5..06d654252 --- a/build/debian/storageEngine/postinst +++ b/build/debian/storageEngine/postinst @@ -2,6 +2,8 @@ rpmmode=install +columnstore-post-install --rpmmode=$rpmmode + echo "MariaDB ColumnStore install completed" exit 0 diff --git a/build/debian/storageEngine/prerm b/build/debian/storageEngine/prerm old mode 100644 new mode 100755 index 1ebd4eedf..260f52078 --- a/build/debian/storageEngine/prerm +++ b/build/debian/storageEngine/prerm @@ -1,4 +1,6 @@ #!/bin/bash -e +columnstore-pre-uninstall + exit 0 diff --git a/build/postInstall_libs.sh b/build/postInstall_libs.sh deleted file mode 100644 index f4c670094..000000000 --- a/build/postInstall_libs.sh +++ /dev/null @@ -1,8 +0,0 @@ -rpmmode=install -if [ "$1" -eq "$1" 2> /dev/null ]; then - if [ $1 -ne 1 ]; then - rpmmode=upgrade - fi -fi - - diff --git a/build/postInstall_platform.sh b/build/postInstall_platform.sh deleted file mode 100644 index dc5d0e96d..000000000 --- a/build/postInstall_platform.sh +++ /dev/null @@ -1,10 +0,0 @@ -rpmmode=install -if [ "$1" -eq "$1" 2> /dev/null ]; then - if [ $1 -ne 1 ]; then - rpmmode=upgrade - fi -fi - -mkdir -p /var/lib/columnstore/local -columnstore-post-install --rpmmode=$rpmmode - diff --git a/build/postInstall_storage_engine.sh b/build/postInstall_storage_engine.sh index 3ce3834b9..dc5d0e96d 100644 --- a/build/postInstall_storage_engine.sh +++ b/build/postInstall_storage_engine.sh @@ -4,3 +4,7 @@ if [ "$1" -eq "$1" 2> /dev/null ]; then rpmmode=upgrade fi fi + +mkdir -p /var/lib/columnstore/local +columnstore-post-install --rpmmode=$rpmmode + diff --git a/build/preInstall_platform.sh b/build/preInstall_storage_engine.sh similarity index 64% rename from build/preInstall_platform.sh rename to build/preInstall_storage_engine.sh index 6b6ef1984..c5f58d59e 100644 --- a/build/preInstall_platform.sh +++ b/build/preInstall_storage_engine.sh @@ -1,7 +1,5 @@ if [ "$1" == "2" ]; then - #Perform tasks to prepare for the upgrade installation - mcsadmin shutdown y > /dev/null 2>&1 /bin/cp -f /etc/columnstore/storagemanager.cnf /etc/columnstore/storagemanager.cnf.rpmsave > /dev/null 2>&1 columnstore-pre-uninstall fi diff --git a/build/preUn_libs.sh b/build/preUn_libs.sh deleted file mode 100644 index 64c23c654..000000000 --- a/build/preUn_libs.sh +++ /dev/null @@ -1,11 +0,0 @@ -rpmmode=upgrade -if [ "$1" -eq "$1" 2> /dev/null ]; then - if [ $1 -ne 1 ]; then - rpmmode=erase - fi -else - rpmmode=erase -fi - -exit 0 - diff --git a/build/preUn_platform.sh b/build/preUn_platform.sh deleted file mode 100644 index a3cf9a653..000000000 --- a/build/preUn_platform.sh +++ /dev/null @@ -1,17 +0,0 @@ - -mcsadmin shutdown y -rpmmode=upgrade -if [ "$1" -eq "$1" 2> /dev/null ]; then - if [ $1 -ne 1 ]; then - rpmmode=erase - fi -else - rpmmode=erase -fi - -if [ $rpmmode = erase ]; then - columnstore-pre-uninstall -fi - -exit 0 - diff --git a/build/preUn_storage_engine.sh b/build/preUn_storage_engine.sh index 64c23c654..b0e6fd721 100644 --- a/build/preUn_storage_engine.sh +++ b/build/preUn_storage_engine.sh @@ -1,3 +1,4 @@ + rpmmode=upgrade if [ "$1" -eq "$1" 2> /dev/null ]; then if [ $1 -ne 1 ]; then @@ -7,5 +8,9 @@ else rpmmode=erase fi +if [ $rpmmode = erase ]; then + columnstore-pre-uninstall +fi + exit 0 diff --git a/cmake/cpackEngineDEB.cmake b/cmake/cpackEngineDEB.cmake index 9b59b4b4b..4099392da 100644 --- a/cmake/cpackEngineDEB.cmake +++ b/cmake/cpackEngineDEB.cmake @@ -11,7 +11,7 @@ SET(CPACK_PACKAGING_INSTALL_PREFIX ${INSTALL_ENGINE}) # Note that this variable is DEB not DEBIAN! http://public.kitware.com/pipermail/cmake/2014-July/058030.html SET(CPACK_DEB_COMPONENT_INSTALL ON) -SET(CPACK_COMPONENTS_ALL columnstore-platform columnstore-libs columnstore-engine) +SET(CPACK_COMPONENTS_ALL columnstore-engine) SET(CPACK_PACKAGE_NAME "MariaDB") SET(ENGINE_ARCH "amd64") @@ -44,18 +44,9 @@ SET(CPACK_DEBIAN_PACKAGE_LICENSE ${CPACK_PACKAGE_LICENSE}) SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) -SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DESCRIPTION "MariaDB-Columnstore binary files") -SET(CPACK_DEBIAN_PLATFORM_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") - -SET(CPACK_DEBIAN_LIBS_PACKAGE_DESCRIPTION "MariaDB-Columnstore libraries") -SET(CPACK_DEBIAN_LIBS_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") - SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_DESCRIPTION "MariaDB Columnstore connector binary files") SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") - -SET(CPACK_DEBIAN_LIBS_PACKAGE_PROVIDES "MariaDB-columnstore-libs") -SET(CPACK_DEBIAN_PLATFORM_PACKAGE_PROVIDES "MariaDB-columnstore-platform") SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_PROVIDES "MariaDB-columnstore-engine") set(DEBIAN_VERSION_NUMBER OFF) @@ -65,19 +56,14 @@ if (EXISTS "/etc/debian_version") set(DEBIAN_VERSION_NUMBER "${CMAKE_MATCH_1}") endif () if ("${DEBIAN_VERSION_NUMBER}" EQUAL "8") - SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, MariaDB-columnstore-libs, libsnappy1, libjemalloc1") + SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, libsnappy1, libjemalloc1") elseif ("${DEBIAN_VERSION_NUMBER}" EQUAL "9") - SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, MariaDB-columnstore-libs, libsnappy1v5, libreadline5, libjemalloc1") + SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "openssl, file, libdbi-perl, libreadline-dev, rsync, net-tools, libboost-all-dev, libsnappy1v5, libreadline5, libjemalloc1") else() - SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "expect, perl, openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools, libjemalloc1") + SET(CPACK_DEBIAN_PLATFORM_PACKAGE_DEPENDS "openssl, file, libdbi-perl, libboost-all-dev, libreadline-dev, rsync, libsnappy1v5, net-tools, libjemalloc1") endif () -SET(CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_DEPENDS "MariaDB-columnstore-libs") - - -set( CPACK_DEBIAN_LIBS_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/build/debian/libs/postinst;${CMAKE_CURRENT_SOURCE_DIR}/build/debian/libs/prerm;" ) -set( CPACK_DEBIAN_PLATFORM_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/build/debian/platform/postinst;${CMAKE_CURRENT_SOURCE_DIR}/build/debian/platform/prerm;" ) -set( CPACK_DEBIAN_STORAGE-ENGINE_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/build/debian/storageEngine/postinst;${CMAKE_CURRENT_SOURCE_DIR}/build/debian/storageEngine/prerm;" ) +set(CPACK_DEBIAN_COLUMNSTORE-ENGINE_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/build/debian/storageEngine/postinst;${CMAKE_CURRENT_SOURCE_DIR}/build/debian/storageEngine/prerm;") INCLUDE (CPack) diff --git a/cmake/cpackEngineRPM.cmake b/cmake/cpackEngineRPM.cmake index 0d361718e..ae97cfa4d 100644 --- a/cmake/cpackEngineRPM.cmake +++ b/cmake/cpackEngineRPM.cmake @@ -8,7 +8,7 @@ SET(CPACK_PACKAGING_INSTALL_PREFIX ${INSTALL_ENGINE}) SET(CPACK_RPM_COMPONENT_INSTALL ON) -SET(CPACK_COMPONENTS_ALL columnstore-platform columnstore-libs columnstore-engine) +SET(CPACK_COMPONENTS_ALL columnstore-engine) SET(CPACK_PACKAGE_NAME "MariaDB") SET(ENGINE_ARCH "x86_64") @@ -23,10 +23,10 @@ ENDIF() SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${ENGINE_ARCH}-${RPM}") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB ColumnStore: a scale out columnar storage engine for MariaDB") SET(CPACK_PACKAGE_URL "http://mariadb.org") -SET(CPACK_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") +SET(CPACK_PACKAGE_SUMMARY "MariaDB ColumnStore: a scale out columnar storage engine for MariaDB") SET(CPACK_PACKAGE_VENDOR "MariaDB Corporation Ab") SET(CPACK_PACKAGE_LICENSE "Copyright (c) 2016 MariaDB Corporation Ab., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.") @@ -50,15 +50,8 @@ MariaDB bug reports should be submitted through https://jira.mariadb.org ") -SET(CPACK_RPM_columnstore-platform_PACKAGE_DESCRIPTION "MariaDB-Columnstore binary files") -SET(CPACK_RPM_columnstore-platform_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") -SET(CPACK_RPM_columnstore-platform_PACKAGE_GROUP "Applications") - -SET(CPACK_RPM_columnstore-libs_PACKAGE_DESCRIPTION "MariaDB-Columnstore libraries") -SET(CPACK_RPM_columnstore-libs_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") - SET(CPACK_RPM_columnstore-engine_PACKAGE_DESCRIPTION "MariaDB Columnstore connector binary files") -SET(CPACK_RPM_columnstore-engine_PACKAGE_SUMMARY "MariaDB ColumnStore: A Scale out Columnar storage engine for MariaDB") +SET(CPACK_RPM_columnstore-engine_PACKAGE_SUMMARY "MariaDB ColumnStore: a scale out columnar storage engine for MariaDB") SET(CPACK_RPM_columnstore-engine_PACKAGE_GROUP "Applications") # "set/append array" - append a set of strings, separated by a space @@ -68,11 +61,8 @@ MACRO(SETA var) ENDFOREACH() ENDMACRO(SETA) -SETA(CPACK_RPM_columnstore-libs_PACKAGE_PROVIDES "MariaDB-columnstore-libs") -SETA(CPACK_RPM_columnstore-platform_PACKAGE_PROVIDES "MariaDB-columnstore-platform") SETA(CPACK_RPM_columnstore--engine_PACKAGE_PROVIDES "MariaDB-columnstore-engine") - #boost is a source build in CentOS 6 so don't require it as a package SET(REDHAT_VERSION_NUMBER OFF) SET(SUSE_VERSION_NUMBER OFF) @@ -87,24 +77,17 @@ IF (EXISTS "/etc/SuSE-release") set(SUSE_VERSION_NUMBER "${CMAKE_MATCH_1}") ENDIF () if (${REDHAT_VERSION_NUMBER} EQUAL 6) - SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "MariaDB-columnstore-libs" "MariaDB-columnstore-shared" "snappy" "net-tools") + SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "MariaDB-columnstore-shared" "snappy" "net-tools") # Disable auto require as this will also try to pull Boost via RPM SET(CPACK_RPM_PACKAGE_AUTOREQPROV " no") elseif (${SUSE_VERSION_NUMBER} EQUAL 12) - SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost-devel >= 1.54.0" "MariaDB-columnstore-libs" "libsnappy1" "jemalloc" "net-tools") + SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "boost-devel >= 1.54.0" "libsnappy1" "jemalloc" "net-tools") else () - SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "MariaDB-columnstore-libs" "snappy" "jemalloc" "net-tools") + SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "boost >= 1.53.0" "snappy" "jemalloc" "net-tools") endif() -SETA(CPACK_RPM_columnstore-engine_PACKAGE_REQUIRES "MariaDB-columnstore-libs") - -SET(CPACK_RPM_columnstore-platform_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preInstall_platform.sh) -SET(CPACK_RPM_columnstore-platform_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_platform.sh) -SET(CPACK_RPM_columnstore-libs_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_libs.sh) +SET(CPACK_RPM_columnstore-engine_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preInstall_storeage_engine.sh) SET(CPACK_RPM_columnstore-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_storage_engine.sh) - -SET(CPACK_RPM_columnstore-platform_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_platform.sh) -SET(CPACK_RPM_columnstore-libs_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_libs.sh) SET(CPACK_RPM_columnstore-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_storage_engine.sh) SET(CPACK_RPM_SPEC_MORE_DEFINE "${CPACK_RPM_SPEC_MORE_DEFINE} @@ -128,10 +111,6 @@ SET(ignored #%define _prefix ${CMAKE_INSTALL_PREFIX} #") -SET(CPACK_RPM_columnstore-platform_USER_FILELIST ${ignored}) - -SET(CPACK_RPM_columnstore-libs_USER_FILELIST ${ignored}) - SET(CPACK_RPM_columnstore-engine_USER_FILELIST ${ignored}) INCLUDE (CPack) diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt index 7ce5207ff..7de884262 100644 --- a/dbcon/ddlpackage/CMakeLists.txt +++ b/dbcon/ddlpackage/CMakeLists.txt @@ -36,5 +36,5 @@ ADD_LIBRARY(ddlpackage SHARED ${FLEX_ddl_scan_OUTPUTS} ) -INSTALL(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +INSTALL(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/dbcon/ddlpackageproc/CMakeLists.txt b/dbcon/ddlpackageproc/CMakeLists.txt index e23091615..ff0d6dda0 100644 --- a/dbcon/ddlpackageproc/CMakeLists.txt +++ b/dbcon/ddlpackageproc/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(ddlpackageproc SHARED ${ddlpackageproc_LIB_SRCS}) target_link_libraries(ddlpackageproc ${NETSNMP_LIBRARIES}) -install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt index da3129ac7..965974318 100644 --- a/dbcon/dmlpackage/CMakeLists.txt +++ b/dbcon/dmlpackage/CMakeLists.txt @@ -38,5 +38,5 @@ ADD_LIBRARY(dmlpackage SHARED ) -INSTALL(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +INSTALL(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/dbcon/dmlpackageproc/CMakeLists.txt b/dbcon/dmlpackageproc/CMakeLists.txt index f63db5522..131d72fc5 100644 --- a/dbcon/dmlpackageproc/CMakeLists.txt +++ b/dbcon/dmlpackageproc/CMakeLists.txt @@ -17,6 +17,6 @@ add_library(dmlpackageproc SHARED ${dmlpackageproc_LIB_SRCS}) target_link_libraries(dmlpackageproc ${NETSNMP_LIBRARIES}) -install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/dbcon/execplan/CMakeLists.txt b/dbcon/execplan/CMakeLists.txt index a0293e8f8..fa8f52b12 100755 --- a/dbcon/execplan/CMakeLists.txt +++ b/dbcon/execplan/CMakeLists.txt @@ -48,5 +48,5 @@ add_library(execplan SHARED ${execplan_LIB_SRCS}) target_link_libraries(execplan ${NETSNMP_LIBRARIES} ${MARIADB_STRING_LIBS}) -install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index 072194795..43adeacc6 100644 --- a/dbcon/joblist/CMakeLists.txt +++ b/dbcon/joblist/CMakeLists.txt @@ -59,11 +59,11 @@ set(joblist_LIB_SRCS add_library(joblist SHARED ${joblist_LIB_SRCS}) -install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) if (WITH_ORDERBY_UT) add_executable(job_orderby_tests orderby-tests.cpp) target_link_libraries(job_orderby_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${CPPUNIT_LIBRARIES} cppunit) - install(TARGETS job_orderby_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) + install(TARGETS job_orderby_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) endif() diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 0fbfb0ca1..c920c8657 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -3043,9 +3043,15 @@ int ha_mcs_impl_write_row(const uchar* buf, TABLE* table, uint64_t rows_changed) ha_rows rowsInserted = 0; int rc = 0; - if ( (ci->useCpimport > 0) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) && (!ci->singleInsert) && ((ci->isLoaddataInfile) || - ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || - ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT)) ) + // ci->useCpimport = 2 means ALWAYS use cpimport, whether it's in a + // transaction or not. User should use this option very carefully since + // cpimport currently does not support rollbacks + if (((ci->useCpimport == 2) || + ((ci->useCpimport == 1) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))))) && + (!ci->singleInsert) && + ((ci->isLoaddataInfile) || + ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || + ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT)) ) { rc = ha_mcs_impl_write_batch_row_(buf, table, *ci); } @@ -3173,7 +3179,11 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table) if (((thd->lex)->sql_command == SQLCOM_INSERT) && (rows > 0)) ci->useCpimport = 0; - if ((ci->useCpimport > 0) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) //If autocommit on batch insert will use cpimport to load data + // ci->useCpimport = 2 means ALWAYS use cpimport, whether it's in a + // transaction or not. User should use this option very carefully since + // cpimport currently does not support rollbacks + if ((ci->useCpimport == 2) || + ((ci->useCpimport == 1) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))))) //If autocommit on batch insert will use cpimport to load data { //store table info to connection info CalpontSystemCatalog::TableName tableName; @@ -3635,9 +3645,12 @@ int ha_mcs_impl_end_bulk_insert(bool abort, TABLE* table) // @bug 2515. Check command intead of vtable state if ( ( ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || (thd->lex)->sql_command == SQLCOM_INSERT_SELECT) && !ci->singleInsert ) { - if ((ci->useCpimport > 0) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) && (!ci->singleInsert) && ((ci->isLoaddataInfile) || - ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || - ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT)) ) + if (((ci->useCpimport == 2) || + ((ci->useCpimport == 1) && (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))))) && + (!ci->singleInsert) && + ((ci->isLoaddataInfile) || + ((thd->lex)->sql_command == SQLCOM_INSERT) || ((thd->lex)->sql_command == SQLCOM_LOAD) || + ((thd->lex)->sql_command == SQLCOM_INSERT_SELECT)) ) { #ifdef _MSC_VER @@ -3832,14 +3845,15 @@ int ha_mcs_impl_end_bulk_insert(bool abort, TABLE* table) } } - if (!(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) - { - ci->singleInsert = true; // reset the flag - ci->isLoaddataInfile = false; - ci->tableOid = 0; - ci->rowsHaveInserted = 0; - ci->useCpimport = 1; - } + // MCOL-4002 We earlier had these re-initializations set only for + // non-transactions, i.e.: + // !(thd->variables.option_bits & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) + // However, we should be resetting these members anyways. + ci->singleInsert = true; // reset the flag + ci->isLoaddataInfile = false; + ci->tableOid = 0; + ci->rowsHaveInserted = 0; + ci->useCpimport = 1; return rc; } diff --git a/dbcon/mysql/ha_mcs_sysvars.cpp b/dbcon/mysql/ha_mcs_sysvars.cpp index 597d50efa..66856f26e 100644 --- a/dbcon/mysql/ha_mcs_sysvars.cpp +++ b/dbcon/mysql/ha_mcs_sysvars.cpp @@ -270,13 +270,28 @@ static MYSQL_THDVAR_ULONG( 1 // block size ); -static MYSQL_THDVAR_BOOL( +const char* mcs_use_import_for_batchinsert_values[] = { + "OFF", + "ON", + "ALWAYS", + NullS +}; + +static TYPELIB mcs_use_import_for_batchinsert_values_lib = { + array_elements(mcs_use_import_for_batchinsert_values) - 1, + "mcs_use_import_for_batchinsert_values", + mcs_use_import_for_batchinsert_values, + NULL +}; + +static MYSQL_THDVAR_ENUM( use_import_for_batchinsert, - PLUGIN_VAR_NOCMDARG, + PLUGIN_VAR_RQCMDARG, "LOAD DATA INFILE and INSERT..SELECT will use cpimport internally", NULL, // check NULL, // update - 1 // default + 1, // default + &mcs_use_import_for_batchinsert_values_lib // values lib ); static MYSQL_THDVAR_BOOL( @@ -508,11 +523,12 @@ void set_local_query(THD* thd, ulong value) THDVAR(thd, local_query) = value; } -bool get_use_import_for_batchinsert(THD* thd) +mcs_use_import_for_batchinsert_t get_use_import_for_batchinsert(THD* thd) { - return ( thd == NULL ) ? false : THDVAR(thd, use_import_for_batchinsert); + return ( thd == NULL ) ? mcs_use_import_for_batchinsert_t::ON : + (mcs_use_import_for_batchinsert_t) THDVAR(thd, use_import_for_batchinsert); } -void set_use_import_for_batchinsert(THD* thd, bool value) +void set_use_import_for_batchinsert(THD* thd, ulong value) { THDVAR(thd, use_import_for_batchinsert) = value; } diff --git a/dbcon/mysql/ha_mcs_sysvars.h b/dbcon/mysql/ha_mcs_sysvars.h index 1efe29fcc..90d3b99a5 100644 --- a/dbcon/mysql/ha_mcs_sysvars.h +++ b/dbcon/mysql/ha_mcs_sysvars.h @@ -33,6 +33,13 @@ enum mcs_compression_type_t { SNAPPY = 2 }; +// use_import_for_batchinsert +enum mcs_use_import_for_batchinsert_t { + OFF = 0, + ON = 1, + ALWAYS = 2 +}; + // simple setters/getters const char* get_original_query(THD* thd); void set_original_query(THD* thd, char* query); @@ -94,8 +101,8 @@ void set_double_for_decimal_math(THD* thd, bool value); ulong get_local_query(THD* thd); void set_local_query(THD* thd, ulong value); -bool get_use_import_for_batchinsert(THD* thd); -void set_use_import_for_batchinsert(THD* thd, bool value); +mcs_use_import_for_batchinsert_t get_use_import_for_batchinsert(THD* thd); +void set_use_import_for_batchinsert(THD* thd, ulong value); ulong get_import_for_batchinsert_delimiter(THD* thd); void set_import_for_batchinsert_delimiter(THD* thd, ulong value); diff --git a/ddlproc/CMakeLists.txt b/ddlproc/CMakeLists.txt index 80703b77b..aac4fbb09 100644 --- a/ddlproc/CMakeLists.txt +++ b/ddlproc/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(DDLProc ${DDLProc_SRCS}) target_link_libraries(DDLProc ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} threadpool) -install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/dmlproc/CMakeLists.txt b/dmlproc/CMakeLists.txt index 267b9aee7..9a18fbd4c 100644 --- a/dmlproc/CMakeLists.txt +++ b/dmlproc/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable(DMLProc ${DMLProc_SRCS}) target_link_libraries(DMLProc ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} threadpool ddlcleanuputil batchloader) -install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/exemgr/CMakeLists.txt b/exemgr/CMakeLists.txt index ae4ca54b4..e869e4371 100644 --- a/exemgr/CMakeLists.txt +++ b/exemgr/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(ExeMgr ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIB target_include_directories(ExeMgr PRIVATE ${Boost_INCLUDE_DIRS}) -install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### install files ############### diff --git a/oam/cloud/CMakeLists.txt b/oam/cloud/CMakeLists.txt index b5e7130ab..97b8e5180 100644 --- a/oam/cloud/CMakeLists.txt +++ b/oam/cloud/CMakeLists.txt @@ -1,4 +1,4 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/MCSVolumeCmds.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/MCSVolumeCmds.sh" @ONLY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/MCSInstanceCmds.sh.in" "${CMAKE_CURRENT_SOURCE_DIR}/MCSInstanceCmds.sh" @ONLY) -install(PROGRAMS MCSInstanceCmds.sh MCSVolumeCmds.sh MCSgetCredentials.sh DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(PROGRAMS MCSInstanceCmds.sh MCSVolumeCmds.sh MCSgetCredentials.sh DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/oam/etc/CMakeLists.txt b/oam/etc/CMakeLists.txt index 3223de1d4..68f5eda61 100644 --- a/oam/etc/CMakeLists.txt +++ b/oam/etc/CMakeLists.txt @@ -4,4 +4,4 @@ install(FILES AlarmConfig.xml Columnstore.xml ProcessConfig.xml ConsoleCmds.xml - DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT columnstore-platform) + DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT columnstore-engine) diff --git a/oam/etc/Columnstore.xml b/oam/etc/Columnstore.xml index 84922e166..d1014dd22 100644 --- a/oam/etc/Columnstore.xml +++ b/oam/etc/Columnstore.xml @@ -1,13 +1,13 @@ - - + - + 0.0.0.0 + 1 - 0.0.0.0 + 127.0.0.1 8601 unassigned @@ -16,7 +16,7 @@ 8602 - 0.0.0.0 + 127.0.0.1 8603 @@ -24,7 +24,7 @@ 8606 - 0.0.0.0 + 127.0.0.1 8604 @@ -51,7 +51,7 @@ 8800 - 0.0.0.0 + 127.0.0.1 8800 @@ -63,19 +63,19 @@ 8622 - 0.0.0.0 + 127.0.0.1 8622 - 0.0.0.0 + 127.0.0.1 8630 - 0.0.0.0 + 127.0.0.1 8612 - 0.0.0.0 + 127.0.0.1 8614 @@ -83,7 +83,7 @@ 1 - 8 + 2 128 10K 0 @@ -93,145 +93,148 @@ 1 0 - y + n y + + + - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 - 0.0.0.0 + 127.0.0.1 8620 columnstore-1 pm1 unassigned - unassigned + pm1 1 3 12 // 2.5 minutes @@ -296,7 +299,7 @@ um User Module SIMPLEX - 1 + 0 0.0.0.0 unassigned ENABLED @@ -320,8 +323,8 @@ Performance Module SIMPLEX 1 - 0.0.0.0 - unassigned + 127.0.0.1 + localhost ENABLED 0 0 @@ -369,14 +372,14 @@ 1 - 0.0.0.0 + 127.0.0.1 8616 - 0.0.0.0 + 127.0.0.1 8700 - unassigned + pm1 0.0.0.0 @@ -427,7 +430,7 @@ - + 1 0 @@ -436,18 +439,19 @@ 2K 200 0 + 50 n - n - n - 1 + y + y + 2 n n internal internal - rpm - unassigned + binary + /etc/rsyslog.d/49-columnstore.conf unassigned autoassign unassigned @@ -471,7 +475,8 @@ 3306 /dev/xvd /var/lock/subsys - unassigned + /etc/profile.d/columnstoreAlias.sh + 64 1G - 50% - 10% + 100% + 100% 100 N "; - - while (oldFile.getline(line, 200)) - { - buf = line; - - string::size_type pos = buf.find(entry, 0); - - if (pos != string::npos) - { - pos = buf.find(firstComment, 0); - - if (pos == string::npos) - { - return true; - } - else - { - buf = buf.substr(pos + 4, 80); - - pos = buf.find(lastComment, 0); - - if (pos == string::npos) - { - return true; - } - else - { - buf = buf.substr(0, pos); - } - } - } - - //output to temp file - lines.push_back(buf); - } - - oldFile.close(); - unlink (fileName.c_str()); - ofstream newFile (fileName.c_str()); - - //create new file - int fd = open(fileName.c_str(), O_RDWR | O_CREAT, 0664); - - copy(lines.begin(), lines.end(), ostream_iterator(newFile, "\n")); - newFile.close(); - - close(fd); - return true; -} - -/* - * Make makeRClocal to set mount scheduler - */ -bool makeRClocal(string moduleType, string moduleName, int IserverTypeInstall) -{ - - return true; - - vector lines; - - string mount1; - string mount2 - ; - - switch ( IserverTypeInstall ) - { - case (oam::INSTALL_NORMAL): // normal - { - if ( moduleType == "um" ) - mount1 = "/mnt\\/tmp/"; - else if ( moduleType == "pm" ) - mount1 = "/columnstore\\/data/"; - else - return true; - - break; - } - - case (oam::INSTALL_COMBINE_DM_UM_PM): // combined #1 - dm/um/pm - { - if ( moduleType == "pm" ) - { - mount1 = "/mnt\\/tmp/"; - mount2 = "/columnstore\\/data/"; - } - else - return true; - - break; - } - } - - if ( !mount1.empty() ) - { - string line1 = "for scsi_dev in `mount | awk '" + mount1 + " {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'`; do"; - string line2 = "echo deadline > /sys/block/$scsi_dev/queue/scheduler"; - string line3 = "done"; - - lines.push_back(line1); - lines.push_back(line2); - lines.push_back(line3); - } - else - { - if ( !mount2.empty() ) - { - string line1 = "for scsi_dev in `mount | awk '" + mount2 + " {print $1}' | awk -F/ '{print $3}' | sed 's/[0-9]*$//'`; do"; - string line2 = "echo deadline > /sys/block/$scsi_dev/queue/scheduler"; - string line3 = "done"; - - lines.push_back(line1); - lines.push_back(line2); - lines.push_back(line3); - } - } - - if ( lines.begin() == lines.end()) - return true; - - string RCfileName = "/etc/rc.d/rc.local"; - std::ofstream file; - - file.open(RCfileName.c_str(), std::ios::out | std::ios::app); - - if (file.fail()) - { - RCfileName = "/etc/rc.local"; - - file.open(RCfileName.c_str(), std::ios::out | std::ios::app); - - if (file.fail()) - return true; - } - - file.exceptions(file.exceptions() | std::ios::failbit | std::ifstream::badbit); - - copy(lines.begin(), lines.end(), ostream_iterator(file, "\n")); - - file.close(); - - return true; -} - -/* - * createDbrootDirs - */ -bool createDbrootDirs(string DBRootStorageType, bool amazonInstall) -{ - int rtnCode; - string cmd; - - // mount data1 and create directories if configured with storage - if ( DBRootStorageType == "external" ) - { - string cmd = "mount /var/lib/columnstore/data1 > " + tmpDir + "/mount.log 2>&1"; - system(cmd.c_str()); - - if ( !rootUser) - { - //if Amazon, Non-Root, and External EBS, use sudo - string SUDO = ""; - if ( amazonInstall ) - SUDO = "sudo "; - - cmd = SUDO + "chown -R " + USER + ":" + USER + " /var/lib/columnstore/data1 > /dev/null"; - system(cmd.c_str()); - } - - // create system file directories - cmd = "mkdir -p /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1"; - rtnCode = system(cmd.c_str()); - - if (WEXITSTATUS(rtnCode) != 0) - { - cout << endl << "Error: failed to make mount dbrm dir" << endl; - return false; - } - } - - cmd = "chmod 755 -R /var/lib/columnstore/data1/systemFiles/dbrm > /dev/null 2>&1"; - system(cmd.c_str()); - - return true; -} - -/* - * pkgCheck - */ -bool pkgCheck(string columnstorePackage) -{ - while (true) - { - string fileName = tmpDir + "/calpontpkgs"; - - string cmd = "ls " + columnstorePackage + " > " + fileName; - system(cmd.c_str()); - - string pkg = columnstorePackage; - ifstream oldFile (fileName.c_str()); - - if (oldFile) - { - oldFile.seekg(0, std::ios::end); - int size = oldFile.tellg(); - - if ( size != 0 ) - { - oldFile.close(); - unlink (fileName.c_str()); - // pkgs found - return true; - } - } - - cout << endl << " Error: can't locate " + pkg + " Package in directory " + HOME << endl << endl; - - if ( noPrompting ) - exit(1); - - while (true) - { - pcommand = callReadline("Please place a copy of the MariaDB ColumnStore Packages in directory " + HOME + " and press to continue or enter 'exit' to exit the install > "); - - if (pcommand) - { - if (strcmp(pcommand, "exit") == 0) - { - callFree(pcommand); - return false; - } - - if (strlen(pcommand) == 0) - { - callFree(pcommand); - break; - } - - callFree(pcommand); - cout << "Invalid entry, please re-enter" << endl; - - if ( noPrompting ) - exit(1); - - continue; - } - - break; - } - } - - return true; -} - -bool storageSetup(bool amazonInstall) -{ - Oam oam; - - try - { - DBRootStorageType = sysConfig->getConfig(InstallSection, "DBRootStorageType"); - } - catch (...) - { - cout << "ERROR: Problem getting DB Storage Data from the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - if ( DBRootStorageType == "hdfs") - hdfs = true; - - if ( DBRootStorageType == "DataRedundancy") - DataRedundancy = true; - - sysConfig->setConfig("StorageManager", "Enabled", "N"); - if ( reuseConfig == "y" ) - { - cout << "===== Storage Configuration = " + DBRootStorageType + " =====" << endl << endl; - - if (DBRootStorageType == "storagemanager") - { - hdfs = false; - sysConfig->setConfig("StorageManager", "Enabled", "Y"); - sysConfig->setConfig("SystemConfig", "DataFilePlugin", "libcloudio.so"); - } - - return true; - } - - cout << "===== Setup Storage Configuration =====" << endl << endl; - - string storageType; - - if ( IserverTypeInstall != oam::INSTALL_COMBINE_DM_UM_PM && amazonInstall ) - { - // - // get Frontend Data storage type - // - - cout << "----- Setup User Module MariaDB ColumnStore Data Storage Mount Configuration -----" << endl << endl; - - cout << "There are 2 options when configuring the storage: internal and external" << endl << endl; - cout << " 'internal' - This is specified when a local disk is used for the Data storage." << endl << endl; - cout << " 'external' - This is specified when the MariaDB ColumnStore Data directory is externally mounted." << endl << endl; - - try - { - UMStorageType = sysConfig->getConfig(InstallSection, "UMStorageType"); - } - catch (...) - { - cout << "ERROR: Problem getting UM DB Storage Data from the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - while (true) - { - storageType = "1"; - - if ( UMStorageType == "external" ) - storageType = "2"; - - prompt = "Select the type of Data Storage [1=internal, 2=external] (" + storageType + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) storageType = pcommand; - - callFree(pcommand); - } - - if ( storageType == "1" || storageType == "2") - break; - - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - - if ( storageType == "1" ) - UMStorageType = "internal"; - else - { - - cout << endl << "NOTE: The volume type. This can be gp2 for General Purpose SSD, io1 for" << endl; - cout << " Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold" << endl; - cout << " HDD, or standard for Magnetic volumes." << endl; - - UMStorageType = "external"; - - cout << endl; - - try - { - oam.getSystemConfig("UMVolumeType", UMVolumeType); - } - catch (...) - {} - - if ( UMVolumeType.empty() || UMVolumeType == "" || UMVolumeType == oam::UnassignedName) - UMVolumeType = "gp2"; - - while (true) - { - string prompt = "Enter EBS Volume Type (gp2, io1, sc1, st1, standard) : (" + UMVolumeType + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) UMVolumeType = pcommand; - - callFree(pcommand); - } - - if ( UMVolumeType == "standard" || UMVolumeType == "gp2" || UMVolumeType == "io1" || UMVolumeType == "sc1" || UMVolumeType == "st1") - break; - else - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - } - - //set UMVolumeType - try - { - sysConfig->setConfig(InstallSection, "UMVolumeType", UMVolumeType); - } - catch (...) - { - cout << "ERROR: Problem setting UMVolumeType in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - string minSize = "1"; - string maxSize = "16384"; - - if (UMVolumeType == "io1") - minSize = "4"; - - if (UMVolumeType == "sc1" || UMVolumeType == "st1") - minSize = "500"; - - if (UMVolumeType == "standard") - maxSize = "1024"; - - cout << endl; - - try - { - oam.getSystemConfig("UMVolumeSize", UMVolumeSize); - } - catch (...) - {} - - if ( UMVolumeSize.empty() || UMVolumeSize == "" || UMVolumeSize == oam::UnassignedName) - UMVolumeSize = minSize; - - while (true) - { - string prompt = "Enter EBS Volume storage size in GB: [" + minSize + "," + maxSize + "] (" + UMVolumeSize + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) UMVolumeSize = pcommand; - - callFree(pcommand); - } - - if ( atoi(UMVolumeSize.c_str()) < atoi(minSize.c_str()) || atoi(UMVolumeSize.c_str()) > atoi(maxSize.c_str()) ) - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - else - break; - } - - //set UMVolumeSize - try - { - sysConfig->setConfig(InstallSection, "UMVolumeSize", UMVolumeSize); - } - catch (...) - { - cout << "ERROR: Problem setting UMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - - if ( UMVolumeType == "io1" ) - { - string minIOPS = UMVolumeSize; - string maxIOPS = oam.itoa(atoi(UMVolumeSize.c_str()) * 30); - - cout << endl; - - try - { - oam.getSystemConfig("UMVolumeIOPS", UMVolumeIOPS); - } - catch (...) - {} - - if ( UMVolumeIOPS.empty() || UMVolumeIOPS == "" || UMVolumeIOPS == oam::UnassignedName) - UMVolumeIOPS = maxIOPS; - - while (true) - { - string prompt = "Enter EBS Volume IOPS: [" + minIOPS + "," + maxIOPS + "] (" + UMVolumeIOPS + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) UMVolumeSize = pcommand; - - callFree(pcommand); - } - - if ( atoi(UMVolumeSize.c_str()) < atoi(minIOPS.c_str()) || atoi(UMVolumeSize.c_str()) > atoi(maxIOPS.c_str()) ) - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - else - break; - } - - //set UMVolumeIOPS - try - { - sysConfig->setConfig(InstallSection, "UMVolumeIOPS", UMVolumeIOPS); - } - catch (...) - { - cout << "ERROR: Problem setting UMVolumeIOPS in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - } - - try - { - sysConfig->setConfig(InstallSection, "UMStorageType", UMStorageType); - } - catch (...) - { - cout << "ERROR: Problem setting UMStorageType in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - else - { - try - { - sysConfig->setConfig(InstallSection, "UMStorageType", "internal"); - } - catch (...) - { - cout << "ERROR: Problem setting UMStorageType in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - - //check if gluster is installed - int rtnCode = 1; - - rtnCode = system("gluster --version > /tmp/gluster.log 2>&1"); - - if (rtnCode == 0) - { - glusterInstalled = "y"; - } - else - { - glusterInstalled = "n"; - } - - //check if hadoop is installed - string hadoopLog = tmpDir + "/hadoop.log"; - - string cmd = "which hadoop > " + hadoopLog + " 2>&1"; - system(cmd.c_str()); - - ifstream in(hadoopLog.c_str()); - - in.seekg(0, std::ios::end); - int size = in.tellg(); - - if ( size == 0 || oam.checkLogStatus(hadoopLog, "no hadoop")) - // no hadoop - size = 0; - else - hadoopInstalled = "y"; - - // check whether StorageManager is installed - Config *processConfig = Config::makeConfig((std::string(MCSSYSCONFDIR) + "/columnstore/ProcessConfig.xml").c_str()); - string storageManagerLocation; - bool storageManagerInstalled = false; - // search the 'PROCESSCONFIG#' entries for the StorageManager entry - for (uint i = 1; i <= MAX_PROCESS; i++) - { - char blah[20]; - sprintf(blah, "PROCESSCONFIG%d", i); - if (processConfig->getConfig(blah, "ProcessName") == "StorageManager") - { - storageManagerLocation = processConfig->getConfig(blah, "ProcessLocation"); - break; - } - } - storageManagerInstalled = boost::filesystem::exists(storageManagerLocation); - - if (configureS3) - { - try - { - modifySMConfigFile(); - } - catch (exception &e) - { - cerr << "There was an error processing the StorageManager command-line options." << endl; - cerr << "Got: " << e.what() << endl; - exit(1); - } - } - - // - // get Backend Data storage type - // - - // default to internal - storageType = "1"; - - if ( DBRootStorageType == "external" ) - storageType = "2"; - - if ( DBRootStorageType == "DataRedundancy" ) - storageType = "3"; - - if (DBRootStorageType == "storagemanager") - storageType = "4"; - - cout << endl << "----- Setup Performance Module DBRoot Data Storage Mount Configuration -----" << endl << endl; - - cout << "Columnstore supports the following storage options..." << endl; - cout << " 1 - internal. This uses the linux VFS to access files and does" << endl << - " not manage the filesystem." << endl; - cout << " 2 - external *. If you have other mountable filesystems you would" << endl << - " like ColumnStore to use & manage, select this option." << endl; - cout << " 3 - GlusterFS * Note: glusterd service must be running and enabled on" << endl << - " all PMs." << endl; - cout << " 4 - S3-compatible cloud storage *. Note: that should be configured" << endl << - " before running postConfigure (see storagemanager.cnf)" << endl; - cout << " * - This option enables data replication and server failover in a" << endl << - " multi-node configuration." << endl; - - cout << endl << "These options are available on this system: [1, 2"; - if (glusterInstalled == "y" && singleServerInstall != "1") - cout << ", 3"; - if (storageManagerInstalled) - cout << ", 4"; - cout << "]" << endl; - - prompt = "Select the type of data storage (" + storageType + ") > "; - - while (true) - { - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) storageType = pcommand; - - callFree(pcommand); - } - - if ((storageType == "1" || storageType == "2") // these are always valid options - || (glusterInstalled == "y" && singleServerInstall != "1" && storageType == "3") // allow gluster if installed - || (storageManagerInstalled && storageType == "4") // allow storagemanager if installed - ) - break; - - // if it gets here the selection was invalid - if (noPrompting) - { - cout << endl << "Invalid selection" << endl << endl; - exit(1); - } - cout << endl << "Invalid selection, please re-enter" << endl << endl; - - #if 0 - old version - if ( ( glusterInstalled == "n" || (glusterInstalled == "y" && singleServerInstall == "1")) && hadoopInstalled == "n" ) - { - if ( storageType == "1" || storageType == "2") - break; - - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - - if ( (glusterInstalled == "y" && singleServerInstall != "1") && hadoopInstalled == "n" ) - { - if ( storageType == "1" || storageType == "2" || storageType == "3") - break; - - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - - if ( ( glusterInstalled == "n" || (glusterInstalled == "y" && singleServerInstall == "1")) && hadoopInstalled == "y" ) - { - if ( storageType == "1" || storageType == "2" || storageType == "4") - { - break; - } - - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - - if ( (glusterInstalled == "y" && singleServerInstall != "1") && hadoopInstalled == "y" ) - { - if ( storageType == "1" || storageType == "2" || storageType == "3" || storageType == "4") - break; - - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - #endif - } - - if (storageType != "3" && DataRedundancy) - { - cout << "WARNING: This system was previously configured with ColumnStore DataRedundancy storage." << endl; - cout << " Before changing from DataRedundancy to another storage type," << endl; - cout << " existing data should be migrated to the targeted storage." << endl; - cout << " Please refer to the ColumnStore documentation for more information." << endl; - - cout << endl; - string continueInstall = "y"; - - while (true) - { - pcommand = callReadline("Would you like to continue with this storage setting? [y,n] (" + continueInstall + ") > "); - - if (pcommand) - { - if (strlen(pcommand) > 0) continueInstall = pcommand; - - callFree(pcommand); - } - - if ( continueInstall == "y" || continueInstall == "n" ) - break; - else - cout << "Invalid Entry, please enter 'y' for yes or 'n' for no" << endl; - - continueInstall = "y"; - - if ( noPrompting ) - exit(1); - } - - if ( continueInstall == "n") - exit(1); - } - - switch ( atoi(storageType.c_str()) ) - { - case (1): - { - DBRootStorageType = "internal"; - break; - } - - case (2): - { - DBRootStorageType = "external"; - break; - } - - case (3): - { - DBRootStorageType = "DataRedundancy"; - break; - } - - case 4: - DBRootStorageType = "storagemanager"; - break; - } - - //set DBRootStorageType - try - { - sysConfig->setConfig(InstallSection, "DBRootStorageType", DBRootStorageType); - } - catch (...) - { - cout << "ERROR: Problem setting DBRootStorageType in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - // if external and not amazon, print fstab note - if ( storageType == "2" && !amazonInstall) - { - cout << endl << "NOTE: For External configuration, the /etc/fstab should have been manually updated for the" << endl; - cout << " DBRoot mounts. Check the Installation Guide for further details" << endl << endl; - - } - - // if external and amazon, prompt for storage size - if ( storageType == "2" && amazonInstall) - { - cout << endl << "NOTE: The volume type. This can be gp2 for General Purpose SSD, io1 for" << endl; - cout << " Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold" << endl; - cout << " HDD, or standard for Magnetic volumes." << endl; - - cout << endl; - - try - { - oam.getSystemConfig("PMVolumeType", PMVolumeType); - } - catch (...) - {} - - if ( PMVolumeType.empty() || PMVolumeType == "" || PMVolumeType == oam::UnassignedName) - PMVolumeType = "gp2"; - - while (true) - { - string prompt = "Enter EBS Volume Type (gp2, io1, sc1, st1, standard) : (" + PMVolumeType + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) PMVolumeType = pcommand; - - callFree(pcommand); - } - - if ( PMVolumeType == "standard" || PMVolumeType == "gp2" || PMVolumeType == "io1" || PMVolumeType == "sc1" || PMVolumeType == "st1") - break; - else - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - } - - //set PMVolumeType - try - { - sysConfig->setConfig(InstallSection, "PMVolumeType", PMVolumeType); - } - catch (...) - { - cout << "ERROR: Problem setting PMVolumeType in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - cout << endl; - - string minSize = "1"; - string maxSize = "16384"; - - if (PMVolumeType == "io1") - minSize = "4"; - - if (PMVolumeType == "sc1" || PMVolumeType == "st1") - minSize = "500"; - - if (PMVolumeType == "standard") - maxSize = "1024"; - - try - { - oam.getSystemConfig("PMVolumeSize", PMVolumeSize); - } - catch (...) - {} - - if ( PMVolumeSize.empty() || PMVolumeSize == "" || PMVolumeSize == oam::UnassignedName) - PMVolumeSize = minSize; - - while (true) - { - string prompt = "Enter EBS Volume storage size in GB: [" + minSize + "," + maxSize + "] (" + PMVolumeSize + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) PMVolumeSize = pcommand; - - callFree(pcommand); - } - - if ( atoi(PMVolumeSize.c_str()) < atoi(minSize.c_str()) || atoi(PMVolumeSize.c_str()) > atoi(maxSize.c_str()) ) - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - else - break; - } - - //set PMVolumeSize - try - { - sysConfig->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize); - } - catch (...) - { - cout << "ERROR: Problem setting PMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - - if ( PMVolumeType == "io1" ) - { - string minIOPS = PMVolumeSize; - string maxIOPS = oam.itoa(atoi(PMVolumeSize.c_str()) * 30); - - cout << endl; - - try - { - oam.getSystemConfig("PMVolumeIOPS", PMVolumeIOPS); - } - catch (...) - {} - - if ( PMVolumeIOPS.empty() || PMVolumeIOPS == "" || PMVolumeIOPS == oam::UnassignedName) - PMVolumeIOPS = maxIOPS; - - while (true) - { - string prompt = "Enter EBS Volume IOPS: [" + minIOPS + "," + maxIOPS + "] (" + PMVolumeIOPS + ") > "; - pcommand = callReadline(prompt); - - if (pcommand) - { - if (strlen(pcommand) > 0) PMVolumeIOPS = pcommand; - - callFree(pcommand); - } - - if ( atoi(PMVolumeIOPS.c_str()) < atoi(minIOPS.c_str()) || atoi(PMVolumeIOPS.c_str()) > atoi(maxIOPS.c_str()) ) - { - cout << endl << "Invalid Entry, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - else - break; - } - - //set PMVolumeIOPS - try - { - sysConfig->setConfig(InstallSection, "PMVolumeIOPS", PMVolumeIOPS); - } - catch (...) - { - cout << "ERROR: Problem setting PMVolumeIOPS in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - - //set DBRootStorageType - try - { - sysConfig->setConfig(InstallSection, "PMVolumeSize", PMVolumeSize); - } - catch (...) - { - cout << "ERROR: Problem setting PMVolumeSize in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - - // if gluster - if ( storageType == "3" ) - { - string command = "stat /var/run/glusterd.pid > /dev/null 2>&1"; - int status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: No glusterd process detected. " << endl; - cout << " Start and enable glusterd on all PMs and run postConfigure again." << endl; - return false; - } - - DataRedundancy = true; - sysConfig->setConfig(InstallSection, "DataRedundancyConfig", "y"); - sysConfig->setConfig("PrimitiveServers", "DirectIO", "n"); - } - else - { - DataRedundancy = false; - sysConfig->setConfig(InstallSection, "DataRedundancyConfig", "n"); - sysConfig->setConfig("PrimitiveServers", "DirectIO", "y"); - } - - if (storageType == "4") - { - hdfs = false; - sysConfig->setConfig("StorageManager", "Enabled", "Y"); - sysConfig->setConfig("SystemConfig", "DataFilePlugin", "libcloudio.so"); - // Verify S3 Configuration settings - if (system("testS3Connection")) - { - cout << "ERROR: S3Storage Configuration check failed. Verify storagemanager.cnf settings and rerun postConfigure." << endl; - return false; - } - } - else - { - hdfs = false; - - try - { - sysConfig->setConfig("SystemConfig", "DataFilePlugin", ""); - } - catch (...) - { - cout << "ERROR: Problem setting DataFilePlugin in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - if ( !writeConfig(sysConfig) ) - { - cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - - if ( !writeConfig(sysConfig) ) - { - cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; - return false; - } - - return true; -} - - -void setSystemName() -{ - Oam oam; - - //setup System Name - - if ( systemName.empty() ) - { - try { - systemName = sysConfig->getConfig(SystemSection, "SystemName"); - } - catch(...) - { - systemName = oam::UnassignedName; - } - } - - if ( systemName.empty() ) - systemName = "columnstore-1"; - - if (!single_server_quick_install || !multi_server_quick_install) - { - prompt = "Enter System Name (" + systemName + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) systemName = pcommand; - - callFree(pcommand); - } - } - - try - { - sysConfig->setConfig(SystemSection, "SystemName", systemName); - oam.changeMyCnf( "server_audit_syslog_info", systemName ); - } - catch (...) - { - cout << "ERROR: Problem setting SystemName from the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - if ( !writeConfig(sysConfig) ) - { - cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } -} - -/* - * Copy fstab file - */ -bool copyFstab(string moduleName) -{ - string cmd; - cmd = "/bin/cp -f /etc/fstab /var/lib/columnstore/local/etc/" + moduleName + "/. > /dev/null 2>&1"; - - system(cmd.c_str()); - - return true; -} - - -/* - * Create a module file - */ -bool makeModuleFile(string moduleName, string parentOAMModuleName) -{ - string fileName; - - if ( moduleName == parentOAMModuleName) - fileName = "/var/lib/columnstore/local/module"; - else - fileName = "/var/lib/columnstore/local/etc/" + moduleName + "/module"; - - unlink (fileName.c_str()); - ofstream newFile (fileName.c_str()); - - string cmd = "echo " + moduleName + " > " + fileName; - system(cmd.c_str()); - - newFile.close(); - - return true; -} - -/* - * Create a module file - */ -bool updateBash() -{ - string fileName = HOME + "/.bashrc"; - + string fileName = homeDir + "/.bashrc"; ifstream newFile (fileName.c_str()); - newFile.close(); return true; - } - -void offLineAppCheck() -{ - //check for system startup type, process offline or online option - cout << endl << "===== Setup Process Startup offline Configuration =====" << endl << endl; - - string systemStartupOffline; - - try - { - systemStartupOffline = sysConfig->getConfig(InstallSection, "SystemStartupOffline"); - } - catch (...) - { - cout << "ERROR: Problem getting systemStartupOffline from the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - cout << endl; - string temp = "y"; - - while (true) - { - prompt = "Do you want the Database Processes started automatically at system startup [y,n] (y) > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) temp = pcommand; - - callFree(pcommand); - - if ( temp == "n" || temp == "y") - { - break; - } - - cout << "Invalid Option, please re-enter" << endl; - - if ( noPrompting ) - exit(1); - } - else - break; - } - - if ( temp == "y" ) - systemStartupOffline = "n"; - else - systemStartupOffline = "y"; - - try - { - sysConfig->setConfig(InstallSection, "SystemStartupOffline", systemStartupOffline); - } - catch (...) - { - cout << "ERROR: Problem setting systemStartupOffline in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } -} - -bool attachVolume(string instanceName, string volumeName, string deviceName, string dbrootPath) -{ - Oam oam; - -// cout << "Checking if Volume " << volumeName << " is attached , please wait..." << endl; - - string status = oam.getEC2VolumeStatus(volumeName); - - if ( status == "attached" ) - { - cout << " Volume " << volumeName << " is attached " << endl; -// cout << "Make sure it's device " << deviceName << " is mounted to DBRoot directory " << dbrootPath << endl; - return true; - } - - if ( status != "available" ) - { - cout << " ERROR: Volume " << volumeName << " status is " << status << endl; - cout << " Please resolve and re-run postConfigure" << endl; - return false; - } - else - { - /* cout << endl; - string temp = "y"; - while(true) - { - prompt = "Volume is unattached and available, do you want to attach it? [y,n] (y) > "; - pcommand = callReadline(prompt.c_str()); - if (pcommand) { - if (strlen(pcommand) > 0) temp = pcommand; - callFree(pcommand); - if ( temp == "n" || temp == "y") { - break; - } - cout << "Invalid Option, please re-enter" << endl; - if ( noPrompting ) - exit(1); - } - else - break; - } - - if ( temp == "y" ) { - */ cout << " Attaching, please wait..." << endl; - - if (oam.attachEC2Volume(volumeName, deviceName, instanceName)) - { - cout << " Volume " << volumeName << " is now attached " << endl; -// cout << "Make sure it's device " << deviceName << " is mounted to DBRoot directory " << dbrootPath << endl; - return true; - } - else - { - cout << " ERROR: Volume " << volumeName << " failed to attach" << endl; - cout << " Please resolve and re-run postConfigure" << endl; - return false; - } - - /* } - else - { - cout << "Volume " << volumeName << " will need to be attached before completing the install" << endl; - cout << "Please resolve and re-run postConfigure" << endl; - return false; - } - */ - } -} - - -bool singleServerDBrootSetup() -{ - Oam oam; - - cout << endl; - - //get number of dbroots - string moduledbrootcount = "ModuleDBRootCount1-3"; - unsigned int count; - - try - { - count = atoi(sysConfig->getConfig(ModuleSection, moduledbrootcount).c_str()); - } - catch (...) - { - cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - string dbrootList; - - for ( unsigned int id = 1 ; id < count + 1 ; ) - { - string moduledbrootid = "ModuleDBRootID1-" + oam.itoa(id) + "-3"; - - try - { - string dbrootid = sysConfig->getConfig(ModuleSection, moduledbrootid); - - if ( dbrootid != oam::UnassignedName) - { - sysConfig->setConfig(ModuleSection, moduledbrootid, oam::UnassignedName); - - dbrootList = dbrootList + dbrootid; - id ++; - - if ( id < count + 1 ) - dbrootList = dbrootList + ","; - } - } - catch (...) - { - cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - } - - vector dbroots; - string tempdbrootList; - - while (true) - { - dbroots.clear(); - - prompt = "Enter the list (Nx,Ny,Nz) or range (Nx-Nz) of DBRoot IDs assigned to module 'pm1' (" + dbrootList + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) - { - tempdbrootList = pcommand; - callFree(pcommand); - } - else - tempdbrootList = dbrootList; - } - - if ( tempdbrootList.empty()) - continue; - - //check for range - int firstID; - int lastID; - string::size_type pos = tempdbrootList.find("-", 0); - - if (pos != string::npos) - { - firstID = atoi(tempdbrootList.substr(0, pos).c_str()); - lastID = atoi(tempdbrootList.substr(pos + 1, 200).c_str()); - - if ( firstID >= lastID ) - { - cout << "Invalid Entry, please re-enter" << endl; - continue; - } - else - { - for ( int id = firstID ; id < lastID + 1 ; id++ ) - { - dbroots.push_back(oam.itoa(id)); - } - } - } - else - { - boost::char_separator sep(","); - boost::tokenizer< boost::char_separator > tokens(tempdbrootList, sep); - - for ( boost::tokenizer< boost::char_separator >::iterator it = tokens.begin(); - it != tokens.end(); - ++it) - { - dbroots.push_back(*it); - } - } - - break; - } - - int id = 1; - std::vector::iterator it = dbroots.begin(); - - for (; it != dbroots.end() ; it++, ++id) - { - //store DBRoot ID - string moduledbrootid = "ModuleDBRootID1-" + oam.itoa(id) + "-3"; - - try - { - sysConfig->setConfig(ModuleSection, moduledbrootid, *it); - } - catch (...) - { - cout << "ERROR: Problem setting DBRoot ID in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - string DBrootID = "DBRoot" + *it; - string pathID = "/var/lib/columnstore/data" + *it; - - try - { - sysConfig->setConfig(SystemSection, DBrootID, pathID); - } - catch (...) - { - cout << "ERROR: Problem setting DBRoot in the MariaDB ColumnStore System Configuration file" << endl; - return false; - } - } - - //store number of dbroots - moduledbrootcount = "ModuleDBRootCount1-3"; - - try - { - sysConfig->setConfig(ModuleSection, moduledbrootcount, oam.itoa(dbroots.size())); - } - catch (...) - { - cout << "ERROR: Problem setting DBRoot count in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - //total dbroots on the system - DBRootCount = DBRootCount + dbroots.size(); - - if ( !writeConfig(sysConfig) ) - { - cout << "ERROR: Failed trying to update MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - return true; -} - -pthread_mutex_t THREAD_LOCK; - -void remoteInstallThread(void* arg) -{ - thread_data_t* data = (thread_data_t*)arg; - - for ( int retry = 0 ; retry < 5 ; retry++ ) - { - int rtnCode = system((data->command).c_str()); - - if (WEXITSTATUS(rtnCode) == 0) - { - //success - pthread_exit(0); - } - else - { - if (WEXITSTATUS(rtnCode) == 2) - { - //timeout retry - continue; - } - else - { - //failure - pthread_mutex_lock(&THREAD_LOCK); - cout << endl << "Failure with a remote module install, check install log files in " << tmpDir << endl; - exit(1); - } - } - } - - pthread_mutex_lock(&THREAD_LOCK); - cout << endl << "Failure with a remote module install, check install log files in " << tmpDir << endl; - exit(1); -} - -std::string launchInstance(ModuleIP moduleip) -{ - Oam oam; - - //get module info - string moduleName = moduleip.moduleName; - string IPAddress = moduleip.IPaddress; - string instanceName = oam::UnassignedName; - - //due to bad instances getting launched causing scp failures - //have retry login around fail scp command where a instance will be relaunched - int instanceRetry = 0; - - for ( ; instanceRetry < 5 ; instanceRetry ++ ) - { - if ( moduleName.find("um") == 0 ) - { - string UserModuleInstanceType; - - try - { - oam.getSystemConfig("UMInstanceType", UserModuleInstanceType); - } - catch (...) {} - - string UserModuleSecurityGroup; - - try - { - oam.getSystemConfig("UMSecurityGroup", UserModuleSecurityGroup); - } - catch (...) {} - - instanceName = oam.launchEC2Instance(moduleName, IPAddress, UserModuleInstanceType, UserModuleSecurityGroup); - } - else - instanceName = oam.launchEC2Instance(moduleName, IPAddress); - - if ( instanceName == "failed" ) - { - cout << " *** Failed to Launch an Instance for " + moduleName << ", will retry up to 5 times" << endl; - continue; - } - - cout << endl << "Launched Instance for " << moduleName << ": " << instanceName << endl; - - //give time for instance to startup - sleep(60); - - string ipAddress = oam::UnassignedName; - - bool pass = false; - - for ( int retry = 0 ; retry < 60 ; retry++ ) - { - //get IP Address of pm instance - if ( ipAddress == oam::UnassignedName || ipAddress == "stopped" || ipAddress == "No-IPAddress" ) - { - ipAddress = oam.getEC2InstanceIpAddress(instanceName); - - if (ipAddress == "stopped" || ipAddress == "No-IPAddress" ) - { - sleep(5); - continue; - } - } - - pass = true; - break; - } - - if (!pass) - { - oam.terminateEC2Instance( instanceName ); - continue; - } - - string autoTagging; - oam.getSystemConfig("AmazonAutoTagging", autoTagging); - - if ( autoTagging == "y" ) - { - string tagValue = systemName + "-" + moduleName; - oam.createEC2tag( instanceName, "Name", tagValue ); - } - - break; - } - - if ( instanceRetry >= 5 ) - { - cout << " *** Failed to Successfully Launch Instance for " + moduleName << endl; - return oam::UnassignedName; - } - - return instanceName; -} - -bool glusterSetup(string password, bool doNotResolveHostNames) -{ - Oam oam; - int dataRedundancyCopies = 0; - int dataRedundancyNetwork = 0; - int numberDBRootsPerPM = DBRootCount / pmNumber; - int numberBricksPM = 0; - std::vector dbrootPms[DBRootCount]; - DataRedundancySetup DataRedundancyConfigs[pmNumber]; - string command = ""; - string remoteCommand = "remote_command.sh "; - - // how many copies? - if (pmNumber > 2) - { - cout << endl; - cout << endl << "----- Setup Data Redundancy Copy Count Configuration -----" << endl << endl; - cout << "Setup the Number of Copies: This is the total number of copies of the data" << endl; - cout << "in the system. At least 2, but not more than the number of PMs(" + oam.itoa(pmNumber) + "), are required." << endl << endl; - - while (dataRedundancyCopies < 2 || dataRedundancyCopies > pmNumber) - { - dataRedundancyCopies = 2; //minimum 2 copies - prompt = "Enter Number of Copies [2-" + oam.itoa(pmNumber) + "] (" + oam.itoa(dataRedundancyCopies) + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) dataRedundancyCopies = atoi(pcommand); - - callFree(pcommand); - } - - if ( dataRedundancyCopies < 2 || dataRedundancyCopies > pmNumber ) - { - cout << endl << "ERROR: Invalid Copy Count '" + oam.itoa(dataRedundancyCopies) + "', please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - - continue; - } - } - } - else if (pmNumber == 2) - { - dataRedundancyCopies = 2; //minimum 2 copies - cout << endl; - cout << "Only 2 PMs configured. Setting number of copies at 2." << endl; - } - else - { - // This should never happen - cout << endl; - cout << "ERROR: Invalid value for pm count Data Redundancy could not be configured." << endl; - exit(1); - } - - //update count - try - { - sysConfig->setConfig(InstallSection, "DataRedundancyCopies", oam.itoa(dataRedundancyCopies)); - } - catch (...) - { - cout << "ERROR: Problem setting DataRedundancyCopies in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - numberBricksPM = numberDBRootsPerPM * dataRedundancyCopies; - - - cout << endl << "----- Setup Data Redundancy Network Configuration -----" << endl << endl; - - - cout << " 'existing' - This is specified when using previously configured network devices. (NIC Interface #1)" << endl; - cout << " No additional network configuration is required with this option." << endl << endl; - cout << " 'dedicated' - This is specified when it is desired for Data Redundancy traffic to use" << endl; - cout << " a separate network than one previously configured for ColumnStore." << endl; - cout << " You will be prompted to provide Hostname and IP information for each PM." << endl << endl; - cout << endl; - - while ( dataRedundancyNetwork != 1 && dataRedundancyNetwork != 2 ) - { - dataRedundancyNetwork = 1; - prompt = "Select the data redundancy network [1=existing, 2=dedicated] (" + oam.itoa(dataRedundancyNetwork) + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) dataRedundancyNetwork = atoi(pcommand);; - - callFree(pcommand); - } - - if ( dataRedundancyNetwork != 1 && dataRedundancyNetwork != 2 ) - { - cout << "Invalid Entry, please re-enter" << endl << endl; - dataRedundancyNetwork = 0; - - if ( noPrompting ) - exit(1); - - continue; - } - - //update network type - try - { - sysConfig->setConfig(InstallSection, "DataRedundancyNetworkType", oam.itoa(dataRedundancyNetwork)); - } - catch (...) - { - cout << "ERROR: Problem setting DataRedundancyNetworkType in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - } - - if (dataRedundancyNetwork == 2) - { - //loop through pms and get hostname and IP address for each - for (int pm = 0; pm < pmNumber; pm++) - { - DataRedundancyConfigs[pm].pmID = pm + 1; - string dataDupIPaddr = "ModuleIPAddr" + oam.itoa(DataRedundancyConfigs[pm].pmID) + "-1-3"; - string dataDupHostName = "ModuleHostName" + oam.itoa(DataRedundancyConfigs[pm].pmID) + "-1-3"; - string moduleIPAddr = sysConfig->getConfig("DataRedundancyConfig", dataDupIPaddr); - string moduleHostName = sysConfig->getConfig("DataRedundancyConfig", dataDupHostName); - - if ( moduleIPAddr.empty() ) - { - moduleIPAddr = oam::UnassignedIpAddr; - } - - if ( moduleHostName.empty() ) - { - moduleHostName = oam::UnassignedName; - } - - prompt = "Enter PM #" + oam.itoa(DataRedundancyConfigs[pm].pmID) + " Host Name (" + moduleHostName + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) - { - moduleHostName = pcommand; - moduleIPAddr = oam::UnassignedIpAddr; - } - - callFree(pcommand); - } - - if ( moduleIPAddr == oam::UnassignedIpAddr) - { - //get IP Address - string IPAddress; - if (doNotResolveHostNames) - if (resolveHostNamesToReverseDNSNames) { - IPAddress = resolveHostNameToReverseDNSName(moduleHostName); - } - else { - IPAddress = moduleHostName; - } - else - IPAddress = oam.getIPAddress( moduleHostName); - - if ( !IPAddress.empty() ) - moduleIPAddr = IPAddress; - else - moduleIPAddr = oam::UnassignedIpAddr; - } - - if ( moduleIPAddr == "127.0.0.1") - moduleIPAddr = "unassigned"; - - //prompt for IP address - while (true) - { - prompt = "Enter PM #" + oam.itoa(DataRedundancyConfigs[pm].pmID) + " IP Address or hostname of " + moduleHostName + " (" + moduleIPAddr + ") > "; - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) moduleIPAddr = pcommand; - - callFree(pcommand); - } - - if (!doNotResolveHostNames) - { - string ugh = oam.getIPAddress(moduleIPAddr); - if (ugh.length() > 0) - moduleIPAddr = ugh; - } - - if (moduleIPAddr == "127.0.0.1" || moduleIPAddr == "0.0.0.0" || moduleIPAddr == "128.0.0.1") - { - cout << endl << moduleIPAddr + " is an Invalid IP Address for a multi-server system, please re-enter" << endl << endl; - moduleIPAddr = "unassigned"; - - if ( noPrompting ) - exit(1); - - continue; - } - - if (oam.isValidIP(moduleIPAddr) || doNotResolveHostNames) - { - - // run ping test to validate - string cmdLine = "ping "; - string cmdOption = " -c 1 -w 5 >> /dev/null"; - string cmd = cmdLine + moduleIPAddr + cmdOption; - int rtnCode = system(cmd.c_str()); - - if ( WEXITSTATUS(rtnCode) != 0 ) - { - //NIC failed to respond to ping - string temp = "2"; - - while (true) - { - cout << endl; - prompt = "IP Address of '" + moduleIPAddr + "' failed ping test, please validate. Do you want to continue or re-enter [1=continue, 2=re-enter] (2) > "; - - if ( noPrompting ) - exit(1); - - pcommand = callReadline(prompt.c_str()); - - if (pcommand) - { - if (strlen(pcommand) > 0) temp = pcommand; - - callFree(pcommand); - } - - if ( temp == "1" || temp == "2") - break; - else - { - temp = "2"; - cout << endl << "Invalid entry, please re-enter" << endl; - - if ( noPrompting ) - exit(1); - } - } - - cout << endl; - - if ( temp == "1") - break; - } - else // good ping - break; - } - else - { - cout << endl << "Invalid IP Address format, xxx.xxx.xxx.xxx, please re-enter" << endl << endl; - - if ( noPrompting ) - exit(1); - } - } - - //set Host Name and IP - try - { - sysConfig->setConfig("DataRedundancyConfig", dataDupHostName, moduleHostName); - sysConfig->setConfig("DataRedundancyConfig", dataDupIPaddr, moduleIPAddr); - DataRedundancyConfigs[pm].pmID = pm + 1; - DataRedundancyConfigs[pm].pmIpAddr = moduleIPAddr; - DataRedundancyConfigs[pm].pmHostname = moduleHostName; - } - catch (...) - { - cout << "ERROR: Problem setting Host Name in the MariaDB ColumnStore Data Redundancy Configuration" << endl; - exit(1); - } - } - } - else - { - for (int pm = 0; pm < pmNumber; pm++) - { - string pmIPaddr = "ModuleIPAddr" + oam.itoa(pm + 1) + "-1-3"; - string pmHostName = "ModuleHostName" + oam.itoa(pm + 1) + "-1-3"; - DataRedundancyConfigs[pm].pmID = pm + 1; - DataRedundancyConfigs[pm].pmIpAddr = sysConfig->getConfig("SystemModuleConfig", pmIPaddr); - DataRedundancyConfigs[pm].pmHostname = sysConfig->getConfig("SystemModuleConfig", pmHostName); - } - } - - /* - cout << endl; - cout << "OK. You have " + oam.itoa(pmNumber) + " PMs, " + oam.itoa(DBRootCount) + " DBRoots, and you have chosen to keep " + oam.itoa(dataRedundancyCopies) << endl; - cout << "copies of the data. You can choose to place the copies in " << endl; - cout << "/gluster or you can specify individual, mountable device names. " << endl; - /// [directory,storage] (directory) > - while( dataRedundancyStorage != 1 && dataRedundancyStorage != 2 ) - { - dataRedundancyStorage = 1; - prompt = "Select the data redundancy storage device [1=directory, 2=storage] (" + oam.itoa(dataRedundancyStorage) + ") > "; - pcommand = callReadline(prompt.c_str()); - if (pcommand) - { - if (strlen(pcommand) > 0) dataRedundancyStorage = atoi(pcommand);; - callFree(pcommand); - } - - if ( dataRedundancyStorage != 1 && dataRedundancyStorage != 2 ) { - cout << "Invalid Entry, please re-enter" << endl << endl; - dataRedundancyStorage = 0; - if ( noPrompting ) - exit(1); - continue; - } - //update network type - try { - sysConfig->setConfig(InstallSection, "DataRedundancyStorageType", oam.itoa(dataRedundancyStorage)); - } - catch(...) - { - cout << "ERROR: Problem setting DataRedundancyStorageType in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - } - - if (dataRedundancyStorage == 2) - { - int numberStorageLocations = DBRootCount*dataRedundancyCopies; - cout << endl; - cout << "You will need " + oam.itoa(numberStorageLocations) + "total storage locations," << endl; - cout << "and " + oam.itoa(numberBricksPM) + " storage locations per PM. You will now " << endl; - cout << "be asked to enter the device names for the storage locations." << endl; - - //loop through pms and get storage locations for each - for (int pm=0; pm < pmNumber; pm++) - { - vector::iterator dbrootID = DataRedundancyConfigs[pm].dbrootCopies.begin(); - for (; dbrootID < DataRedundancyConfigs[pm].dbrootCopies.end(); dbrootID++ ) - { - int brick = (*dbrootID); - cout << "PM#" + oam.itoa(DataRedundancyConfigs[pm].pmID) + " brick#" + oam.itoa(brick) + " : " << endl; - } - for (int brick=0; brick < numberBricksPM; brick++) - { - prompt = "Enter a storage locations for PM#" + oam.itoa(DataRedundancyConfigs[pm].pmID) + " brick#" + oam.itoa(brick) + " : "; - pcommand = callReadline(prompt.c_str()); - if (pcommand) - { - if (strlen(pcommand) > 0) - { - DataRedundancyStorageSetup dataredundancyStorageItem; - dataredundancyStorageItem.brickID = brick; - dataredundancyStorageItem.storageLocation = pcommand; - //get filesystem type - prompt = "Enter a filesystem type for storage location " + dataredundancyStorageItem.storageLocation + " (ext2,ext3,xfs,etc): "; - pcommand = callReadline(prompt.c_str()); - if (pcommand) - { - if (strlen(pcommand) > 0) - { - dataredundancyStorageItem.storageFilesytemType = pcommand; - } - callFree(pcommand); - } - DataRedundancyConfigs[pm].storageLocations.push_back(dataredundancyStorageItem); - } - callFree(pcommand); - } - } - } - } - */ - // User config complete setup the gluster bricks - cout << endl << "----- Performing Data Redundancy Configuration -----" << endl << endl; - - // This will distribute DBRootCopies evenly across PMs - for (int pm = 0; pm < pmNumber; pm++) - { - int dbrootCopy = DataRedundancyConfigs[pm].pmID; - int nextPM = DataRedundancyConfigs[pm].pmID; - - if (nextPM >= pmNumber) - { - nextPM = 0; - } - - for ( int i = 0; i < numberDBRootsPerPM; i++) - { - DataRedundancyConfigs[pm].dbrootCopies.push_back(dbrootCopy); - - for ( int copies = 0; copies < (dataRedundancyCopies - 1); copies++) - { - DataRedundancyConfigs[nextPM].dbrootCopies.push_back(dbrootCopy); - nextPM++; - - if (nextPM >= pmNumber) - { - nextPM = 0; - } - - if (nextPM == pm) - { - nextPM++; - } - - if (nextPM >= pmNumber) - { - nextPM = 0; - } - } - - dbrootCopy += pmNumber; - } - } - - // Store to config and distribute so that GLUSTER_WHOHAS will work - for (int db = 0; db < DBRootCount; db++) - { - int dbrootID = db + 1; - string dbrootIDPMs = ""; - string moduleDBRootIDPMs = "DBRoot" + oam.itoa(dbrootID) + "PMs"; - - for (int pm = 0; pm < pmNumber; pm++) - { - if (find(DataRedundancyConfigs[pm].dbrootCopies.begin(), DataRedundancyConfigs[pm].dbrootCopies.end(), dbrootID) != DataRedundancyConfigs[pm].dbrootCopies.end()) - { - //dbrootPms for each dbroot there is a list of PMs for building the gluster volume commands below - dbrootPms[db].push_back(DataRedundancyConfigs[pm].pmID); - dbrootIDPMs += oam.itoa(DataRedundancyConfigs[pm].pmID); - dbrootIDPMs += " "; - } - } - - // Store to config and distribute so that GLUSTER_WHOHAS will work - sysConfig->setConfig("DataRedundancyConfig", moduleDBRootIDPMs, dbrootIDPMs); - } - - int status; - - for (int pm = 0; pm < pmNumber; pm++) - { - for ( int brick = 1; brick <= numberBricksPM; brick++) - { - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + " 'mkdir -p /var/lib/columnstore/gluster/brick" + oam.itoa(brick) + "'"; - status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: failed to make directory(" << DataRedundancyConfigs[pm].pmIpAddr << "): '" << command << "'" << endl; - exit(1); - } - - /* - if (dataRedundancyStorage == 2) - { - //walk data storage locations and modify fstab to reflect the storage locations entered by user - vector::iterator storageSetupIter=DataRedundancyConfigs[pm].storageLocations.begin(); - for (; storageSetupIter < DataRedundancyConfigs[pm].storageLocations.end(); storageSetupIter++ ) - { - if (rootUser) - { - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + - " 'echo " + (*storageSetupIter).storageLocation + " " + - installDir + "/gluster/brick" + oam.itoa(brick) + " " + - (*storageSetupIter).storageFilesytemType + " defaults 1 2 >> /etc/fstab'"; - } - else - { - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + - " 'sudo bash -c `sudo echo " + (*storageSetupIter).storageLocation + " " + - installDir + "/gluster/brick" + oam.itoa(brick) + " " + - (*storageSetupIter).storageFilesytemType + " defaults 1 2 >> /etc/fstab`'"; - } - status = system(command.c_str()); - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: command failed: " << command << endl; - exit(1); - } - if (rootUser) - { - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + - " 'mount " + installDir + "/gluster/brick" + oam.itoa(brick) + "'"; - } - else - { - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + - " 'sudo bash -c `sudo mount " + installDir + "/gluster/brick" + oam.itoa(brick) + "`'"; - } - status = system(command.c_str()); - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: command failed: " << command << endl; - exit(1); - } - if (!rootUser) - { - int user; - user = getuid(); - command = remoteCommand + DataRedundancyConfigs[pm].pmIpAddr + " " + password + - "'sudo bash -c `sudo chown -R " + oam.itoa(user) + ":" + oam.itoa(user) + " " + installDir + "/gluster/brick" + oam.itoa(brick) + "`'"; - status = system(command.c_str()); - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR(" << status <<"): command failed: " << command << endl; - } - } - - } - } - */ - } - - string errmsg1; - string errmsg2; - int ret = oam.glusterctl(oam::GLUSTER_PEERPROBE, DataRedundancyConfigs[pm].pmIpAddr, password, errmsg2); - - if ( ret != 0 ) - { - exit(1); - } - } - - sleep(5); - - if (rootUser) - { - command = "gluster peer status >> /tmp/glusterCommands.txt 2>&1"; - } - else - { - command = "sudo gluster peer status >> /tmp/glusterCommands.txt 2>&1"; - } - - status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: peer status command failed." << endl; - exit(1); - } - - //Need to wait since peer probe success does not always mean it is ready for volume create command - //TODO: figureout a cleaner way to do this. - sleep(10); - // Build the gluster volumes and start them for each dbroot - int pmnextbrick[pmNumber]; - - for (int pm = 0; pm < pmNumber; pm++) - { - pmnextbrick[pm] = 1; - } - - for (int db = 0; db < DBRootCount; db++) - { - int dbrootID = db + 1; - - if (rootUser) - { - command = "gluster volume create dbroot" + oam.itoa(dbrootID) + " transport tcp replica " + oam.itoa(dataRedundancyCopies) + " "; - } - else - { - command = "sudo gluster volume create dbroot" + oam.itoa(dbrootID) + " transport tcp replica " + oam.itoa(dataRedundancyCopies) + " "; - } - - vector::iterator dbrootPmIter = dbrootPms[db].begin(); - - for (; dbrootPmIter < dbrootPms[db].end(); dbrootPmIter++ ) - { - int pm = (*dbrootPmIter) - 1; - command += DataRedundancyConfigs[pm].pmIpAddr + ":/var/lib/columnstore/gluster/brick" + oam.itoa(pmnextbrick[pm]) + " "; - pmnextbrick[pm]++; - } - - command += "force >> /tmp/glusterCommands.txt 2>&1"; - cout << "Gluster create and start volume dbroot" << oam.itoa(dbrootID) << "..."; - status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - if (oam.checkLogStatus("/tmp/glusterCommands.txt", "dbroot" + oam.itoa(dbrootID) + " already exists" )) - { - string errmsg1; - string errmsg2; - int ret = oam.glusterctl(oam::GLUSTER_DELETE, oam.itoa(dbrootID), errmsg1, errmsg2); - - if ( ret != 0 ) - { - cerr << "FAILURE: Error replacing existing gluster dbroot# " + oam.itoa(dbrootID) + ", error: " + errmsg1 << endl; - exit(1); - } - - status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: Failed to create volume dbroot" << oam.itoa(dbrootID) << endl; - exit(1); - } - } - else - { - cout << "ERROR: Failed to create volume dbroot" << oam.itoa(dbrootID) << endl; - exit(1); - } - } - - if (rootUser) - { - command = "gluster volume start dbroot" + oam.itoa(dbrootID) + " >> /tmp/glusterCommands.txt 2>&1"; - status = system(command.c_str()); - - if (WEXITSTATUS(status) != 0 ) - { - cout << "ERROR: Failed to start dbroot" << oam.itoa(dbrootID) << endl; - exit(1); - } - } - else - { - int user = getuid(); - int group = getgid(); - command = "sudo gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-uid " + oam.itoa(user) + " >> /tmp/glusterCommands.txt 2>&1";; - status = system(command.c_str()); - -if (WEXITSTATUS(status) != 0) -{ - cout << "ERROR: Failed to start dbroot" << oam.itoa(dbrootID) << endl; - exit(1); -} - -command = "sudo gluster volume set dbroot" + oam.itoa(dbrootID) + " storage.owner-gid " + oam.itoa(group) + " >> /tmp/glusterCommands.txt 2>&1";; -status = system(command.c_str()); - -if (WEXITSTATUS(status) != 0) -{ - cout << "ERROR: Failed to start dbroot" << oam.itoa(dbrootID) << endl; - exit(1); -} - -command = "sudo gluster volume start dbroot" + oam.itoa(dbrootID) + " >> /tmp/glusterCommands.txt 2>&1"; -status = system(command.c_str()); - -if (WEXITSTATUS(status) != 0) -{ - cout << "ERROR: Failed to start dbroot" << oam.itoa(dbrootID) << endl; - exit(1); -} - } - - cout << "DONE" << endl; - } - - cout << endl << "----- Data Redundancy Configuration Complete -----" << endl << endl; - - return true; -} - -void singleServerConfigSetup(Config* sysConfig) -{ - - try - { - sysConfig->setConfig("ExeMgr1", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("ExeMgr1", "Module", "pm1"); - sysConfig->setConfig("ProcMgr", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("ProcMgr_Alarm", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("ProcStatusControl", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("pm1_ProcessMonitor", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("pm1_ServerMonitor", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("pm1_WriteEngineServer", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("DDLProc", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("DMLProc", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS1", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS2", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS3", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS4", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS5", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS6", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS7", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS8", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS9", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS10", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS11", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS12", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS13", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS14", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS15", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS16", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS17", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS18", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS19", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS20", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS21", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS22", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS23", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS24", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS25", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS26", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS27", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS28", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS29", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS30", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS31", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("PMS32", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("SystemModuleConfig", "ModuleCount2", "0"); - sysConfig->setConfig("SystemModuleConfig", "ModuleIPAddr1-1-3", "127.0.0.1"); - sysConfig->setConfig("SystemModuleConfig", "ModuleHostName1-1-3", "localhost"); - sysConfig->setConfig("DBRM_Controller", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("DBRM_Worker1", "IPAddr", "127.0.0.1"); - sysConfig->setConfig("DBRM_Worker1", "Module", "pm1"); - sysConfig->setConfig("DBBC", "NumBlocksPct", "50"); - sysConfig->setConfig("Installation", "InitialInstallFlag", "y"); - sysConfig->setConfig("Installation", "SingleServerInstall", "y"); - sysConfig->setConfig("HashJoin", "TotalUmMemory", "25%"); - } - catch (...) - { - cout << "ERROR: Problem setting for Single Server in the MariaDB ColumnStore System Configuration file" << endl; - exit(1); - } - - return; -} - -/** - Resolves the given hostname into its reverse DNS name. - - @param hostname the hostname to resolve. - @return the reverse dns name of given hostname or an empty string in case the hostname could not be resolved. -*/ -std::string resolveHostNameToReverseDNSName(std::string hostname) { - struct hostent *hp = gethostbyname(hostname.c_str()); - if (hp == NULL) { - std::cout << "Error: Couldn't resolve hostname " << hostname << " to ip address" << std::endl; - return ""; - } - struct hostent *rl = gethostbyaddr(hp->h_addr_list[0], sizeof hp->h_addr_list[0], AF_INET); - if (rl == NULL) { - std::cout << "Error: Couldn't resolve ip address of hostname " << hostname << " back to a hostname" << std::endl; - return ""; - } - hostname = rl->h_name; - return hostname; -} - // vim:ts=4 sw=4: diff --git a/oamapps/serverMonitor/CMakeLists.txt b/oamapps/serverMonitor/CMakeLists.txt index dbd4dcd53..6382859ce 100644 --- a/oamapps/serverMonitor/CMakeLists.txt +++ b/oamapps/serverMonitor/CMakeLists.txt @@ -22,5 +22,5 @@ target_compile_options(ServerMonitor PRIVATE -Wno-unused-result) target_link_libraries(ServerMonitor ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index f96f8eecb..43247cd16 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -27,6 +27,6 @@ add_executable(PrimProc ${PrimProc_SRCS}) target_link_libraries(PrimProc ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} threadpool cacheutils dbbc processor) -install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/procmgr/CMakeLists.txt b/procmgr/CMakeLists.txt index f1bc5fa09..707f4b8ac 100644 --- a/procmgr/CMakeLists.txt +++ b/procmgr/CMakeLists.txt @@ -12,5 +12,5 @@ target_compile_options(ProcMgr PRIVATE -Wno-unused-result) target_link_libraries(ProcMgr ${ENGINE_LDFLAGS} cacheutils ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/procmon/CMakeLists.txt b/procmon/CMakeLists.txt index a0a8045a1..186714e09 100644 --- a/procmon/CMakeLists.txt +++ b/procmon/CMakeLists.txt @@ -12,5 +12,5 @@ target_compile_options(ProcMon PRIVATE -Wno-unused-result) target_link_libraries(ProcMon ${ENGINE_LDFLAGS} cacheutils ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/storage-manager/CMakeLists.txt b/storage-manager/CMakeLists.txt index 4f7e01816..d7ce31dc4 100755 --- a/storage-manager/CMakeLists.txt +++ b/storage-manager/CMakeLists.txt @@ -131,22 +131,21 @@ target_link_libraries(smrm storagemanager cloudio install(TARGETS storagemanager LIBRARY DESTINATION ${ENGINE_LIBDIR} - COMPONENT columnstore-platform + COMPONENT columnstore-engine ) install(TARGETS StorageManager smcat smput smls smrm testS3Connection RUNTIME DESTINATION ${ENGINE_BINDIR} - COMPONENT columnstore-platform + COMPONENT columnstore-engine ) install(FILES storagemanager.cnf DESTINATION ${ENGINE_SYSCONFDIR}/columnstore - COMPONENT columnstore-platform + COMPONENT columnstore-engine ) install(FILES storagemanager.cnf RENAME storagemanager.cnf.example DESTINATION ${ENGINE_SYSCONFDIR}/columnstore - COMPONENT columnstore-platform + COMPONENT columnstore-engine ) - diff --git a/tools/clearShm/CMakeLists.txt b/tools/clearShm/CMakeLists.txt index 14a68ce09..b76ab4788 100644 --- a/tools/clearShm/CMakeLists.txt +++ b/tools/clearShm/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(clearShm ${clearShm_SRCS}) target_link_libraries(clearShm ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/cleartablelock/CMakeLists.txt b/tools/cleartablelock/CMakeLists.txt index d80ca05d7..c4ce10247 100644 --- a/tools/cleartablelock/CMakeLists.txt +++ b/tools/cleartablelock/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(cleartablelock ${cleartablelock_SRCS}) target_link_libraries(cleartablelock ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS}) -install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/configMgt/CMakeLists.txt b/tools/configMgt/CMakeLists.txt index ac6aaa236..56a4addc8 100644 --- a/tools/configMgt/CMakeLists.txt +++ b/tools/configMgt/CMakeLists.txt @@ -10,4 +10,4 @@ add_executable(autoConfigure ${autoConfigure_SRCS}) target_link_libraries(autoConfigure ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/cplogger/CMakeLists.txt b/tools/cplogger/CMakeLists.txt index 4a9af844f..3f8f79054 100644 --- a/tools/cplogger/CMakeLists.txt +++ b/tools/cplogger/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(cplogger ${cplogger_SRCS}) target_link_libraries(cplogger ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/dbbuilder/CMakeLists.txt b/tools/dbbuilder/CMakeLists.txt index c9b5ab816..d4c4280fe 100644 --- a/tools/dbbuilder/CMakeLists.txt +++ b/tools/dbbuilder/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(dbbuilder ${dbbuilder_SRCS}) target_link_libraries(dbbuilder ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS}) -install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/dbloadxml/CMakeLists.txt b/tools/dbloadxml/CMakeLists.txt index d7629c96b..aa9d09e65 100644 --- a/tools/dbloadxml/CMakeLists.txt +++ b/tools/dbloadxml/CMakeLists.txt @@ -15,5 +15,5 @@ add_executable(colxml ${colxml_SRCS}) target_link_libraries(colxml ${ENGINE_LDFLAGS} dbload ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS}) -install(TARGETS colxml DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS colxml DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/ddlcleanup/CMakeLists.txt b/tools/ddlcleanup/CMakeLists.txt index c8cac521c..befdf487b 100644 --- a/tools/ddlcleanup/CMakeLists.txt +++ b/tools/ddlcleanup/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(ddlcleanup ${ddlcleanup_SRCS}) target_link_libraries(ddlcleanup ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ddlcleanuputil) -install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/editem/CMakeLists.txt b/tools/editem/CMakeLists.txt index f7e38728d..4535c48e3 100644 --- a/tools/editem/CMakeLists.txt +++ b/tools/editem/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(editem ${editem_SRCS}) target_link_libraries(editem ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS editem DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS editem DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/getConfig/CMakeLists.txt b/tools/getConfig/CMakeLists.txt index a79409370..0aff38922 100644 --- a/tools/getConfig/CMakeLists.txt +++ b/tools/getConfig/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(mcsGetConfig ${getConfig_SRCS}) target_link_libraries(mcsGetConfig ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS mcsGetConfig DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS mcsGetConfig DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/idbmeminfo/CMakeLists.txt b/tools/idbmeminfo/CMakeLists.txt index 905c63c95..5b0fd3511 100644 --- a/tools/idbmeminfo/CMakeLists.txt +++ b/tools/idbmeminfo/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(idbmeminfo ${idbmeminfo_SRCS}) target_link_libraries(idbmeminfo ${ENGINE_LDFLAGS}) -install(TARGETS idbmeminfo DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS idbmeminfo DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/setConfig/CMakeLists.txt b/tools/setConfig/CMakeLists.txt index a1a0cad2c..33f413cf1 100644 --- a/tools/setConfig/CMakeLists.txt +++ b/tools/setConfig/CMakeLists.txt @@ -11,7 +11,7 @@ add_executable(mcsSetConfig ${setConfig_SRCS}) target_link_libraries(mcsSetConfig ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS mcsSetConfig DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS mcsSetConfig DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) -install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/tools/viewtablelock/CMakeLists.txt b/tools/viewtablelock/CMakeLists.txt index 24f97293a..7c2e7418e 100644 --- a/tools/viewtablelock/CMakeLists.txt +++ b/tools/viewtablelock/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(viewtablelock ${viewtablelock_SRCS}) target_link_libraries(viewtablelock ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/utils/batchloader/CMakeLists.txt b/utils/batchloader/CMakeLists.txt index 474133f95..66e2d0bcd 100644 --- a/utils/batchloader/CMakeLists.txt +++ b/utils/batchloader/CMakeLists.txt @@ -10,6 +10,6 @@ add_library(batchloader SHARED ${batchloader_LIB_SRCS}) target_link_libraries(batchloader ${NETSNMP_LIBRARIES}) -install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/cacheutils/CMakeLists.txt b/utils/cacheutils/CMakeLists.txt index 20b85b71b..02481aabd 100644 --- a/utils/cacheutils/CMakeLists.txt +++ b/utils/cacheutils/CMakeLists.txt @@ -8,5 +8,5 @@ set(cacheutils_LIB_SRCS cacheutils.cpp) add_library(cacheutils SHARED ${cacheutils_LIB_SRCS}) -install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/cloudio/CMakeLists.txt b/utils/cloudio/CMakeLists.txt index 5105f835e..1e00662e8 100755 --- a/utils/cloudio/CMakeLists.txt +++ b/utils/cloudio/CMakeLists.txt @@ -9,7 +9,7 @@ add_library(cloudio SHARED ${cloudio_LIB_SRCS}) # we should be able to reverse the dependency like so: target_link_libraries(cloudio idbdatafile messageqcpp loggingcpp) -install(TARGETS cloudio DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS cloudio DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) add_executable(cloudio_component_test component_test.cpp) diff --git a/utils/clusterTester/CMakeLists.txt b/utils/clusterTester/CMakeLists.txt index 8d8a930b7..d555374d8 100644 --- a/utils/clusterTester/CMakeLists.txt +++ b/utils/clusterTester/CMakeLists.txt @@ -1,5 +1,5 @@ install(PROGRAMS columnstoreClusterTester.sh os_detect.sh - DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) + DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/utils/common/CMakeLists.txt b/utils/common/CMakeLists.txt index 98405a032..c6a0fde01 100644 --- a/utils/common/CMakeLists.txt +++ b/utils/common/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(common SHARED ${common_LIB_SRCS}) add_dependencies(common loggingcpp) -install(TARGETS common DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS common DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/compress/CMakeLists.txt b/utils/compress/CMakeLists.txt index b2849b233..4156531e4 100644 --- a/utils/compress/CMakeLists.txt +++ b/utils/compress/CMakeLists.txt @@ -12,5 +12,5 @@ add_library(compress SHARED ${compress_LIB_SRCS}) target_link_libraries(compress ${SNAPPY_LIBRARIES}) -install(TARGETS compress DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS compress DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/configcpp/CMakeLists.txt b/utils/configcpp/CMakeLists.txt index 13f7b80aa..bc35134d9 100644 --- a/utils/configcpp/CMakeLists.txt +++ b/utils/configcpp/CMakeLists.txt @@ -9,5 +9,5 @@ add_library(configcpp SHARED ${configcpp_LIB_SRCS}) target_compile_definitions(configcpp PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) -install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/dataconvert/CMakeLists.txt b/utils/dataconvert/CMakeLists.txt index 8888b441b..c22def65b 100644 --- a/utils/dataconvert/CMakeLists.txt +++ b/utils/dataconvert/CMakeLists.txt @@ -8,4 +8,4 @@ set(dataconvert_LIB_SRCS dataconvert.cpp) add_library(dataconvert SHARED ${dataconvert_LIB_SRCS}) -install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/ddlcleanup/CMakeLists.txt b/utils/ddlcleanup/CMakeLists.txt index 7569800f1..ab6e31e22 100644 --- a/utils/ddlcleanup/CMakeLists.txt +++ b/utils/ddlcleanup/CMakeLists.txt @@ -10,5 +10,5 @@ add_library(ddlcleanuputil SHARED ${ddlcleanuputil_LIB_SRCS}) target_link_libraries(ddlcleanuputil ${NETSNMP_LIBRARIES}) -install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/funcexp/CMakeLists.txt b/utils/funcexp/CMakeLists.txt index fb9aea1f3..6b9f99283 100644 --- a/utils/funcexp/CMakeLists.txt +++ b/utils/funcexp/CMakeLists.txt @@ -112,5 +112,5 @@ add_library(funcexp SHARED ${funcexp_LIB_SRCS}) target_link_libraries(funcexp ${NETSNMP_LIBRARIES}) -install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/idbdatafile/CMakeLists.txt b/utils/idbdatafile/CMakeLists.txt index c61547ee1..c51cc60fb 100644 --- a/utils/idbdatafile/CMakeLists.txt +++ b/utils/idbdatafile/CMakeLists.txt @@ -19,4 +19,4 @@ target_link_libraries(idbdatafile ${NETSNMP_LIBRARIES} ${ENGINE_OAM_LIBS}) target_compile_definitions(idbdatafile PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) -install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index dd2003a1d..f1555e8bd 100644 --- a/utils/joiner/CMakeLists.txt +++ b/utils/joiner/CMakeLists.txt @@ -8,6 +8,6 @@ set(joiner_LIB_SRCS joiner.cpp tuplejoiner.cpp joinpartition.cpp) add_library(joiner SHARED ${joiner_LIB_SRCS}) -install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/libmarias3/CMakeLists.txt b/utils/libmarias3/CMakeLists.txt index 464c8c471..1be7f11e6 100644 --- a/utils/libmarias3/CMakeLists.txt +++ b/utils/libmarias3/CMakeLists.txt @@ -35,5 +35,5 @@ set(S3API_DEPS marias3 curl CACHE INTERNAL "S3API_DEPS") install(TARGETS marias3 DESTINATION ${ENGINE_LIBDIR} - COMPONENT columnstore-platform + COMPONENT columnstore-engine ) diff --git a/utils/libmysql_client/CMakeLists.txt b/utils/libmysql_client/CMakeLists.txt index 78324d632..ac6bd2cc8 100644 --- a/utils/libmysql_client/CMakeLists.txt +++ b/utils/libmysql_client/CMakeLists.txt @@ -7,5 +7,5 @@ set(libmysql_client_LIB_SRCS libmysql_client.cpp) add_library(libmysql_client SHARED ${libmysql_client_LIB_SRCS}) -install(TARGETS libmysql_client DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS libmysql_client DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/loggingcpp/CMakeLists.txt b/utils/loggingcpp/CMakeLists.txt index 0ce8f2925..6fe948258 100644 --- a/utils/loggingcpp/CMakeLists.txt +++ b/utils/loggingcpp/CMakeLists.txt @@ -29,7 +29,7 @@ add_library(loggingcpp SHARED ${CMAKE_CURRENT_BINARY_DIR}/errorids.h ) -install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) -install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT columnstore-platform) +install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_SYSCONFDIR}/columnstore COMPONENT columnstore-engine) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index 149eb3847..aa4b0e4f1 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -16,4 +16,4 @@ set(messageqcpp_LIB_SRCS add_library(messageqcpp SHARED ${messageqcpp_LIB_SRCS}) -install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index 8057468b5..ec05e0115 100644 --- a/utils/querystats/CMakeLists.txt +++ b/utils/querystats/CMakeLists.txt @@ -7,5 +7,5 @@ set(querystats_LIB_SRCS querystats.cpp) add_library(querystats SHARED ${querystats_LIB_SRCS}) -install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index d64a95163..f4792192b 100644 --- a/utils/querytele/CMakeLists.txt +++ b/utils/querytele/CMakeLists.txt @@ -14,5 +14,5 @@ set(querytele_LIB_SRCS add_library(querytele SHARED ${querytele_LIB_SRCS}) -install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/regr/CMakeLists.txt b/utils/regr/CMakeLists.txt index 7dca571f9..32d29b3f2 100755 --- a/utils/regr/CMakeLists.txt +++ b/utils/regr/CMakeLists.txt @@ -10,7 +10,7 @@ add_definitions(-DMYSQL_DYNAMIC_PLUGIN) add_library(regr SHARED ${regr_LIB_SRCS} ) -install(TARGETS regr DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS regr DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/rowgroup/CMakeLists.txt b/utils/rowgroup/CMakeLists.txt index f79e757aa..8bced21c0 100644 --- a/utils/rowgroup/CMakeLists.txt +++ b/utils/rowgroup/CMakeLists.txt @@ -12,5 +12,5 @@ add_library(rowgroup SHARED ${rowgroup_LIB_SRCS}) target_link_libraries(rowgroup ${NETSNMP_LIBRARIES} funcexp) -install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/rwlock/CMakeLists.txt b/utils/rwlock/CMakeLists.txt index fcde11218..c764067de 100644 --- a/utils/rwlock/CMakeLists.txt +++ b/utils/rwlock/CMakeLists.txt @@ -9,5 +9,5 @@ set(rwlock_LIB_SRCS rwlock.cpp rwlock_local.cpp) add_library(rwlock SHARED ${rwlock_LIB_SRCS}) -install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index 6939047b9..bc1a5858e 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -8,4 +8,4 @@ set(threadpool_LIB_SRCS weightedthreadpool.cpp threadpool.cpp prioritythreadpool add_library(threadpool SHARED ${threadpool_LIB_SRCS}) -install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/threadpool/threadpool.cpp b/utils/threadpool/threadpool.cpp index da2b5f24f..fbaadbd93 100644 --- a/utils/threadpool/threadpool.cpp +++ b/utils/threadpool/threadpool.cpp @@ -298,10 +298,10 @@ uint64_t ThreadPool::invoke(const Functor_T& threadfunc) logging::Message::Args args; logging::Message message(5); args.add("invoke: Blocked waiting for thread. Count "); - args.add(fThreadCount); + args.add(static_cast(fThreadCount)); args.add("max "); - args.add(fMaxThreads); - message.format( args ); + args.add(static_cast(fMaxThreads)); + message.format(args); logging::LoggingID lid(22); logging::MessageLog ml(lid); ml.logWarningMessage( message ); diff --git a/utils/thrift/CMakeLists.txt b/utils/thrift/CMakeLists.txt index d5c9a29af..709590478 100644 --- a/utils/thrift/CMakeLists.txt +++ b/utils/thrift/CMakeLists.txt @@ -16,5 +16,5 @@ add_definitions(-DTHRIFT_SQUELCH_CONSOLE_OUTPUT) add_library(thrift SHARED ${thrift_LIB_SRCS}) -install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index ade4c8415..2f47f5e66 100755 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -10,7 +10,7 @@ add_definitions(-DMYSQL_DYNAMIC_PLUGIN) add_library(udfsdk SHARED ${udfsdk_LIB_SRCS}) -install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) set(udf_mysql_LIB_SRCS udfmysql.cpp) diff --git a/utils/windowfunction/CMakeLists.txt b/utils/windowfunction/CMakeLists.txt index 9298cd1f3..4d30c2f8c 100755 --- a/utils/windowfunction/CMakeLists.txt +++ b/utils/windowfunction/CMakeLists.txt @@ -26,10 +26,10 @@ set(windowfunction_LIB_SRCS add_library(windowfunction SHARED ${windowfunction_LIB_SRCS}) -install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) if (WITH_SORTING_COMPARATORS_UT) add_executable(comparators_tests comparators-tests.cpp) target_link_libraries(comparators_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${CPPUNIT_LIBRARIES} cppunit) - install(TARGETS comparators_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) + install(TARGETS comparators_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) endif() diff --git a/versioning/BRM/CMakeLists.txt b/versioning/BRM/CMakeLists.txt index feda0c245..d8c2676b7 100644 --- a/versioning/BRM/CMakeLists.txt +++ b/versioning/BRM/CMakeLists.txt @@ -32,7 +32,7 @@ set(brm_LIB_SRCS add_library(brm SHARED ${brm_LIB_SRCS}) -install(TARGETS brm DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS brm DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -43,7 +43,7 @@ add_executable(controllernode ${controllernode_SRCS}) target_link_libraries(controllernode ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ) -install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -54,7 +54,7 @@ add_executable(workernode ${workernode_SRCS}) target_link_libraries(workernode ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS workernode DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS workernode DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -65,7 +65,7 @@ add_executable(dbrmctl ${dbrmctl_SRCS}) target_link_libraries(dbrmctl ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS}) -install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -76,7 +76,7 @@ add_executable(reset_locks ${reset_locks_SRCS}) target_link_libraries(reset_locks ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -87,7 +87,7 @@ add_executable(rollback ${rollback_SRCS}) target_link_libraries(rollback ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS rollback DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS rollback DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -98,7 +98,7 @@ add_executable(save_brm ${save_brm_SRCS}) target_link_libraries(save_brm ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### next target ############### @@ -109,5 +109,5 @@ add_executable(load_brm ${load_brm_SRCS}) target_link_libraries(load_brm ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/writeengine/bulk/CMakeLists.txt b/writeengine/bulk/CMakeLists.txt index dfc0e6fba..19f49bbc1 100644 --- a/writeengine/bulk/CMakeLists.txt +++ b/writeengine/bulk/CMakeLists.txt @@ -40,5 +40,5 @@ add_executable(cpimport.bin ${cpimport.bin_SRCS}) add_dependencies(cpimport.bin marias3) target_link_libraries(cpimport.bin ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${S3API_DEPS} we_bulk we_xml) -install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/writeengine/client/CMakeLists.txt b/writeengine/client/CMakeLists.txt index 431dd5583..b050cbd66 100644 --- a/writeengine/client/CMakeLists.txt +++ b/writeengine/client/CMakeLists.txt @@ -10,6 +10,6 @@ add_library(writeengineclient SHARED ${writeengineclient_LIB_SRCS}) target_link_libraries(writeengineclient ${NETSNMP_LIBRARIES}) -install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/writeengine/redistribute/CMakeLists.txt b/writeengine/redistribute/CMakeLists.txt index f53add736..6d6ac30df 100644 --- a/writeengine/redistribute/CMakeLists.txt +++ b/writeengine/redistribute/CMakeLists.txt @@ -16,5 +16,5 @@ target_link_libraries(writeengineredistribute ${NETSNMP_LIBRARIES}) target_compile_definitions(writeengineredistribute PUBLIC BOOST_NO_CXX11_SCOPED_ENUMS) -install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine) diff --git a/writeengine/server/CMakeLists.txt b/writeengine/server/CMakeLists.txt index 7629eaf64..ea77ecf36 100644 --- a/writeengine/server/CMakeLists.txt +++ b/writeengine/server/CMakeLists.txt @@ -21,5 +21,5 @@ add_executable(WriteEngineServer ${WriteEngineServer_SRCS}) target_link_libraries(WriteEngineServer ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute) -install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/writeengine/shared/CMakeLists.txt b/writeengine/shared/CMakeLists.txt index 0e62b7bef..0198cbfd8 100644 --- a/writeengine/shared/CMakeLists.txt +++ b/writeengine/shared/CMakeLists.txt @@ -4,7 +4,7 @@ include_directories(${ENGINE_COMMON_INCLUDES} ../dictionary) add_executable(we_shared_components_tests ./shared_components_tests.cpp) target_link_libraries(we_shared_components_tests ${ENGINE_LDFLAGS} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} ${CPPUNIT_LIBRARIES}) -install(TARGETS we_shared_components_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS we_shared_components_tests DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) ########### install files ############### diff --git a/writeengine/splitter/CMakeLists.txt b/writeengine/splitter/CMakeLists.txt index 1ab3f4b20..5fa0c71d6 100644 --- a/writeengine/splitter/CMakeLists.txt +++ b/writeengine/splitter/CMakeLists.txt @@ -19,5 +19,5 @@ add_executable(cpimport ${cpimport_SRCS}) target_link_libraries(cpimport ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${MARIADB_CLIENT_LIBS} ${ENGINE_WRITE_LIBS} batchloader threadpool marias3) -install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-platform) +install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR} COMPONENT columnstore-engine) diff --git a/writeengine/wrapper/CMakeLists.txt b/writeengine/wrapper/CMakeLists.txt index 8d9266c90..6f00e0c26 100644 --- a/writeengine/wrapper/CMakeLists.txt +++ b/writeengine/wrapper/CMakeLists.txt @@ -41,4 +41,4 @@ add_library(writeengine SHARED ${writeengine_LIB_SRCS}) target_link_libraries(writeengine ${NETSNMP_LIBRARIES}) -install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-libs) +install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR} COMPONENT columnstore-engine)