diff --git a/.gitignore b/.gitignore index 5f0c4de78..c9dc8e53a 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,8 @@ utils/loggingcpp/messageids.h CPackConfig.cmake CPackSourceConfig.cmake build/columnstore.community.spec +*.rpm +install_manifest_libs.txt +install_manifest_platform.txt +install_manifest_storage-engine.txt +_CPack_Packages diff --git a/CMakeLists.txt b/CMakeLists.txt index e537ee4ef..990191a97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,10 @@ MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") # custom packaging steps. OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON) -SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING - "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel") +IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE RELWITHDEBINFO CACHE STRING + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel" FORCE) +ENDIF(NOT CMAKE_BUILD_TYPE) #set( CMAKE_VERBOSE_MAKEFILE on ) @@ -49,6 +51,8 @@ SET (INSTALL_ENGINE "/usr/local/mariadb/columnstore") INCLUDE (configureEngine.cmake) INCLUDE (FindNetSNMP.cmake) +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/releasenum.in ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum @ONLY IMMEDIATE) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${INSTALL_ENGINE} COMPONENT platform) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) INCLUDE(bison.cmake) @@ -111,6 +115,20 @@ SET (ENGINE_WRITE_LIBS ddlpackageproc ddlpackage dmlpackageproc dmlpackage SET (ENGINE_COMMON_LDFLAGS "") +IF (SERVER_BUILD_INCLUDE_DIR) + SET (SERVER_BUILD_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${SERVER_BUILD_INCLUDE_DIR}) +ELSE() + SET (SERVER_BUILD_INCLUDE_DIR ${CMAKE_BINARY_DIR}/../include) +ENDIF() + +IF (SERVER_SOURCE_ROOT_DIR) + SET (SERVER_SOURCE_ROOT_DIR ${CMAKE_BINARY_DIR}/${SERVER_SOURCE_ROOT_DIR}) +ELSE() + SET (SERVER_SOURCE_ROOT_DIR ${CMAKE_BINARY_DIR}/..) +ENDIF() + +MESSAGE("SERVER_BUILD_INCLUDE_DIR = ${SERVER_BUILD_INCLUDE_DIR}") +MESSAGE("SERVER_SOURCE_ROOT_DIR = ${SERVER_SOURCE_ROOT_DIR}") #SET (ENGINE_UTILS_BOOSTIDB_INCLUDE "{CMAKE_CURRENT_SOURCE_DIR}/utils/boost_idb") SET (ENGINE_UTILS_XML_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/libxml") @@ -149,17 +167,13 @@ SET (ENGINE_UTILS_BATCHLDR_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/batchlo SET (ENGINE_UTILS_DDLCLEANUP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/ddlcleanup") SET (ENGINE_UTILS_QUERYSTATS_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/utils/querystats") SET (ENGINE_WE_CONFIGCPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/writeengine/xml") -SET (ENGINE_SERVER_SQL_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../sql") -SET (ENGINE_SERVER_SQL2_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../sql") -SET (ENGINE_SERVER_INCLUDE_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../include") -SET (ENGINE_SERVER_INCLUDE_INCLUDE2 "${CMAKE_CURRENT_SOURCE_DIR}/../include") -SET (ENGINE_SERVER_PCRE_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../../../pcre") -SET (ENGINE_SERVER_PCRE_INCLUDE2 "${CMAKE_CURRENT_SOURCE_DIR}/../pcre") +SET (ENGINE_SERVER_SQL_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/sql") +SET (ENGINE_SERVER_INCLUDE_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/include") +SET (ENGINE_SERVER_PCRE_INCLUDE "${SERVER_SOURCE_ROOT_DIR}/pcre") -SET (ENGINE_DEFAULT_INCLUDES "." "../" "../..") - -SET (ENGINE_COMMON_INCLUDES ${ENGINE_DEFAULT_INCLUDES} ${Boost_INCLUDE_DIR} ${ENGINE_UTILS_XML_INCLUDE} ${ENGINE_UTILS_MESSAGEQCPP_INCLUDE} ${ENGINE_WE_SHARED_INCLUDE} ${ENGINE_UTILS_IDBDATAFILE_INCLUDE} ${ENGINE_UTILS_LOGGINGCPP_INCLUDE} ${ENGINE_UTILS_CONFIGCPP_INCLUDE} ${ENGINE_UTILS_COMPRESS_INCLUDE} ${ENGINE_VERSIONING_BRM_INCLUDE} ${ENGINE_UTILS_ROWGROUP_INCLUDE} ${ENGINE_UTILS_COMMON_INCLUDE} ${ENGINE_UTILS_DATACONVERT_INCLUDE} ${ENGINE_UTILS_RWLOCK_INCLUDE} ${ENGINE_UTILS_FUNCEXP_INCLUDE} ${ENGINE_SNMPD_SNMPMANAGER_INCLUDE} ${ENGINE_UTILS_INCLUDE} ${ENGINE_OAM_OAMCPP_INCLUDE} ${ENGINE_DBCON_DDLPKGPROC_INCLUDE} ${ENGINE_DBCON_DDLPKG_INCLUDE} ${ENGINE_DBCON_EXECPLAN_INCLUDE} ${ENGINE_UTILS_STARTUP_INCLUDE} ${ENGINE_DBCON_JOBLIST_INCLUDE} ${ENGINE_WE_WRAPPER_INCLUDE} ${ENGINE_WE_SERVER_INCLUDE} ${ENGINE_DBCON_DMLPKG_INCLUDE} ${ENGINE_WE_CLIENT_INCLUDE} ${ENGINE_DBCON_DMLPKGPROC_INCLUDE} ${ENGINE_UTILS_CACHEUTILS_INCLUDE} ${ENGINE_UTILS_MYSQLCL_INCLUDE} ${ENGINE_UTILS_QUERYTELE_INCLUDE} ${ENGINE_UTILS_THRIFT_INCLUDE} ${ENGINE_UTILS_JOINER_INCLUDE} ${ENGINE_UTILS_THREADPOOL_INCLUDE} ${ENGINE_UTILS_BATCHLDR_INCLUDE} ${ENGINE_UTILS_DDLCLEANUP_INCLUDE} ${ENGINE_UTILS_QUERYSTATS_INCLUDE} ${ENGINE_WE_CONFIGCPP_INCLUDE} ${ENGINE_SERVER_SQL_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE} ${ENGINE_SERVER_PCRE_INCLUDE} ${ENGINE_SERVER_SQL2_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE2} ${ENGINE_SERVER_PCRE_INCLUDE2}) +SET (ENGINE_DEFAULT_INCLUDES "." "../" "../../" ${SERVER_BUILD_INCLUDE_DIR}) +SET (ENGINE_COMMON_INCLUDES ${ENGINE_DEFAULT_INCLUDES} ${Boost_INCLUDE_DIR} ${ENGINE_UTILS_XML_INCLUDE} ${ENGINE_UTILS_MESSAGEQCPP_INCLUDE} ${ENGINE_WE_SHARED_INCLUDE} ${ENGINE_UTILS_IDBDATAFILE_INCLUDE} ${ENGINE_UTILS_LOGGINGCPP_INCLUDE} ${ENGINE_UTILS_CONFIGCPP_INCLUDE} ${ENGINE_UTILS_COMPRESS_INCLUDE} ${ENGINE_VERSIONING_BRM_INCLUDE} ${ENGINE_UTILS_ROWGROUP_INCLUDE} ${ENGINE_UTILS_COMMON_INCLUDE} ${ENGINE_UTILS_DATACONVERT_INCLUDE} ${ENGINE_UTILS_RWLOCK_INCLUDE} ${ENGINE_UTILS_FUNCEXP_INCLUDE} ${ENGINE_SNMPD_SNMPMANAGER_INCLUDE} ${ENGINE_UTILS_INCLUDE} ${ENGINE_OAM_OAMCPP_INCLUDE} ${ENGINE_DBCON_DDLPKGPROC_INCLUDE} ${ENGINE_DBCON_DDLPKG_INCLUDE} ${ENGINE_DBCON_EXECPLAN_INCLUDE} ${ENGINE_UTILS_STARTUP_INCLUDE} ${ENGINE_DBCON_JOBLIST_INCLUDE} ${ENGINE_WE_WRAPPER_INCLUDE} ${ENGINE_WE_SERVER_INCLUDE} ${ENGINE_DBCON_DMLPKG_INCLUDE} ${ENGINE_WE_CLIENT_INCLUDE} ${ENGINE_DBCON_DMLPKGPROC_INCLUDE} ${ENGINE_UTILS_CACHEUTILS_INCLUDE} ${ENGINE_UTILS_MYSQLCL_INCLUDE} ${ENGINE_UTILS_QUERYTELE_INCLUDE} ${ENGINE_UTILS_THRIFT_INCLUDE} ${ENGINE_UTILS_JOINER_INCLUDE} ${ENGINE_UTILS_THREADPOOL_INCLUDE} ${ENGINE_UTILS_BATCHLDR_INCLUDE} ${ENGINE_UTILS_DDLCLEANUP_INCLUDE} ${ENGINE_UTILS_QUERYSTATS_INCLUDE} ${ENGINE_WE_CONFIGCPP_INCLUDE} ${ENGINE_SERVER_SQL_INCLUDE} ${ENGINE_SERVER_INCLUDE_INCLUDE} ${ENGINE_SERVER_PCRE_INCLUDE}) ADD_SUBDIRECTORY(utils) ADD_SUBDIRECTORY(oam/oamcpp) @@ -191,3 +205,25 @@ ADD_SUBDIRECTORY(writeengine/bulk) ADD_SUBDIRECTORY(writeengine/splitter) +#This should go away when netsnmp is removed from the builds +INSTALL(PROGRAMS ${ENGINE_LIBDIR}/libnetsnmpagent.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmpagent.so.30 + ${ENGINE_LIBDIR}/libnetsnmpagent.so + ${ENGINE_LIBDIR}/libnetsnmphelpers.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmphelpers.so.30 + ${ENGINE_LIBDIR}/libnetsnmphelpers.so + ${ENGINE_LIBDIR}/libnetsnmpmibs.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmpmibs.so.30 + ${ENGINE_LIBDIR}/libnetsnmpmibs.so + ${ENGINE_LIBDIR}/libnetsnmp.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmp.so.30 + ${ENGINE_LIBDIR}/libnetsnmp.so + ${ENGINE_LIBDIR}/libnetsnmptrapd.so.30.0.3 + ${ENGINE_LIBDIR}/libnetsnmptrapd.so.30 + ${ENGINE_LIBDIR}/libnetsnmptrapd.so + DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) +INSTALL(PROGRAMS ${ENGINE_SBINDIR}/snmpd ${ENGINE_SBINDIR}/snmptrapd DESTINATION ${ENGINE_SBINDIR} COMPONENT platform) + +INSTALL(PROGRAMS utils/jemalloc/libjemalloc.so.3.3.0 DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) + +INCLUDE(cpackEngineRPM.cmake) diff --git a/build/columnstore.community.spec.in b/build/columnstore.community.spec.in index 95ab58ba0..ad80b46c7 100644 --- a/build/columnstore.community.spec.in +++ b/build/columnstore.community.spec.in @@ -284,7 +284,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}.%{release} /usr/local/mariadb/columnstore/lib/libmysqlcl_idb.so.1.0.0 /usr/local/mariadb/columnstore/lib/libquerystats.so.1.0.0 /usr/local/mariadb/columnstore/lib/libwriteengineredistribute.so.1.0.0 -#/usr/local/mariadb/columnstore/lib/libjemalloc.so.3.3.0 +/usr/local/mariadb/columnstore/lib/libjemalloc.so.3.3.0 /usr/local/mariadb/columnstore/lib/libidbdatafile.so.1.0.0 #/usr/local/mariadb/columnstore/lib/hdfs-20.so #/usr/local/mariadb/columnstore/lib/hdfs-12.so diff --git a/build/postInstall_libs.sh b/build/postInstall_libs.sh new file mode 100644 index 000000000..b4e8c04e4 --- /dev/null +++ b/build/postInstall_libs.sh @@ -0,0 +1,11 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "MariaDB ColumnStore RPM install completed" + diff --git a/build/postInstall_platform.sh b/build/postInstall_platform.sh new file mode 100644 index 000000000..78e7b0288 --- /dev/null +++ b/build/postInstall_platform.sh @@ -0,0 +1,12 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +test -x /usr/local/mariadb/columnstore/bin/post-install && /usr/local/mariadb/columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode + +echo "MariaDB ColumnStore RPM install completed" diff --git a/build/postInstall_storage_engine.sh b/build/postInstall_storage_engine.sh new file mode 100644 index 000000000..3c346b537 --- /dev/null +++ b/build/postInstall_storage_engine.sh @@ -0,0 +1,12 @@ +rpmmode=install +if [ "$1" -eq "$1" 2> /dev/null ]; then + if [ $1 -ne 1 ]; then + rpmmode=upgrade + fi +fi + +prefix=/usr/local + +echo "MariaDB ColumnStore RPM install completed" + + diff --git a/build/preUn_libs.sh b/build/preUn_libs.sh new file mode 100644 index 000000000..64c23c654 --- /dev/null +++ b/build/preUn_libs.sh @@ -0,0 +1,11 @@ +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 new file mode 100644 index 000000000..7cb2059e1 --- /dev/null +++ b/build/preUn_platform.sh @@ -0,0 +1,15 @@ +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 + test -x /usr/local/mariadb/columnstore/bin/pre-uninstall && /usr/local/mariadb/columnstore/bin/pre-uninstall +fi + +exit 0 + diff --git a/build/preUn_storage_engine.sh b/build/preUn_storage_engine.sh new file mode 100644 index 000000000..64c23c654 --- /dev/null +++ b/build/preUn_storage_engine.sh @@ -0,0 +1,11 @@ +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/releasenum b/build/releasenum index 29f66e13f..0aa2a30a8 100644 --- a/build/releasenum +++ b/build/releasenum @@ -1,3 +1,2 @@ -version=1.0.3 +version=1.0.4 release=1 - diff --git a/build/releasenum.in b/build/releasenum.in new file mode 100644 index 000000000..ea20eb5c1 --- /dev/null +++ b/build/releasenum.in @@ -0,0 +1,2 @@ +version=@CPACK_RPM_PACKAGE_VERSION@ +release=@CPACK_RPM_PACKAGE_RELEASE@ diff --git a/cpackEngineRPM.cmake b/cpackEngineRPM.cmake new file mode 100644 index 000000000..c50195876 --- /dev/null +++ b/cpackEngineRPM.cmake @@ -0,0 +1,99 @@ +IF(RPM) + +SET(CMAKE_INSTALL_PREFIX ${INSTALL_ENGINE}) + +SET(CPACK_GENERATOR "RPM") +SET(CPACK_RPM_PACKAGE_DEBUG 1) +SET(CPACK_PACKAGING_INSTALL_PREFIX ${INSTALL_ENGINE}) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7) + +SET(CPACK_RPM_COMPONENT_INSTALL ON) + +SET(CPACK_COMPONENTS_ALL platform libs storage-engine) + +SET(CPACK_PACKAGE_NAME "mariadb-columnstore") +SET(ENGINE_ARCH "x86_64") + +IF (NOT CPACK_RPM_PACKAGE_VERSION) +SET (CPACK_RPM_PACKAGE_VERSION "1.0.0") +ENDIF() +IF (NOT CPACK_RPM_PACKAGE_RELEASE) +SET (CPACK_RPM_PACKAGE_RELEASE "0") +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 very fast and robust SQL database server") +SET(CPACK_PACKAGE_URL "http://mariadb.org") + +SET(CPACK_PACKAGE_SUMMARY "MariaDB-Columnstore software") +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.") + + +SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2") +SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE) +SET(CPACK_PACKAGE_RELOCATABLE FALSE) +SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases") +SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL}) +SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY}) +SET(CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR}) +SET(CPACK_RPM_PACKAGE_LICENSE ${CPACK_PACKAGE_LICENSE}) + +SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY} + +It is GPL v2 licensed, which means you can use the it free of charge under the +conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/). + +MariaDB documentation can be found at https://mariadb.com/kb +MariaDB bug reports should be submitted through https://jira.mariadb.org + +") + +SET(CPACK_RPM_platform_PACKAGE_DESCRIPTION "MariaDB-Columnstore binary files") +SET(CPACK_RPM_platform_PACKAGE_SUMMARY "MariaDB-Columnstore software binaries") +SET(CPACK_RPM_platform_PACKAGE_GROUP "Applications") + +SET(CPACK_RPM_libs_PACKAGE_DESCRIPTION "MariaDB-Columnstore libraries") +SET(CPACK_RPM_libs_PACKAGE_SUMMARY "MariaDB-Columnstore software libraries") + +SET(CPACK_RPM_storage-engine_PACKAGE_DESCRIPTION "MariaDB Columnstore connector binary files") +SET(CPACK_RPM_storage-engine_PACKAGE_SUMMARY "MariaDB-Columnstore software MariaDB connector") +SET(CPACK_RPM_storage-engine_PACKAGE_GROUP "Applications") + +# "set/append array" - append a set of strings, separated by a space +MACRO(SETA var) + FOREACH(v ${ARGN}) + SET(${var} "${${var}} ${v}") + ENDFOREACH() +ENDMACRO(SETA) + +SETA(CPACK_RPM_libs_PACKAGE_PROVIDES "mariadb-columnstore-libs") +SETA(CPACK_RPM_platform_PACKAGE_PROVIDES "mariadb-columnstore-platform") +SETA(CPACK_RPM_storage-engine_PACKAGE_PROVIDES "mariadb-columnstore-storage-engine") + +SETA(CPACK_RPM_libs_PACKAGE_OBSOLETES "mariadb-columnstore-libs") +SETA(CPACK_RPM_platform_PACKAGE_OBSOLETES "mariadb-columnstore-platform") +SETA(CPACK_RPM_storage-engine_PACKAGE_OBSOLETES "mariadb-columnstore-storage-engine") + +SETA(CPACK_RPM_platform_PACKAGE_REQUIRES "expect" "boost >= 1.53.0" "mariadb-columnstore-libs") +SETA(CPACK_RPM_storage-engine_PACKAGE_REQUIRES "mariadb-columnstore-libs") + +SET(CPACK_RPM_platform_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_platform.sh) +SET(CPACK_RPM_libs_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_libs.sh) +SET(CPACK_RPM_storage-engine_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/postInstall_storage_engine.sh) + +SET(CPACK_RPM_platform_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_platform.sh) +SET(CPACK_RPM_libs_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_libs.sh) +SET(CPACK_RPM_storage-engine_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/build/preUn_storage_engine.sh) + + +#SET(CPACK_RPM_SPEC_MORE_DEFINE " +#%define _prefix ${CMAKE_INSTALL_PREFIX} +#") + + +INCLUDE (CPack) + +ENDIF() diff --git a/dbcon/ddlpackage/CMakeLists.txt b/dbcon/ddlpackage/CMakeLists.txt index 87c3a8ef4..27d2a3015 100644 --- a/dbcon/ddlpackage/CMakeLists.txt +++ b/dbcon/ddlpackage/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ADD_CUSTOM_COMMAND( - OUTPUT ddl-gram.cpp ddl-scan.cpp + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/ddl-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ddl-scan.cpp COMMAND ./ddl-gram.sh ${BISON_EXECUTABLE} COMMAND ./ddl-scan.sh ${LEX_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -32,9 +32,9 @@ set(ddlpackage_LIB_SRCS add_library(ddlpackage SHARED ${ddlpackage_LIB_SRCS}) -add_dependencies(ddlpackage ddl-gram.cpp ddl-scan.cpp) +add_dependencies(ddlpackage ${CMAKE_CURRENT_SOURCE_DIR}/ddl-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ddl-scan.cpp) set_target_properties(ddlpackage PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/ddlpackageproc/CMakeLists.txt b/dbcon/ddlpackageproc/CMakeLists.txt index 2a8e87e60..31e6af0a8 100644 --- a/dbcon/ddlpackageproc/CMakeLists.txt +++ b/dbcon/ddlpackageproc/CMakeLists.txt @@ -18,5 +18,5 @@ target_link_libraries(ddlpackageproc ${NETSNMP_LIBRARIES}) set_target_properties(ddlpackageproc PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/dmlpackage/CMakeLists.txt b/dbcon/dmlpackage/CMakeLists.txt index 5bca5e0f1..43536a48d 100644 --- a/dbcon/dmlpackage/CMakeLists.txt +++ b/dbcon/dmlpackage/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} ) ADD_CUSTOM_COMMAND( - OUTPUT dml-gram.cpp dml-scan.cpp + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dml-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dml-scan.cpp COMMAND ./dml-gram.sh ${BISON_EXECUTABLE} COMMAND ./dml-scan.sh ${LEX_EXECUTABLE} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -32,9 +32,9 @@ set(dmlpackage_LIB_SRCS add_library(dmlpackage SHARED ${dmlpackage_LIB_SRCS}) -add_dependencies(dmlpackage dml-gram.cpp dml-scan.cpp) +add_dependencies(dmlpackage ${CMAKE_CURRENT_SOURCE_DIR}/dml-gram.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dml-scan.cpp) set_target_properties(dmlpackage PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dmlpackage DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/dmlpackageproc/CMakeLists.txt b/dbcon/dmlpackageproc/CMakeLists.txt index 190c66c0b..3bede4ee9 100644 --- a/dbcon/dmlpackageproc/CMakeLists.txt +++ b/dbcon/dmlpackageproc/CMakeLists.txt @@ -19,6 +19,6 @@ target_link_libraries(dmlpackageproc ${NETSNMP_LIBRARIES}) set_target_properties(dmlpackageproc PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dmlpackageproc DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/execplan/CMakeLists.txt b/dbcon/execplan/CMakeLists.txt index ba7fdad6f..bc6d841c8 100644 --- a/dbcon/execplan/CMakeLists.txt +++ b/dbcon/execplan/CMakeLists.txt @@ -49,5 +49,5 @@ target_link_libraries(execplan ${NETSNMP_LIBRARIES}) set_target_properties(execplan PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS execplan DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/execplan/intervalcolumn.cpp b/dbcon/execplan/intervalcolumn.cpp index a075fb17a..49e44b391 100644 --- a/dbcon/execplan/intervalcolumn.cpp +++ b/dbcon/execplan/intervalcolumn.cpp @@ -48,7 +48,7 @@ IntervalColumn::IntervalColumn() IntervalColumn::IntervalColumn(SRCP& val, int intervalType): fVal(val->clone()), fIntervalType(intervalType) { - cout << "intervalType=" << fIntervalType << endl; +// cout << "intervalType=" << fIntervalType << endl; } IntervalColumn::IntervalColumn( const IntervalColumn& rhs, const uint32_t sessionID): diff --git a/dbcon/joblist/CMakeLists.txt b/dbcon/joblist/CMakeLists.txt index 44179bbb4..989c3b798 100644 --- a/dbcon/joblist/CMakeLists.txt +++ b/dbcon/joblist/CMakeLists.txt @@ -65,6 +65,6 @@ target_link_libraries(joblist ${NETSNMP_LIBRARIES}) set_target_properties(joblist PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS joblist DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/dbcon/mysql/CMakeLists.txt b/dbcon/mysql/CMakeLists.txt index 7d8908840..7dde5b208 100644 --- a/dbcon/mysql/CMakeLists.txt +++ b/dbcon/mysql/CMakeLists.txt @@ -1,9 +1,6 @@ include_directories( ${ENGINE_COMMON_INCLUDES} - /usr/include/libxml2 - ../../../mysql/include - ../../../mysql/sql - ../../../mysql/regex ) + /usr/include/libxml2 ) SET ( libcalmysql_SRCS @@ -32,16 +29,16 @@ target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_ set_target_properties(calmysql PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS calmysql DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS calmysql DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine) install(FILES syscatalog_mysql.sql dumpcat_mysql.sql calsetuserpriority.sql calremoveuserpriority.sql calshowprocesslist.sql my.cnf - DESTINATION ${ENGINE_MYSQLDIR}) + DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine) install(PROGRAMS install_calpont_mysql.sh mysql-Columnstore dumpcat.pl - DESTINATION ${ENGINE_MYSQLDIR}) + DESTINATION ${ENGINE_MYSQLDIR} COMPONENT storage-engine) #AM_CPPFLAGS = $(idb_common_includes) $(idb_cppflags) diff --git a/ddlproc/CMakeLists.txt b/ddlproc/CMakeLists.txt index 29369f7c9..a56fb4683 100644 --- a/ddlproc/CMakeLists.txt +++ b/ddlproc/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(DDLProc ${DDLProc_SRCS}) target_link_libraries(DDLProc ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} threadpool) -install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DDLProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/decomsvr/CMakeLists.txt b/decomsvr/CMakeLists.txt index 441dbb41a..5c4e5e6a7 100644 --- a/decomsvr/CMakeLists.txt +++ b/decomsvr/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(DecomSvr ${DecomSvr_SRCS}) target_link_libraries(DecomSvr ${ENGINE_LDFLAGS} ${Boost_LIBRARIES} pthread rt) -install(TARGETS DecomSvr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DecomSvr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/dmlproc/CMakeLists.txt b/dmlproc/CMakeLists.txt index 45b162f93..8ed489aa8 100644 --- a/dmlproc/CMakeLists.txt +++ b/dmlproc/CMakeLists.txt @@ -14,7 +14,7 @@ add_executable(DMLProc ${DMLProc_SRCS}) target_link_libraries(DMLProc ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} threadpool ddlcleanuputil batchloader) -install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS DMLProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/exemgr/CMakeLists.txt b/exemgr/CMakeLists.txt index 57782203d..5a9f197d7 100644 --- a/exemgr/CMakeLists.txt +++ b/exemgr/CMakeLists.txt @@ -10,7 +10,7 @@ add_executable(ExeMgr ${ExeMgr_SRCS}) target_link_libraries(ExeMgr ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES} cacheutils threadpool) -install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ExeMgr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### install files ############### diff --git a/oam/cloud/CMakeLists.txt b/oam/cloud/CMakeLists.txt index 1e99fc87d..6e6469b41 100644 --- a/oam/cloud/CMakeLists.txt +++ b/oam/cloud/CMakeLists.txt @@ -1,2 +1,2 @@ -install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oam/etc/CMakeLists.txt b/oam/etc/CMakeLists.txt index 066c24601..6e334e7b6 100644 --- a/oam/etc/CMakeLists.txt +++ b/oam/etc/CMakeLists.txt @@ -5,4 +5,4 @@ install(FILES AlarmConfig.xml ConsoleCmds.xml Columnstore.xml.singleserver ProcessConfig.xml.singleserver - DESTINATION ${ENGINE_ETCDIR}) + DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) diff --git a/oam/install_scripts/CMakeLists.txt b/oam/install_scripts/CMakeLists.txt index 14555c3ad..09e72fdb1 100644 --- a/oam/install_scripts/CMakeLists.txt +++ b/oam/install_scripts/CMakeLists.txt @@ -22,7 +22,6 @@ install(PROGRAMS post-install columnstoreSyslog-ng syslogSetup.sh remote_scp_put.sh - columnstoreUninstall.sh columnstore.def remotessh.exp rsync.sh @@ -35,7 +34,7 @@ install(PROGRAMS post-install myCnf-include-args.text myCnf-exclude-args.text columnstore.service - DESTINATION ${ENGINE_BINDIR}) + DESTINATION ${ENGINE_BINDIR} COMPONENT platform) -install(FILES module DESTINATION ${ENGINE_LOCALDIR}) +install(FILES module DESTINATION ${ENGINE_LOCALDIR} COMPONENT platform) diff --git a/oam/oamcpp/CMakeLists.txt b/oam/oamcpp/CMakeLists.txt index 22b7753fa..c697863c6 100644 --- a/oam/oamcpp/CMakeLists.txt +++ b/oam/oamcpp/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(oamcpp ${NETSNMP_LIBRARIES}) set_target_properties(oamcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS oamcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS oamcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/oam/oamcpp/liboamcpp.cpp b/oam/oamcpp/liboamcpp.cpp index d1244d3ca..9c7354483 100644 --- a/oam/oamcpp/liboamcpp.cpp +++ b/oam/oamcpp/liboamcpp.cpp @@ -1368,7 +1368,8 @@ namespace oam void Oam::getSystemStatus(SystemStatus& systemstatus, bool systemStatusOnly) { - checkSystemRunning("getSystemStatus"); + if (!checkSystemRunning()) + return; #ifdef _MSC_VER // TODO: Remove when we create OAM for Windows @@ -2136,8 +2137,8 @@ namespace oam void Oam::getProcessStatus(SystemProcessStatus& systemprocessstatus, string port) { - checkSystemRunning("getProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); ProcessStatus processstatus; systemprocessstatus.processstatus.clear(); @@ -2236,7 +2237,8 @@ namespace oam return; #endif - checkSystemRunning("getProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -2331,8 +2333,8 @@ namespace oam void Oam::setProcessStatus(const std::string process, const std::string module, const int state, pid_t PID) { - checkSystemRunning("setProcessStatus"); - + if (!checkSystemRunning()) + exceptionControl("setProcessStatus", API_FAILURE); //send and wait for ack and resend if not received //retry 5 time max for ( int i=0; i < 5 ; i++) @@ -2848,7 +2850,8 @@ namespace oam exceptionControl("getMyProcessStatus", API_FAILURE); } - checkSystemRunning("getMyProcessStatus"); + if (!checkSystemRunning()) + exceptionControl("getMyProcessStatus", API_FAILURE); for ( int i = 0 ; i < 5 ; i ++) { @@ -4865,7 +4868,8 @@ namespace oam ********************************************************************/ bool Oam::switchParentOAMModule(std::string moduleName, GRACEFUL_FLAG gracefulflag) { - checkSystemRunning("switchParentOAMModule"); + if (!checkSystemRunning()) + exceptionControl("switchParentOAMModule", API_FAILURE); int returnStatus; // We assume that moduleName is a valid pm @@ -6308,7 +6312,8 @@ namespace oam exceptionControl("sysConfig->write", API_FAILURE); } - checkSystemRunning("addDbroot"); + if (!checkSystemRunning()) + exceptionControl("addDbroot", API_FAILURE); //get updated Columnstore.xml distributed distributeConfigFile("system"); @@ -6345,11 +6350,9 @@ namespace oam * ****************************************************************************/ - void Oam::distributeFstabUpdates(std::string entry, std::string toPM) + void Oam::distributeFstabUpdates(std::string entry, std::string toPM) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!checkSystemRunning()) return; ACK_FLAG ackflag = oam::ACK_YES; @@ -8772,7 +8775,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -8873,7 +8876,7 @@ namespace oam int Oam::sendMsgToProcMgr2(messageqcpp::ByteStream::byte requestType, DeviceNetworkList devicenetworklist, GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string password, const std::string mysqlpw) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_TIMEOUT; //default @@ -8987,7 +8990,7 @@ namespace oam int Oam::sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, AlarmList& alarmlist, const std::string date) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_SUCCESS; //default @@ -9088,7 +9091,7 @@ namespace oam GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag, const std::string argument1, const std::string argument2, int timeout) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return API_CONN_REFUSED; int returnStatus = API_STILL_WORKING; @@ -9274,7 +9277,7 @@ namespace oam void Oam::sendStatusUpdate(ByteStream obs, ByteStream::byte returnRequestType) { - if (!checkSystemRunning("")) + if (!checkSystemRunning()) return; for ( int i = 0 ; i < 5 ; i ++) @@ -9650,8 +9653,10 @@ namespace oam return returnStatus; } - bool Oam::checkSystemRunning(const char* function) + bool Oam::checkSystemRunning() { + // string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; + // system(cmd.c_str()); struct stat st; if (stat("/var/lock/subsys/columnstore", &st) == 0) { @@ -9668,13 +9673,6 @@ namespace oam return true; } } - ostringstream os; - os << function << " system is not running: " << strerror(errno); - writeLog(os.str(), LOG_TYPE_ERROR ); - if (strlen(function)) - { - throw runtime_error(os.str()); - } return false; } } //namespace oam diff --git a/oam/oamcpp/liboamcpp.h b/oam/oamcpp/liboamcpp.h index b1ed7ebae..883123aa4 100644 --- a/oam/oamcpp/liboamcpp.h +++ b/oam/oamcpp/liboamcpp.h @@ -2449,6 +2449,8 @@ namespace oam */ void writeLog(const std::string logContent, const logging::LOG_TYPE logType = logging::LOG_TYPE_INFO); + bool checkSystemRunning(); + private: int sendMsgToProcMgr3(messageqcpp::ByteStream::byte requestType, snmpmanager::AlarmList& alarmlist, const std::string date); @@ -2482,8 +2484,6 @@ namespace oam */ void sendStatusUpdate(messageqcpp::ByteStream obs, messageqcpp::ByteStream::byte returnRequestType); - bool checkSystemRunning(const char* function); - std::string CalpontConfigFile; std::string AlarmConfigFile; std::string ProcessConfigFile; diff --git a/oam/post/CMakeLists.txt b/oam/post/CMakeLists.txt index d8cfd7056..f6d5a95c7 100644 --- a/oam/post/CMakeLists.txt +++ b/oam/post/CMakeLists.txt @@ -1,3 +1,3 @@ -install(PROGRAMS functions test-001.sh test-002.sh test-003.sh test-004.sh DESTINATION ${ENGINE_POSTDIR}) +install(PROGRAMS functions test-001.sh test-002.sh test-003.sh test-004.sh DESTINATION ${ENGINE_POSTDIR} COMPONENT platform) diff --git a/oamapps/columnstoreDB/CMakeLists.txt b/oamapps/columnstoreDB/CMakeLists.txt index 3a1cf0599..9f6942a81 100644 --- a/oamapps/columnstoreDB/CMakeLists.txt +++ b/oamapps/columnstoreDB/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(columnstoreDBWrite ${columnstoreDBWrite_SRCS}) target_link_libraries(columnstoreDBWrite ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS columnstoreDBWrite DESTINATION ${ENGINE_BINDIR}) +install(TARGETS columnstoreDBWrite DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/columnstoreSupport/CMakeLists.txt b/oamapps/columnstoreSupport/CMakeLists.txt index 8279380a3..74a79a809 100644 --- a/oamapps/columnstoreSupport/CMakeLists.txt +++ b/oamapps/columnstoreSupport/CMakeLists.txt @@ -10,9 +10,9 @@ add_executable(columnstoreSupport ${columnstoreSupport_SRCS}) target_link_libraries(columnstoreSupport ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS columnstoreSupport DESTINATION ${ENGINE_BINDIR}) +install(TARGETS columnstoreSupport DESTINATION ${ENGINE_BINDIR} COMPONENT platform) install(PROGRAMS alarmReport.sh bulklogReport.sh configReport.sh hadoopReport.sh hardwareReport.sh logReport.sh resourceReport.sh softwareReport.sh - DESTINATION ${ENGINE_BINDIR}) + DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/mcsadmin/CMakeLists.txt b/oamapps/mcsadmin/CMakeLists.txt index 308638552..9351e68e5 100644 --- a/oamapps/mcsadmin/CMakeLists.txt +++ b/oamapps/mcsadmin/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(mcsadmin ${mcsadmin_SRCS}) target_link_libraries(mcsadmin ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS mcsadmin DESTINATION ${ENGINE_BINDIR}) +install(TARGETS mcsadmin DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 69ccac917..2786ad472 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -503,7 +503,7 @@ int processCommand(string* arguments) CC_SUSPEND_ANSWER suspendAnswer = CANCEL; bool bNeedsConfirm = true; string password; - + string cmd; // get command info from Command config file CmdID = -1; @@ -1999,7 +1999,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '/" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2007,7 +2007,7 @@ int processCommand(string* arguments) } else { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); } } @@ -2017,7 +2017,7 @@ int processCommand(string* arguments) if ( gracefulTemp == FORCEFUL ) { - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful shutdown of System (stopped local columnstore service) " << endl << endl; } @@ -2025,7 +2025,7 @@ int processCommand(string* arguments) if (Failed.find("Connection refused") != string::npos) { cout << endl << "**** shutdownSystem Error : ProcessManager not Active, stopping columnstore service" << endl; - string cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; + cmd = startup::StartUp::installDir() + "/bin/columnstore stop > /tmp/status.log"; system(cmd.c_str()); cout << endl << " Successful stop of local columnstore service " << endl << endl; } @@ -2044,7 +2044,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore stop' > /tmp/cc-stop.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-stop.pdsh", "exit") ) { cout << endl << "ERROR: Stopping MariaDB Columnstore Service failure, check /tmp/cc-stop.pdsh. exit..." << endl; @@ -2071,9 +2071,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << "startSystem command, 'columnstore' service is down, sending command to" << endl; cout << "start the 'columnstore' service on all modules" << endl << endl; @@ -2142,7 +2140,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failure, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2289,9 +2287,7 @@ int processCommand(string* arguments) // this would be used after a shutdownSystem command // if columnstore service is up, send message to ProcMgr to start system (which starts all processes) - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { if (bNeedsConfirm) { @@ -2363,7 +2359,7 @@ int processCommand(string* arguments) if ( DBRootStorageType == "hdfs") { - string cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; + cmd = "pdsh -a '" + startup::StartUp::installDir() + "/bin/columnstore restart' > /tmp/cc-restart.pdsh 2>&1"; system(cmd.c_str()); if (oam.checkLogStatus("/tmp/cc-restart.pdsh", "exit") ) { cout << endl << "ERROR: Restart MariaDB Columnstore Service failue, check /tmp/cc-restart.pdsh. exit..." << endl; @@ -2457,7 +2453,7 @@ int processCommand(string* arguments) //just kick off local server cout << " System being restarted, please wait..."; cout.flush(); - string cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/columnstore restart > /tmp/start.log 2>&1"; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << endl << "error with running 'columnstore start' on local module " << endl; @@ -2712,7 +2708,7 @@ int processCommand(string* arguments) cout << endl << "Monitor for System Alarms" << endl; cout << " Enter control-C to return to command line" << endl << endl; - string cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; + cmd = "tail -n 0 -f " + snmpmanager::ALARM_FILE; system(cmd.c_str()); } break; @@ -3287,9 +3283,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (oam.checkSystemRunning()) { SystemStatus systemstatus; try { @@ -3764,9 +3758,7 @@ int processCommand(string* arguments) } //check the system status / service status and only allow command when System is MAN_OFFLINE - string cmd = startup::StartUp::installDir() + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (!oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) + if (!oam.checkSystemRunning()) { cout << endl << "**** assignDbrootPmConfig Failed, System is down. Needs to be running" << endl; break; @@ -6584,7 +6576,7 @@ int processCommand(string* arguments) oam.startModule(devicenetworklist, ackTemp); //reload DBRM with new configuration, needs to be done here after startModule - string cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; + cmd = startup::StartUp::installDir() + "/bin/dbrmctl reload > /dev/null 2>&1"; system(cmd.c_str()); sleep(15); @@ -6643,6 +6635,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) ACK_FLAG ackTemp = ACK_YES; CC_SUSPEND_ANSWER suspendAnswer = WAIT; bool bNeedsConfirm = true; + string cmd; switch( CommandID ) { @@ -6875,7 +6868,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) //run remote command script HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + (*pt1).IPAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) { cout << "Failed with running remote_command.sh" << endl; @@ -6979,7 +6972,7 @@ int ProcessSupportCommand(int CommandID, std::string arguments[]) HostConfigList::iterator pt1 = (*pt).hostConfigList.begin(); string ipAddr = (*pt1).IPAddr; //run remote command script - string cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; + cmd = startup::StartUp::installDir() + "/bin/remote_command.sh " + ipAddr + " " + password + " reboot " ; int rtnCode = system(cmd.c_str()); if (WEXITSTATUS(rtnCode) != 0) cout << "Failed with running remote_command.sh" << endl; diff --git a/oamapps/postConfigure/CMakeLists.txt b/oamapps/postConfigure/CMakeLists.txt index 9c661ac89..9881a4d1b 100644 --- a/oamapps/postConfigure/CMakeLists.txt +++ b/oamapps/postConfigure/CMakeLists.txt @@ -10,7 +10,7 @@ add_executable(postConfigure ${postConfigure_SRCS}) target_link_libraries(postConfigure ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS postConfigure DESTINATION ${ENGINE_BINDIR}) +install(TARGETS postConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -21,7 +21,7 @@ add_executable(installer ${installer_SRCS}) target_link_libraries(installer ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS installer DESTINATION ${ENGINE_BINDIR}) +install(TARGETS installer DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -32,7 +32,7 @@ add_executable(getMySQLpw ${getMySQLpw_SRCS}) target_link_libraries(getMySQLpw ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS getMySQLpw DESTINATION ${ENGINE_BINDIR}) +install(TARGETS getMySQLpw DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -43,7 +43,7 @@ add_executable(amazonInstaller ${amazonInstaller_SRCS}) target_link_libraries(amazonInstaller ${ENGINE_LDFLAGS} readline ncurses ${SNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS amazonInstaller DESTINATION ${ENGINE_BINDIR}) +install(TARGETS amazonInstaller DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -54,5 +54,5 @@ add_executable(mycnfUpgrade ${mycnfUpgrade_SRCS}) target_link_libraries(mycnfUpgrade ${ENGINE_LDFLAGS} readline ncurses ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS mycnfUpgrade DESTINATION ${ENGINE_BINDIR}) +install(TARGETS mycnfUpgrade DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/postConfigure/amazonInstaller.cpp b/oamapps/postConfigure/amazonInstaller.cpp index 617af94e4..a40069759 100644 --- a/oamapps/postConfigure/amazonInstaller.cpp +++ b/oamapps/postConfigure/amazonInstaller.cpp @@ -184,8 +184,8 @@ int main(int argc, char *argv[]) { if( string("-h") == argv[i] || string("--help") == argv[i]) { cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl << endl; cout << "It will read the system configuration settings from /root/amazonConfig.xml." << endl; cout << "Or user can provide a different configuration file with the -c option." << endl; cout << "Or if /root/amazonConfig.xml doesn't exist, then user will be prompted for settings." << endl; @@ -194,8 +194,8 @@ int main(int argc, char *argv[]) cout << " -h Help" << endl; cout << " -c system config file, default is '/root/amazonConfig.xml'" << endl; cout << " -l logfile for postConfigure output to /root/postConfigure.log" << endl; - cout << " -v InfiniDB version" << endl; - cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if InfiniDB fails to install" << endl; + cout << " -v columnstore version" << endl; + cout << " -pc postConfigure failure System Cleanup, used to run System Cleanup if columnstore fails to install" << endl; cout << " -d Delete Cluster, used to delete Instances and Volumes on a shutdowned system" << endl; cout << " Require argument, include name of local Amazon Configure File '-c' option" << endl; cout << " -s Stop Cluster, used to stop Instances on a shutdowned system" << endl; @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << endl << "InfiniDB Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << endl << "columnstore Version: " << systemsoftware.Version << "-" << systemsoftware.Release << endl; exit (0); } else if( string("-pc") == argv[i] ) { @@ -246,13 +246,11 @@ int main(int argc, char *argv[]) } } - //check if InfiniDB is up and running - string cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << endl << "InfiniDB is running, can't run AmazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << endl << "columnstore is running, can't run AmazonInstaller while columnstore is running. Exiting.." << endl; exit (0); - } + } if ( systemCleanup || systemStop ) { @@ -430,21 +428,19 @@ int main(int argc, char *argv[]) } cout << endl; - cout << "This is the Amazon InfiniDB AMI System Configuration and Installation tool." << endl; - cout << "It will Configure and startup an Amazon InfiniDB System." << endl; + cout << "This is the Amazon columnstore AMI System Configuration and Installation tool." << endl; + cout << "It will Configure and startup an Amazon columnstore System." << endl; - //check if InfiniDB is up and running - cmd = installDir + "/bin/infinidb status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "InfiniDB is running") ) { - cout << "InfiniDB is running, can't run amazonInstaller while InfiniDB is running. Exiting.." << endl; + //check if columnstore is up and running + if (oam.checkSystemRunning()) { + cout << "columnstore is running, can't run amazonInstaller while columnstore is running. Exiting.." << endl; exit (0); } //backup current Columnstore.xml string configFile = installDir + "/etc/Columnstore.xml"; string saveFile = installDir + "/etc/Columnstore.xml.save"; - cmd = "rm -f " + saveFile; + string cmd = "rm -f " + saveFile; system(cmd.c_str()); cmd = "cp " + configFile + " " + saveFile; system(cmd.c_str()); @@ -573,7 +569,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1039,7 +1035,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting AmazonRegion from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting AmazonRegion from the columnstore System Configuration file" << endl; exit(1); } } @@ -1062,7 +1058,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1271,7 +1267,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1296,7 +1292,7 @@ int main(int argc, char *argv[]) SystemSoftware systemsoftware; oam.getSystemSoftware(systemsoftware); - cout << "InfiniDB Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; + cout << "columnstore Version = " << systemsoftware.Version << "-" << systemsoftware.Release << endl; cout << "System Type = " << systemType << endl; if ( subnetID != oam::UnassignedName ) { @@ -1392,7 +1388,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1404,7 +1400,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << endl << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << endl << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } } @@ -1415,7 +1411,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMSecurityGroup from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMSecurityGroup from the columnstore System Configuration file" << endl; exit(1); } @@ -1425,7 +1421,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1441,7 +1437,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting InstanceType from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting InstanceType from the columnstore System Configuration file" << endl; exit(1); } @@ -1465,7 +1461,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting SystemName from the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting SystemName from the columnstore System Configuration file" << endl; exit(1); } @@ -1497,7 +1493,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; exit(1); } @@ -1565,7 +1561,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1852,7 +1848,7 @@ int main(int argc, char *argv[]) cout << endl; } - cout << endl << "===== InfiniDB Configuration Setup and Installation =====" << endl << endl; + cout << endl << "===== columnstore Configuration Setup and Installation =====" << endl << endl; if ( systemType == "combined" ) { cout << "----- Combined System Type - Setup and Install Calpont-MySQL Packages -----" << endl << endl; @@ -1882,7 +1878,7 @@ int main(int argc, char *argv[]) // update /root/Columnstore.xml // - cout << "----- Updating InfiniDB Configuration File (Columnstore.xml) -----" << endl << endl; + cout << "----- Updating columnstore Configuration File (Columnstore.xml) -----" << endl << endl; //setup for multi-server install try { @@ -1910,7 +1906,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting AmazonElasticIPCount in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting AmazonElasticIPCount in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1931,7 +1927,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1946,7 +1942,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1959,7 +1955,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot Count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot Count in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -1980,7 +1976,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -1990,7 +1986,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2011,7 +2007,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Host Name in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Host Name in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2021,7 +2017,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting IP address in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting IP address in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2032,7 +2028,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting dbroot count in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting dbroot count in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2053,7 +2049,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRoot ID in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRoot ID in the columnstore System Configuration file" << endl; cleanupSystem(); } } @@ -2068,7 +2064,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting UMStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting UMStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2089,7 +2085,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2104,7 +2100,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting DBRootStorageType in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting DBRootStorageType in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2139,7 +2135,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Problem setting Volume/Device Names in the InfiniDB System Configuration file" << endl; + cout << "ERROR: Problem setting Volume/Device Names in the columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2161,7 +2157,7 @@ int main(int argc, char *argv[]) } catch(...) { - cout << "ERROR: Failed trying to update InfiniDB System Configuration file" << endl; + cout << "ERROR: Failed trying to update columnstore System Configuration file" << endl; cleanupSystem(); } @@ -2246,7 +2242,7 @@ void snmpAppCheck() cout << endl << "===== Setup the Network Management System (NMS) Server Configuration =====" << endl << endl; - cout << "This would be used to receive SNMP Traps from InfiniDB, like a Network Control Center" << endl; + cout << "This would be used to receive SNMP Traps from columnstore, like a Network Control Center" << endl; cout << "Default to 0.0.0.0 to not enable snmptrap forwarding" << endl << endl; prompt1 = "Enter IP Address(es) of NMS Server (0.0.0.0) > "; pcommand1 = readline(prompt1.c_str()); @@ -2863,7 +2859,7 @@ void cleanupSystem(bool terminate) if ( systemType == "combined" ) { cout << "----- Combined System Type Uninstall Calpont-MySQL Packages -----" << endl << endl; - system("rpm -e infinidb-mysql infinidb-storage-engine"); + system("rpm -e infinidb-mysql infinidb-storage-engine"); } cout << endl << "Cleanup finished, exiting" << endl << endl; diff --git a/oamapps/postConfigure/postConfigure.cpp b/oamapps/postConfigure/postConfigure.cpp index e669745d2..2c5db22f4 100644 --- a/oamapps/postConfigure/postConfigure.cpp +++ b/oamapps/postConfigure/postConfigure.cpp @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) bool startOfflinePrompt = false; noPrompting = false; string password; - + string cmd; // struct sysinfo myinfo; // hidden options @@ -425,9 +425,7 @@ int main(int argc, char *argv[]) } //check if MariaDB Columnstore is up and running - string cmd = installDir + "/bin/columnstore status > /tmp/status.log"; - system(cmd.c_str()); - if (oam.checkLogStatus("/tmp/status.log", "MariaDB Columnstore is running") ) { + if (oam.checkSystemRunning()) { cout << "MariaDB Columnstore is running, can't run postConfigure while MariaDB Columnstore is running. Exiting.." << endl; exit (0); } diff --git a/oamapps/sendtrap/CMakeLists.txt b/oamapps/sendtrap/CMakeLists.txt index e453e4970..e61f5a2bf 100644 --- a/oamapps/sendtrap/CMakeLists.txt +++ b/oamapps/sendtrap/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(sendtrap ${sendtrap_SRCS}) target_link_libraries(sendtrap ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS}) -install(TARGETS sendtrap DESTINATION ${ENGINE_BINDIR}) +install(TARGETS sendtrap DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/serverMonitor/CMakeLists.txt b/oamapps/serverMonitor/CMakeLists.txt index 7e3821fc4..04296114a 100644 --- a/oamapps/serverMonitor/CMakeLists.txt +++ b/oamapps/serverMonitor/CMakeLists.txt @@ -19,5 +19,5 @@ add_executable(ServerMonitor ${ServerMonitor_SRCS}) target_link_libraries(ServerMonitor ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ServerMonitor DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/oamapps/traphandler/CMakeLists.txt b/oamapps/traphandler/CMakeLists.txt index 14247c146..d79cb5d37 100644 --- a/oamapps/traphandler/CMakeLists.txt +++ b/oamapps/traphandler/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(trapHandler ${trapHandler_SRCS}) target_link_libraries(trapHandler ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS trapHandler DESTINATION ${ENGINE_BINDIR}) +install(TARGETS trapHandler DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/primitives/primproc/CMakeLists.txt b/primitives/primproc/CMakeLists.txt index 30afb2878..ddfa56abc 100644 --- a/primitives/primproc/CMakeLists.txt +++ b/primitives/primproc/CMakeLists.txt @@ -26,6 +26,6 @@ add_executable(PrimProc ${PrimProc_SRCS}) target_link_libraries(PrimProc ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool cacheutils dbbc processor) -install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR}) +install(TARGETS PrimProc DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/procmgr/CMakeLists.txt b/procmgr/CMakeLists.txt index e3cec4f5e..7ced90a35 100644 --- a/procmgr/CMakeLists.txt +++ b/procmgr/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(ProcMgr ${ProcMgr_SRCS}) target_link_libraries(ProcMgr ${ENGINE_LDFLAGS} cacheutils ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ProcMgr DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/procmon/CMakeLists.txt b/procmon/CMakeLists.txt index edec091b9..cb6ecbb49 100644 --- a/procmon/CMakeLists.txt +++ b/procmon/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(ProcMon ${ProcMon_SRCS}) target_link_libraries(ProcMon ${ENGINE_LDFLAGS} cacheutils ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ProcMon DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/snmpd/etc/CMakeLists.txt b/snmpd/etc/CMakeLists.txt index 273441be1..bb27b20ee 100644 --- a/snmpd/etc/CMakeLists.txt +++ b/snmpd/etc/CMakeLists.txt @@ -5,7 +5,7 @@ install(FILES snmpd.conf snmptrapd.conf snmpd.conf.singleserver snmptrapd.conf.singleserver - DESTINATION ${ENGINE_ETCDIR}) + DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) install(FILES CALPONT-MIB.txt AGENTX-MIB.txt @@ -63,6 +63,6 @@ install(FILES CALPONT-MIB.txt UCD-DLMOD-MIB.txt UCD-IPFWACC-MIB.txt UCD-SNMP-MIB.txt - UDP-MIB.txt DESTINATION ${ENGINE_MIBDIR} ) + UDP-MIB.txt DESTINATION ${ENGINE_MIBDIR} COMPONENT platform ) -install(FILES snmpdx.conf snmpdx.conf.singleserver DESTINATION ${ENGINE_LOCALDIR}) +install(FILES snmpdx.conf snmpdx.conf.singleserver DESTINATION ${ENGINE_LOCALDIR} COMPONENT platform) diff --git a/snmpd/snmpmanager/CMakeLists.txt b/snmpd/snmpmanager/CMakeLists.txt index 99f8b112d..c28333f72 100644 --- a/snmpd/snmpmanager/CMakeLists.txt +++ b/snmpd/snmpmanager/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(snmpmanager ${NETSNMP_LIBRARIES}) set_target_properties(snmpmanager PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS snmpmanager DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS snmpmanager DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/tools/clearShm/CMakeLists.txt b/tools/clearShm/CMakeLists.txt index 41527417f..6258cddd5 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} ${ENGINE_EXEC_LIBS}) -install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS clearShm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/cleartablelock/CMakeLists.txt b/tools/cleartablelock/CMakeLists.txt index 626a6ce73..9e68dbd2d 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} ${ENGINE_WRITE_LIBS}) -install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cleartablelock DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/configMgt/CMakeLists.txt b/tools/configMgt/CMakeLists.txt index 3ada154be..fbd0dd0e2 100644 --- a/tools/configMgt/CMakeLists.txt +++ b/tools/configMgt/CMakeLists.txt @@ -21,7 +21,7 @@ add_executable(autoConfigure ${autoConfigure_SRCS}) target_link_libraries(autoConfigure ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR}) +install(TARGETS autoConfigure DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### diff --git a/tools/cplogger/CMakeLists.txt b/tools/cplogger/CMakeLists.txt index f80505b93..06bd1da95 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} ${ENGINE_EXEC_LIBS}) -install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cplogger DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/dbbuilder/CMakeLists.txt b/tools/dbbuilder/CMakeLists.txt index da90bb409..f0e9fb88f 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} ${ENGINE_WRITE_LIBS}) -install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR}) +install(TARGETS dbbuilder DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/dbloadxml/CMakeLists.txt b/tools/dbloadxml/CMakeLists.txt index 7f68cf0af..48b636a7f 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 ${ENGINE_WRITE_LIBS}) -install(TARGETS colxml DESTINATION ${ENGINE_BINDIR}) +install(TARGETS colxml DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/ddlcleanup/CMakeLists.txt b/tools/ddlcleanup/CMakeLists.txt index cd16ca4b8..3d6e2282c 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} ${ENGINE_WRITE_LIBS} ddlcleanuputil) -install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR}) +install(TARGETS ddlcleanup DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/editem/CMakeLists.txt b/tools/editem/CMakeLists.txt index 48c11dccd..b58241519 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} ${ENGINE_EXEC_LIBS}) -install(TARGETS editem DESTINATION ${ENGINE_BINDIR}) +install(TARGETS editem DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/getConfig/CMakeLists.txt b/tools/getConfig/CMakeLists.txt index cb9114017..1ee303f81 100644 --- a/tools/getConfig/CMakeLists.txt +++ b/tools/getConfig/CMakeLists.txt @@ -10,5 +10,5 @@ add_executable(getConfig ${getConfig_SRCS}) target_link_libraries(getConfig ${ENGINE_LDFLAGS} ${ENGINE_EXEC_LIBS}) -install(TARGETS getConfig DESTINATION ${ENGINE_BINDIR}) +install(TARGETS getConfig DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/idbmeminfo/CMakeLists.txt b/tools/idbmeminfo/CMakeLists.txt index 1666d31c0..4c9908b23 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}) +install(TARGETS idbmeminfo DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/setConfig/CMakeLists.txt b/tools/setConfig/CMakeLists.txt index 873f816f4..7ad697aa6 100644 --- a/tools/setConfig/CMakeLists.txt +++ b/tools/setConfig/CMakeLists.txt @@ -10,7 +10,7 @@ add_executable(setConfig ${setConfig_SRCS}) target_link_libraries(setConfig ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_EXEC_LIBS}) -install(TARGETS setConfig DESTINATION ${ENGINE_BINDIR}) +install(TARGETS setConfig DESTINATION ${ENGINE_BINDIR} COMPONENT platform) -install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS configxml.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/tools/viewtablelock/CMakeLists.txt b/tools/viewtablelock/CMakeLists.txt index bc6db623d..f0734f05d 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} ${ENGINE_EXEC_LIBS}) -install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR}) +install(TARGETS viewtablelock DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/batchloader/CMakeLists.txt b/utils/batchloader/CMakeLists.txt index 493ee9a5f..07ecc04e5 100644 --- a/utils/batchloader/CMakeLists.txt +++ b/utils/batchloader/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(batchloader ${NETSNMP_LIBRARIES}) set_target_properties(batchloader PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS batchloader DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/cacheutils/CMakeLists.txt b/utils/cacheutils/CMakeLists.txt index 97e574700..bb8c766a6 100644 --- a/utils/cacheutils/CMakeLists.txt +++ b/utils/cacheutils/CMakeLists.txt @@ -10,5 +10,5 @@ add_library(cacheutils SHARED ${cacheutils_LIB_SRCS}) set_target_properties(cacheutils PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS cacheutils DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/common/CMakeLists.txt b/utils/common/CMakeLists.txt index b178d2462..54900167e 100644 --- a/utils/common/CMakeLists.txt +++ b/utils/common/CMakeLists.txt @@ -17,5 +17,5 @@ add_dependencies(common loggingcpp) set_target_properties(common PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS common DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS common DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/compress/CMakeLists.txt b/utils/compress/CMakeLists.txt index 276f2e92a..543f6cff9 100644 --- a/utils/compress/CMakeLists.txt +++ b/utils/compress/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(compress SHARED ${compress_LIB_SRCS}) set_target_properties(compress PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS compress DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS compress DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/configcpp/CMakeLists.txt b/utils/configcpp/CMakeLists.txt index cb916d2f6..cae83c461 100644 --- a/utils/configcpp/CMakeLists.txt +++ b/utils/configcpp/CMakeLists.txt @@ -9,5 +9,5 @@ add_library(configcpp SHARED ${configcpp_LIB_SRCS}) set_target_properties(configcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS configcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/dataconvert/CMakeLists.txt b/utils/dataconvert/CMakeLists.txt index 713bc26c6..e9a11648d 100644 --- a/utils/dataconvert/CMakeLists.txt +++ b/utils/dataconvert/CMakeLists.txt @@ -10,4 +10,4 @@ add_library(dataconvert SHARED ${dataconvert_LIB_SRCS}) set_target_properties(dataconvert PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS dataconvert DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/dataconvert/dataconvert.cpp b/utils/dataconvert/dataconvert.cpp index fbe599c33..473282595 100644 --- a/utils/dataconvert/dataconvert.cpp +++ b/utils/dataconvert/dataconvert.cpp @@ -1100,16 +1100,8 @@ boost::any } else { - if ( isUpdate) //@Bug 5222 set to null for ot of range value - { - uint32_t d = joblist::DATENULL; - value = d; - pushWarning = true; - } - else - { - throw QueryDataExcept("Invalid date", formatErr); - } + value = (uint32_t) 0; + pushWarning = true; } } break; @@ -1123,14 +1115,8 @@ boost::any } else { - if ( isUpdate) //@Bug 5222 set to null for ot of range value - { - uint64_t d = joblist::DATETIMENULL; - value = d; - pushWarning = true; - } - else - throw QueryDataExcept("Invalid datetime", formatErr); + value = (uint64_t) 0; + pushWarning = true; } } break; diff --git a/utils/ddlcleanup/CMakeLists.txt b/utils/ddlcleanup/CMakeLists.txt index 6bac9bf40..d15ba02b1 100644 --- a/utils/ddlcleanup/CMakeLists.txt +++ b/utils/ddlcleanup/CMakeLists.txt @@ -12,5 +12,5 @@ target_link_libraries(ddlcleanuputil ${NETSNMP_LIBRARIES}) set_target_properties(ddlcleanuputil PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS ddlcleanuputil DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/funcexp/CMakeLists.txt b/utils/funcexp/CMakeLists.txt index 133b55094..70e4b54e3 100644 --- a/utils/funcexp/CMakeLists.txt +++ b/utils/funcexp/CMakeLists.txt @@ -112,6 +112,6 @@ target_link_libraries(funcexp ${NETSNMP_LIBRARIES}) set_target_properties(funcexp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS funcexp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/funcexp/func_char_length.cpp b/utils/funcexp/func_char_length.cpp index 73f987f1b..22c576bc4 100644 --- a/utils/funcexp/func_char_length.cpp +++ b/utils/funcexp/func_char_length.cpp @@ -96,8 +96,7 @@ int64_t Func_char_length::getIntVal(rowgroup::Row& row, case execplan::CalpontSystemCatalog::DATETIME: { string date = dataconvert::DataConvert::datetimeToString(parm[0]->data()->getDatetimeIntVal(row, isNull)); - //adjust for microseconds not counted - return (int64_t)date.size() - 7; + return (int64_t)date.size(); } default: diff --git a/utils/idbdatafile/CMakeLists.txt b/utils/idbdatafile/CMakeLists.txt index b915b75ec..e06bf1fc8 100644 --- a/utils/idbdatafile/CMakeLists.txt +++ b/utils/idbdatafile/CMakeLists.txt @@ -20,4 +20,4 @@ target_link_libraries(idbdatafile ${NETSNMP_LIBRARIES}) set_target_properties(idbdatafile PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS idbdatafile DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/idbhdfs/hdfs-12/CMakeLists.txt b/utils/idbhdfs/hdfs-12/CMakeLists.txt index 82436c71f..dadafc991 100644 --- a/utils/idbhdfs/hdfs-12/CMakeLists.txt +++ b/utils/idbhdfs/hdfs-12/CMakeLists.txt @@ -18,5 +18,5 @@ set_target_properties(hdfs-12 PROPERTIES VERSION 1.0.0 SOVERSION 1) install(TARGETS hdfs-12 DESTINATION ${ENGINE_LIBDIR}) -install(PROGRAMS setenv-hdfs-12 DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS setenv-hdfs-12 DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/idbhdfs/hdfs-20/CMakeLists.txt b/utils/idbhdfs/hdfs-20/CMakeLists.txt index d5a369ebd..b2f71dc8b 100644 --- a/utils/idbhdfs/hdfs-20/CMakeLists.txt +++ b/utils/idbhdfs/hdfs-20/CMakeLists.txt @@ -20,5 +20,5 @@ set_target_properties(hdfs-20 PROPERTIES VERSION 1.0.0 SOVERSION 1) install(TARGETS hdfs-20 DESTINATION ${ENGINE_LIBDIR}) -install(PROGRAMS setenv-hdfs-20 DESTINATION ${ENGINE_BINDIR}) +install(PROGRAMS setenv-hdfs-20 DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/utils/joiner/CMakeLists.txt b/utils/joiner/CMakeLists.txt index 9da265a59..cc67192cf 100644 --- a/utils/joiner/CMakeLists.txt +++ b/utils/joiner/CMakeLists.txt @@ -10,6 +10,6 @@ add_library(joiner SHARED ${joiner_LIB_SRCS}) set_target_properties(joiner PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS joiner DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/loggingcpp/CMakeLists.txt b/utils/loggingcpp/CMakeLists.txt index a6736fbcc..d27b11e3c 100644 --- a/utils/loggingcpp/CMakeLists.txt +++ b/utils/loggingcpp/CMakeLists.txt @@ -14,13 +14,13 @@ set(loggingcpp_LIB_SRCS idberrorinfo.cpp) ADD_CUSTOM_COMMAND( - OUTPUT messageids.h errorids.h + OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h COMMAND ./genMsgAndErrId.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS genMsgId.pl genErrId.pl ) -ADD_CUSTOM_TARGET(genMsgAndErrId DEPENDS messageids.h errorids.h) +ADD_CUSTOM_TARGET(genMsgAndErrId DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/messageids.h ${CMAKE_CURRENT_SOURCE_DIR}/errorids.h) add_library(loggingcpp SHARED ${loggingcpp_LIB_SRCS}) @@ -28,7 +28,7 @@ add_dependencies(loggingcpp genMsgAndErrId) set_target_properties(loggingcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS loggingcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) -install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_ETCDIR}) +install(FILES MessageFile.txt ErrorMessage.txt DESTINATION ${ENGINE_ETCDIR} COMPONENT platform) diff --git a/utils/messageqcpp/CMakeLists.txt b/utils/messageqcpp/CMakeLists.txt index 5359396bc..25c3fa251 100644 --- a/utils/messageqcpp/CMakeLists.txt +++ b/utils/messageqcpp/CMakeLists.txt @@ -15,4 +15,4 @@ add_library(messageqcpp SHARED ${messageqcpp_LIB_SRCS}) set_target_properties(messageqcpp PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS messageqcpp DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/mysqlcl_idb/CMakeLists.txt b/utils/mysqlcl_idb/CMakeLists.txt index 574ce95b2..0ef0b5f97 100644 --- a/utils/mysqlcl_idb/CMakeLists.txt +++ b/utils/mysqlcl_idb/CMakeLists.txt @@ -23,5 +23,5 @@ add_library(mysqlcl_idb SHARED ${mysqlcl_idb_LIB_SRCS}) set_target_properties(mysqlcl_idb PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS mysqlcl_idb DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS mysqlcl_idb DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/querystats/CMakeLists.txt b/utils/querystats/CMakeLists.txt index bb3975cef..940749a6b 100644 --- a/utils/querystats/CMakeLists.txt +++ b/utils/querystats/CMakeLists.txt @@ -10,5 +10,5 @@ add_library(querystats SHARED ${querystats_LIB_SRCS}) set_target_properties(querystats PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS querystats DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/querytele/CMakeLists.txt b/utils/querytele/CMakeLists.txt index 2ab3e8c6d..404c3fc73 100644 --- a/utils/querytele/CMakeLists.txt +++ b/utils/querytele/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(querytele SHARED ${querytele_LIB_SRCS}) set_target_properties(querytele PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS querytele DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/rowgroup/CMakeLists.txt b/utils/rowgroup/CMakeLists.txt index bb359c2c7..18e73e2fc 100644 --- a/utils/rowgroup/CMakeLists.txt +++ b/utils/rowgroup/CMakeLists.txt @@ -14,5 +14,5 @@ target_link_libraries(rowgroup ${NETSNMP_LIBRARIES}) set_target_properties(rowgroup PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS rowgroup DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/rwlock/CMakeLists.txt b/utils/rwlock/CMakeLists.txt index c29926ee0..a6201d40f 100644 --- a/utils/rwlock/CMakeLists.txt +++ b/utils/rwlock/CMakeLists.txt @@ -11,5 +11,5 @@ add_library(rwlock SHARED ${rwlock_LIB_SRCS}) set_target_properties(rwlock PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS rwlock DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/threadpool/CMakeLists.txt b/utils/threadpool/CMakeLists.txt index c75958b8d..47a09d88b 100644 --- a/utils/threadpool/CMakeLists.txt +++ b/utils/threadpool/CMakeLists.txt @@ -10,4 +10,4 @@ add_library(threadpool SHARED ${threadpool_LIB_SRCS}) set_target_properties(threadpool PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS threadpool DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/thrift/CMakeLists.txt b/utils/thrift/CMakeLists.txt index a335afaae..1521cb617 100644 --- a/utils/thrift/CMakeLists.txt +++ b/utils/thrift/CMakeLists.txt @@ -18,5 +18,5 @@ add_library(thrift SHARED ${thrift_LIB_SRCS}) set_target_properties(thrift PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS thrift DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/utils/udfsdk/CMakeLists.txt b/utils/udfsdk/CMakeLists.txt index 71354d589..5e4428cd9 100644 --- a/utils/udfsdk/CMakeLists.txt +++ b/utils/udfsdk/CMakeLists.txt @@ -1,9 +1,7 @@ include_directories( ${ENGINE_COMMON_INCLUDES} - ../../dbcon/mysql - ../../mysql/include - ../../mysql/sql - ../../mysql/regex ) + ../../dbcon/mysql ) + ########### next target ############### set(udfsdk_LIB_SRCS udfinfinidb.cpp) @@ -14,5 +12,15 @@ add_library(udfsdk SHARED ${udfsdk_LIB_SRCS}) set_target_properties(udfsdk PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS udfsdk DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) + + + +set(udf_mysql_LIB_SRCS udfmysql.cpp) + +add_library(udf_mysql SHARED ${udf_mysql_LIB_SRCS}) + +set_target_properties(udf_mysql PROPERTIES VERSION 1.0.0 SOVERSION 1) + +install(TARGETS udf_mysql DESTINATION ${ENGINE_LIBDIR} COMPONENT storage-engine) diff --git a/utils/windowfunction/CMakeLists.txt b/utils/windowfunction/CMakeLists.txt index ec1be152a..3482ad776 100644 --- a/utils/windowfunction/CMakeLists.txt +++ b/utils/windowfunction/CMakeLists.txt @@ -27,5 +27,5 @@ add_library(windowfunction SHARED ${windowfunction_LIB_SRCS}) set_target_properties(windowfunction PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS windowfunction DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/versioning/BRM/CMakeLists.txt b/versioning/BRM/CMakeLists.txt index 68e9e5699..279b9f967 100644 --- a/versioning/BRM/CMakeLists.txt +++ b/versioning/BRM/CMakeLists.txt @@ -34,7 +34,7 @@ add_library(brm SHARED ${brm_LIB_SRCS}) target_link_libraries(brm ${NETSNMP_LIBRARIES}) -install(TARGETS brm DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS brm DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) ########### next target ############### @@ -45,7 +45,7 @@ add_executable(controllernode ${controllernode_SRCS}) target_link_libraries(controllernode ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR}) +install(TARGETS controllernode DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -56,7 +56,7 @@ add_executable(workernode ${workernode_SRCS}) target_link_libraries(workernode ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS workernode DESTINATION ${ENGINE_BINDIR}) +install(TARGETS workernode DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -67,7 +67,7 @@ add_executable(dbrmctl ${dbrmctl_SRCS}) target_link_libraries(dbrmctl ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR}) +install(TARGETS dbrmctl DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -78,7 +78,7 @@ add_executable(reset_locks ${reset_locks_SRCS}) target_link_libraries(reset_locks ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR}) +install(TARGETS reset_locks DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -89,7 +89,7 @@ add_executable(rollback ${rollback_SRCS}) target_link_libraries(rollback ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS rollback DESTINATION ${ENGINE_BINDIR}) +install(TARGETS rollback DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -100,7 +100,7 @@ add_executable(save_brm ${save_brm_SRCS}) target_link_libraries(save_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS save_brm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) ########### next target ############### @@ -111,5 +111,5 @@ add_executable(load_brm ${load_brm_SRCS}) target_link_libraries(load_brm ${ENGINE_LDFLAGS} ${ENGINE_OAM_LIBS} ${ENGINE_EXEC_LIBS} ${NETSNMP_LIBRARIES}) -install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR}) +install(TARGETS load_brm DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/bulk/CMakeLists.txt b/writeengine/bulk/CMakeLists.txt index 581a035f3..597489e0a 100644 --- a/writeengine/bulk/CMakeLists.txt +++ b/writeengine/bulk/CMakeLists.txt @@ -39,5 +39,5 @@ add_executable(cpimport.bin ${cpimport.bin_SRCS}) target_link_libraries(cpimport.bin ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} we_bulk we_xml) -install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cpimport.bin DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/bulk/we_bulkloadbuffer.cpp b/writeengine/bulk/we_bulkloadbuffer.cpp index c28ebc02a..9f75c6873 100644 --- a/writeengine/bulk/we_bulkloadbuffer.cpp +++ b/writeengine/bulk/we_bulkloadbuffer.cpp @@ -965,19 +965,8 @@ void BulkLoadBuffer::convert(char *field, int fieldLength, bufStats.maxBufferVal = llDate; } else { - if(!column.fNotNull) - { - // @bug 3375: reset invalid date/time to NULL, - // and track as a saturated value. - llDate = joblist::DATETIMENULL; - bufStats.satCount++; - } - else - { - //Bug5383 - 4.0@1400-01-01 00:00:00 Below it is 0000-01-01 00:00:00 - llDate = 0x578104000000000; //394082834458869760 - bufStats.satCount++; - } + llDate = 0; + bufStats.satCount++; } pVal = &llDate; @@ -1262,23 +1251,8 @@ void BulkLoadBuffer::convert(char *field, int fieldLength, bufStats.maxBufferVal = iDate; } else { - - - if (!column.fNotNull) - { - // @bug 3375: reset invalid date to NULL, - // and track as a saturated value. - iDate = joblist::DATENULL; - bufStats.satCount++; - } - else - { - // Bug5383 - 1400-01-01 -// iDate = 0x5781068; // for versions below 4.0 it is 0x1068 - // MariaDB bug 740 - iDate = 0x578107E; - bufStats.satCount++; - } + iDate = 0; + bufStats.satCount++; } pVal = &iDate; diff --git a/writeengine/bulk/we_tableinfo.cpp b/writeengine/bulk/we_tableinfo.cpp index 76a51a397..0e651b55d 100644 --- a/writeengine/bulk/we_tableinfo.cpp +++ b/writeengine/bulk/we_tableinfo.cpp @@ -924,24 +924,15 @@ void TableInfo::reportTotals(double elapsedTime) fColumns[i].column.colName << "; Number of "; if (fColumns[i].column.dataType == CalpontSystemCatalog::DATE) { - //bug5383 - if(!fColumns[i].column.fNotNull) - ossSatCnt << - "invalid dates replaced with null: "; - else - ossSatCnt << - "invalid dates replaced with minimum value : "; + ossSatCnt << + "invalid dates replaced with zero value : "; } else if (fColumns[i].column.dataType == CalpontSystemCatalog::DATETIME) { //bug5383 - if(!fColumns[i].column.fNotNull) - ossSatCnt << - "invalid date/times replaced with null: "; - else - ossSatCnt << - "invalid date/times replaced with minimum value : "; + ossSatCnt << + "invalid date/times replaced with zero value : "; } else if (fColumns[i].column.dataType == CalpontSystemCatalog::CHAR) ossSatCnt << diff --git a/writeengine/client/CMakeLists.txt b/writeengine/client/CMakeLists.txt index 1c41f1454..2133e1632 100644 --- a/writeengine/client/CMakeLists.txt +++ b/writeengine/client/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(writeengineclient ${NETSNMP_LIBRARIES}) set_target_properties(writeengineclient PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengineclient DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/writeengine/redistribute/CMakeLists.txt b/writeengine/redistribute/CMakeLists.txt index 96f9990b0..d62cff1a1 100644 --- a/writeengine/redistribute/CMakeLists.txt +++ b/writeengine/redistribute/CMakeLists.txt @@ -15,5 +15,5 @@ target_link_libraries(writeengineredistribute ${NETSNMP_LIBRARIES}) set_target_properties(writeengineredistribute PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengineredistribute DESTINATION ${ENGINE_LIBDIR} COMPONENT libs) diff --git a/writeengine/server/CMakeLists.txt b/writeengine/server/CMakeLists.txt index 472671f9f..365e98036 100644 --- a/writeengine/server/CMakeLists.txt +++ b/writeengine/server/CMakeLists.txt @@ -20,5 +20,5 @@ add_executable(WriteEngineServer ${WriteEngineServer_SRCS}) target_link_libraries(WriteEngineServer ${ENGINE_LDFLAGS} ${NETSNMP_LIBRARIES} ${ENGINE_WRITE_LIBS} threadpool writeengineredistribute) -install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR}) +install(TARGETS WriteEngineServer DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/splitter/CMakeLists.txt b/writeengine/splitter/CMakeLists.txt index 2d37f604a..6e837903e 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} ${ENGINE_WRITE_LIBS} batchloader threadpool) -install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR}) +install(TARGETS cpimport DESTINATION ${ENGINE_BINDIR} COMPONENT platform) diff --git a/writeengine/splitter/we_sdhandler.cpp b/writeengine/splitter/we_sdhandler.cpp index bea25bb42..28ded9649 100644 --- a/writeengine/splitter/we_sdhandler.cpp +++ b/writeengine/splitter/we_sdhandler.cpp @@ -1669,10 +1669,10 @@ void WESDHandler::onCleanupResult(int PmId, messageqcpp::SBS& Sbs) { switch ((*aIt).fColType) { case CalpontSystemCatalog::DATE: - ossSatCnt << "invalid dates replaced with null: "; + ossSatCnt << "invalid dates replaced with zero value: "; break; case CalpontSystemCatalog::DATETIME: - ossSatCnt << "invalid date/times replaced with null: "; + ossSatCnt << "invalid date/times replaced with zero value: "; break; case CalpontSystemCatalog::CHAR: ossSatCnt << "character strings truncated: "; diff --git a/writeengine/wrapper/CMakeLists.txt b/writeengine/wrapper/CMakeLists.txt index 4c99ef31b..8bed5c065 100644 --- a/writeengine/wrapper/CMakeLists.txt +++ b/writeengine/wrapper/CMakeLists.txt @@ -43,5 +43,5 @@ target_link_libraries(writeengine ${NETSNMP_LIBRARIES}) set_target_properties(writeengine PROPERTIES VERSION 1.0.0 SOVERSION 1) -install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR}) +install(TARGETS writeengine DESTINATION ${ENGINE_LIBDIR} COMPONENT libs)