1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop' of git://github.com/mariadb-corporation/mariadb-columnstore-engine into MCOL-97

This commit is contained in:
Andrew Hutchings
2016-09-22 18:50:59 -05:00
93 changed files with 444 additions and 292 deletions

5
.gitignore vendored
View File

@ -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

View File

@ -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)

View File

@ -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

11
build/postInstall_libs.sh Normal file
View File

@ -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"

View File

@ -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"

View File

@ -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"

11
build/preUn_libs.sh Normal file
View File

@ -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

15
build/preUn_platform.sh Normal file
View File

@ -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

View File

@ -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

View File

@ -1,3 +1,2 @@
version=1.0.3
version=1.0.4
release=1

2
build/releasenum.in Normal file
View File

@ -0,0 +1,2 @@
version=@CPACK_RPM_PACKAGE_VERSION@
release=@CPACK_RPM_PACKAGE_RELEASE@

99
cpackEngineRPM.cmake Normal file
View File

@ -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()

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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):

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 ###############

View File

@ -1,2 +1,2 @@
install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR})
install(PROGRAMS IDBInstanceCmds.sh IDBVolumeCmds.sh DESTINATION ${ENGINE_BINDIR} COMPONENT platform)

View File

@ -5,4 +5,4 @@ install(FILES AlarmConfig.xml
ConsoleCmds.xml
Columnstore.xml.singleserver
ProcessConfig.xml.singleserver
DESTINATION ${ENGINE_ETCDIR})
DESTINATION ${ENGINE_ETCDIR} COMPONENT platform)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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);
}

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 ###############

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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)

View File

@ -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)

View File

@ -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:

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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 <<

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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: ";

View File

@ -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)