You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
clang format apply
This commit is contained in:
@ -55,44 +55,43 @@
|
||||
|
||||
namespace oam
|
||||
{
|
||||
|
||||
/*
|
||||
* Global OAM parmaters
|
||||
*/
|
||||
|
||||
/** @brief Maximum Number of Modules within the Calpont System
|
||||
*/
|
||||
//const int MAX_MODULE = 1024;
|
||||
// const int MAX_MODULE = 1024;
|
||||
|
||||
/** @brief Maximum Number of DBRoots within the Calpont System
|
||||
*/
|
||||
const int MAX_DBROOT = 10240;
|
||||
//const int MAX_DBROOT_AMAZON = 190; //DUE TO DEVICE NAME LIMIT
|
||||
// const int MAX_DBROOT_AMAZON = 190; //DUE TO DEVICE NAME LIMIT
|
||||
|
||||
/** @brief Maximum Number of Modules Types within the Calpont System
|
||||
*/
|
||||
*/
|
||||
const int MAX_MODULE_TYPE = 3;
|
||||
|
||||
/** @brief Maximum Number of External Devices within the Calpont System
|
||||
*/
|
||||
//const int MAX_EXT_DEVICE = 20;
|
||||
// const int MAX_EXT_DEVICE = 20;
|
||||
|
||||
/** @brief Maximum Number of Arguments per process
|
||||
*/
|
||||
//const int MAX_ARGUMENTS = 15;
|
||||
// const int MAX_ARGUMENTS = 15;
|
||||
|
||||
/** @brief Maximum Number of Dependancy processes per process
|
||||
*/
|
||||
//const int MAX_DEPENDANCY = 6;
|
||||
// const int MAX_DEPENDANCY = 6;
|
||||
|
||||
/** @brief Maximum Number of processes within the Calpont System
|
||||
*/
|
||||
//const int MAX_PROCESS_PER_MODULE = 15;
|
||||
//const int MAX_PROCESS = MAX_MODULE * MAX_PROCESS_PER_MODULE;
|
||||
// const int MAX_PROCESS_PER_MODULE = 15;
|
||||
// const int MAX_PROCESS = MAX_MODULE * MAX_PROCESS_PER_MODULE;
|
||||
|
||||
/** @brief Maximum Number of Parameters per process
|
||||
*/
|
||||
//const int MAX_PARAMS = 13;
|
||||
// const int MAX_PARAMS = 13;
|
||||
|
||||
/** @brief Maximum Module Type Size
|
||||
*/
|
||||
@ -111,34 +110,32 @@ const int MAX_NIC = 4;
|
||||
const std::string UnassignedIpAddr = "0.0.0.0";
|
||||
const std::string UnassignedName = "unassigned";
|
||||
|
||||
|
||||
/** @brief Calpont System Configuration file sections
|
||||
*/
|
||||
const std::string configSections[] = { "SystemConfig",
|
||||
"SystemModuleConfig",
|
||||
"SystemModuleConfig",
|
||||
"SystemExtDeviceConfig",
|
||||
"SessionManager",
|
||||
"VersionBuffer",
|
||||
"OIDManager",
|
||||
"PrimitiveServers",
|
||||
"Installation",
|
||||
"ExtentMap",
|
||||
""
|
||||
};
|
||||
const std::string configSections[] = {"SystemConfig",
|
||||
"SystemModuleConfig",
|
||||
"SystemModuleConfig",
|
||||
"SystemExtDeviceConfig",
|
||||
"SessionManager",
|
||||
"VersionBuffer",
|
||||
"OIDManager",
|
||||
"PrimitiveServers",
|
||||
"Installation",
|
||||
"ExtentMap",
|
||||
""};
|
||||
|
||||
//const uint32_t NOTIFICATIONKEY = 0x49444231;
|
||||
// const uint32_t NOTIFICATIONKEY = 0x49444231;
|
||||
|
||||
/** @brief Server Type Installs
|
||||
*/
|
||||
|
||||
enum INSTALLTYPE
|
||||
{
|
||||
RESERVED, // 0 = not used
|
||||
INSTALL_NORMAL, // 1 = Normal - dm/um/pm on a seperate servers
|
||||
INSTALL_COMBINE_DM_UM_PM, // 2 = dm/um/pm on a single server
|
||||
INSTALL_COMBINE_DM_UM, // 3 = dm/um on a same server
|
||||
INSTALL_COMBINE_PM_UM // 4 = pm/um on a same server
|
||||
RESERVED, // 0 = not used
|
||||
INSTALL_NORMAL, // 1 = Normal - dm/um/pm on a seperate servers
|
||||
INSTALL_COMBINE_DM_UM_PM, // 2 = dm/um/pm on a single server
|
||||
INSTALL_COMBINE_DM_UM, // 3 = dm/um on a same server
|
||||
INSTALL_COMBINE_PM_UM // 4 = pm/um on a same server
|
||||
};
|
||||
|
||||
/** @brief OAM API Return values
|
||||
@ -146,24 +143,24 @@ enum INSTALLTYPE
|
||||
|
||||
enum API_STATUS
|
||||
{
|
||||
API_SUCCESS,
|
||||
API_FAILURE,
|
||||
API_INVALID_PARAMETER,
|
||||
API_FILE_OPEN_ERROR,
|
||||
API_TIMEOUT,
|
||||
API_DISABLED,
|
||||
API_FILE_ALREADY_EXIST,
|
||||
API_ALREADY_IN_PROGRESS,
|
||||
API_MINOR_FAILURE,
|
||||
API_FAILURE_DB_ERROR,
|
||||
API_INVALID_STATE,
|
||||
API_READONLY_PARAMETER,
|
||||
API_TRANSACTIONS_COMPLETE,
|
||||
API_CONN_REFUSED,
|
||||
API_CANCELLED,
|
||||
API_STILL_WORKING,
|
||||
API_DETACH_FAILURE,
|
||||
API_MAX
|
||||
API_SUCCESS,
|
||||
API_FAILURE,
|
||||
API_INVALID_PARAMETER,
|
||||
API_FILE_OPEN_ERROR,
|
||||
API_TIMEOUT,
|
||||
API_DISABLED,
|
||||
API_FILE_ALREADY_EXIST,
|
||||
API_ALREADY_IN_PROGRESS,
|
||||
API_MINOR_FAILURE,
|
||||
API_FAILURE_DB_ERROR,
|
||||
API_INVALID_STATE,
|
||||
API_READONLY_PARAMETER,
|
||||
API_TRANSACTIONS_COMPLETE,
|
||||
API_CONN_REFUSED,
|
||||
API_CANCELLED,
|
||||
API_STILL_WORKING,
|
||||
API_DETACH_FAILURE,
|
||||
API_MAX
|
||||
};
|
||||
|
||||
/** @brief Host/IP Address Config Structure
|
||||
@ -172,9 +169,9 @@ enum API_STATUS
|
||||
|
||||
struct HostConfig_s
|
||||
{
|
||||
std::string HostName; //!< Host Name
|
||||
std::string IPAddr; //!< IP address
|
||||
uint16_t NicID; //!< NIC ID
|
||||
std::string HostName; //!< Host Name
|
||||
std::string IPAddr; //!< IP address
|
||||
uint16_t NicID; //!< NIC ID
|
||||
};
|
||||
typedef struct HostConfig_s HostConfig;
|
||||
|
||||
@ -190,10 +187,10 @@ typedef std::vector<HostConfig> HostConfigList;
|
||||
|
||||
struct DeviceNetworkConfig_s
|
||||
{
|
||||
std::string DeviceName; //!< Device Name
|
||||
std::string UserTempDeviceName; //!< User Temp Device Name
|
||||
std::string DisableState; //!< Disabled State
|
||||
HostConfigList hostConfigList; //!< IP Address and Hostname List
|
||||
std::string DeviceName; //!< Device Name
|
||||
std::string UserTempDeviceName; //!< User Temp Device Name
|
||||
std::string DisableState; //!< Disabled State
|
||||
HostConfigList hostConfigList; //!< IP Address and Hostname List
|
||||
};
|
||||
|
||||
typedef struct DeviceNetworkConfig_s DeviceNetworkConfig;
|
||||
@ -222,8 +219,8 @@ typedef std::vector<uint16_t> DBRootConfigList;
|
||||
|
||||
struct DeviceDBRootConfig_s
|
||||
{
|
||||
uint16_t DeviceID; //!< Device ID
|
||||
DBRootConfigList dbrootConfigList; //!< DBRoot List
|
||||
uint16_t DeviceID; //!< Device ID
|
||||
DBRootConfigList dbrootConfigList; //!< DBRoot List
|
||||
};
|
||||
|
||||
typedef struct DeviceDBRootConfig_s DeviceDBRootConfig;
|
||||
@ -236,30 +233,29 @@ typedef std::vector<DeviceDBRootConfig> DeviceDBRootList;
|
||||
|
||||
struct ModuleTypeConfig_s
|
||||
{
|
||||
std::string ModuleType; //!< Module Type
|
||||
std::string ModuleDesc; //!< Module Description
|
||||
std::string RunType; //!< Run Type
|
||||
uint16_t ModuleCount; //!< Module Equipage Count
|
||||
uint16_t ModuleCPUCriticalThreshold; //!< CPU Critical Threahold %
|
||||
uint16_t ModuleCPUMajorThreshold; //!< CPU Major Threahold %
|
||||
uint16_t ModuleCPUMinorThreshold; //!< CPU Minor Threahold %
|
||||
uint16_t ModuleCPUMinorClearThreshold; //!< CPU Minor Clear Threahold %
|
||||
uint16_t ModuleMemCriticalThreshold; //!< Mem Critical Threahold %
|
||||
uint16_t ModuleMemMajorThreshold; //!< Mem Major Threahold %
|
||||
uint16_t ModuleMemMinorThreshold; //!< Mem Minor Threahold %
|
||||
uint16_t ModuleDiskCriticalThreshold; //!< Disk Critical Threahold %
|
||||
uint16_t ModuleDiskMajorThreshold; //!< Disk Major Threahold %
|
||||
uint16_t ModuleDiskMinorThreshold; //!< Disk Minor Threahold %
|
||||
uint16_t ModuleSwapCriticalThreshold; //!< Swap Critical Threahold %
|
||||
uint16_t ModuleSwapMajorThreshold; //!< Swap Major Threahold %
|
||||
uint16_t ModuleSwapMinorThreshold; //!< Swap Minor Threahold %
|
||||
DeviceNetworkList ModuleNetworkList; //!< Module IP Address and Hostname List
|
||||
DiskMonitorFileSystems FileSystems; //!< Module Disk File System list
|
||||
DeviceDBRootList ModuleDBRootList; //!< Module DBRoot
|
||||
std::string ModuleType; //!< Module Type
|
||||
std::string ModuleDesc; //!< Module Description
|
||||
std::string RunType; //!< Run Type
|
||||
uint16_t ModuleCount; //!< Module Equipage Count
|
||||
uint16_t ModuleCPUCriticalThreshold; //!< CPU Critical Threahold %
|
||||
uint16_t ModuleCPUMajorThreshold; //!< CPU Major Threahold %
|
||||
uint16_t ModuleCPUMinorThreshold; //!< CPU Minor Threahold %
|
||||
uint16_t ModuleCPUMinorClearThreshold; //!< CPU Minor Clear Threahold %
|
||||
uint16_t ModuleMemCriticalThreshold; //!< Mem Critical Threahold %
|
||||
uint16_t ModuleMemMajorThreshold; //!< Mem Major Threahold %
|
||||
uint16_t ModuleMemMinorThreshold; //!< Mem Minor Threahold %
|
||||
uint16_t ModuleDiskCriticalThreshold; //!< Disk Critical Threahold %
|
||||
uint16_t ModuleDiskMajorThreshold; //!< Disk Major Threahold %
|
||||
uint16_t ModuleDiskMinorThreshold; //!< Disk Minor Threahold %
|
||||
uint16_t ModuleSwapCriticalThreshold; //!< Swap Critical Threahold %
|
||||
uint16_t ModuleSwapMajorThreshold; //!< Swap Major Threahold %
|
||||
uint16_t ModuleSwapMinorThreshold; //!< Swap Minor Threahold %
|
||||
DeviceNetworkList ModuleNetworkList; //!< Module IP Address and Hostname List
|
||||
DiskMonitorFileSystems FileSystems; //!< Module Disk File System list
|
||||
DeviceDBRootList ModuleDBRootList; //!< Module DBRoot
|
||||
};
|
||||
typedef struct ModuleTypeConfig_s ModuleTypeConfig;
|
||||
|
||||
|
||||
/** @brief System Module Type Configuration Structure
|
||||
*
|
||||
* Structure that is returned by the getSystemConfigFile API for the
|
||||
@ -268,7 +264,7 @@ typedef struct ModuleTypeConfig_s ModuleTypeConfig;
|
||||
|
||||
struct SystemModuleTypeConfig_s
|
||||
{
|
||||
std::vector<ModuleTypeConfig> moduletypeconfig; //!< Module Type Configuration Structure
|
||||
std::vector<ModuleTypeConfig> moduletypeconfig; //!< Module Type Configuration Structure
|
||||
};
|
||||
typedef struct SystemModuleTypeConfig_s SystemModuleTypeConfig;
|
||||
|
||||
@ -280,12 +276,12 @@ typedef struct SystemModuleTypeConfig_s SystemModuleTypeConfig;
|
||||
|
||||
struct ModuleConfig_s
|
||||
{
|
||||
std::string ModuleName; //!< Module Name
|
||||
std::string ModuleType; //!< Module Type
|
||||
std::string ModuleDesc; //!< Module Description
|
||||
std::string DisableState; //!< Disabled State
|
||||
HostConfigList hostConfigList; //!< IP Address and Hostname List
|
||||
DBRootConfigList dbrootConfigList; //!< DBRoot ID list
|
||||
std::string ModuleName; //!< Module Name
|
||||
std::string ModuleType; //!< Module Type
|
||||
std::string ModuleDesc; //!< Module Description
|
||||
std::string DisableState; //!< Disabled State
|
||||
HostConfigList hostConfigList; //!< IP Address and Hostname List
|
||||
DBRootConfigList dbrootConfigList; //!< DBRoot ID list
|
||||
};
|
||||
typedef struct ModuleConfig_s ModuleConfig;
|
||||
|
||||
@ -300,7 +296,8 @@ typedef struct ModuleConfig_s ModuleConfig;
|
||||
* OAM Standby Parent Flag,
|
||||
*/
|
||||
|
||||
typedef boost::tuple<std::string, std::string, uint16_t, std::string, bool, uint16_t, std::string, bool > oamModuleInfo_t;
|
||||
typedef boost::tuple<std::string, std::string, uint16_t, std::string, bool, uint16_t, std::string, bool>
|
||||
oamModuleInfo_t;
|
||||
|
||||
/** @brief System Storage Configuration Structure
|
||||
*
|
||||
@ -308,7 +305,7 @@ typedef boost::tuple<std::string, std::string, uint16_t, std::string, bool, uint
|
||||
* Returns: Storage Type, System DBRoot count, PM dbroot info,
|
||||
*/
|
||||
|
||||
typedef boost::tuple<std::string, uint16_t, DeviceDBRootList, std::string > systemStorageInfo_t;
|
||||
typedef boost::tuple<std::string, uint16_t, DeviceDBRootList, std::string> systemStorageInfo_t;
|
||||
|
||||
/** @brief OAM API I/F class
|
||||
*
|
||||
@ -321,121 +318,119 @@ typedef boost::tuple<std::string, uint16_t, DeviceDBRootList, std::string > syst
|
||||
|
||||
class Oam
|
||||
{
|
||||
public:
|
||||
/** @brief OAM C++ API Class constructor
|
||||
*/
|
||||
EXPORT Oam();
|
||||
public:
|
||||
/** @brief OAM C++ API Class constructor
|
||||
*/
|
||||
EXPORT Oam();
|
||||
|
||||
/** @brief OAM C++ API Class destructor
|
||||
*/
|
||||
EXPORT virtual ~Oam();
|
||||
/** @brief OAM C++ API Class destructor
|
||||
*/
|
||||
EXPORT virtual ~Oam();
|
||||
|
||||
/** @brief get System Module Configuration information
|
||||
*
|
||||
* get System Module Configuration information value from the system config file.
|
||||
* @param systemmoduletypeconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(SystemModuleTypeConfig& systemmoduletypeconfig);
|
||||
/** @brief get System Module Configuration information
|
||||
*
|
||||
* get System Module Configuration information value from the system config file.
|
||||
* @param systemmoduletypeconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(SystemModuleTypeConfig& systemmoduletypeconfig);
|
||||
|
||||
/** @brief get System Module Type Configuration information for a Module
|
||||
*
|
||||
* get System Module Type Configuration information for a Module from the system config file.
|
||||
* @param moduletype the Module Type to get information
|
||||
* @param moduletypeconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& moduletype, ModuleTypeConfig& moduletypeconfig);
|
||||
/** @brief get System Module Type Configuration information for a Module
|
||||
*
|
||||
* get System Module Type Configuration information for a Module from the system config file.
|
||||
* @param moduletype the Module Type to get information
|
||||
* @param moduletypeconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& moduletype, ModuleTypeConfig& moduletypeconfig);
|
||||
|
||||
/** @brief get System Module Name Configuration information for a Module
|
||||
*
|
||||
* get System Module Name Configuration information for a Module from the system config file.
|
||||
* @param moduleName the Module Name to get information
|
||||
* @param moduleconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& moduleName, ModuleConfig& moduleconfig);
|
||||
/** @brief get System Module Name Configuration information for a Module
|
||||
*
|
||||
* get System Module Name Configuration information for a Module from the system config file.
|
||||
* @param moduleName the Module Name to get information
|
||||
* @param moduleconfig Returned System Module Configuration Structure
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& moduleName, ModuleConfig& moduleconfig);
|
||||
|
||||
/** @brief get System Configuration String Parameter
|
||||
*
|
||||
* get System Configuration String Parameter from the system config file.
|
||||
* @param name the Parameter Name to get value
|
||||
* @param value Returned Parameter Value
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& name, std::string& value);
|
||||
/** @brief get System Configuration String Parameter
|
||||
*
|
||||
* get System Configuration String Parameter from the system config file.
|
||||
* @param name the Parameter Name to get value
|
||||
* @param value Returned Parameter Value
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& name, std::string& value);
|
||||
|
||||
/** @brief get System Configuration Integer Parameter
|
||||
*
|
||||
* get System Configuration Integer Parameter from the system config file.
|
||||
* @param name the Parameter Name to get value
|
||||
* @param value Returned Parameter Value
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& name, int& value);
|
||||
/** @brief get System Configuration Integer Parameter
|
||||
*
|
||||
* get System Configuration Integer Parameter from the system config file.
|
||||
* @param name the Parameter Name to get value
|
||||
* @param value Returned Parameter Value
|
||||
*/
|
||||
EXPORT void getSystemConfig(const std::string& name, int& value);
|
||||
|
||||
/** @brief get Local Module Configuration Data
|
||||
*
|
||||
* get Local Module Name, OAM Parent Flag, and Realtime Linux OS Flag from
|
||||
* local config file.
|
||||
* @return oamModuleInfo_t structure, which contains the local Module OAM
|
||||
* Configuration Data
|
||||
*/
|
||||
EXPORT oamModuleInfo_t getModuleInfo();
|
||||
/** @brief get Local Module Configuration Data
|
||||
*
|
||||
* get Local Module Name, OAM Parent Flag, and Realtime Linux OS Flag from
|
||||
* local config file.
|
||||
* @return oamModuleInfo_t structure, which contains the local Module OAM
|
||||
* Configuration Data
|
||||
*/
|
||||
EXPORT oamModuleInfo_t getModuleInfo();
|
||||
|
||||
// Integer to ASCII convertor
|
||||
// Integer to ASCII convertor
|
||||
|
||||
EXPORT std::string itoa(const int);
|
||||
EXPORT std::string itoa(const int);
|
||||
|
||||
/**
|
||||
*@brief Get Storage Config Data
|
||||
*/
|
||||
EXPORT systemStorageInfo_t getStorageConfig();
|
||||
/**
|
||||
*@brief Get Storage Config Data
|
||||
*/
|
||||
EXPORT systemStorageInfo_t getStorageConfig();
|
||||
|
||||
/**
|
||||
*@brief Get PM - DBRoot Config data
|
||||
*/
|
||||
EXPORT void getPmDbrootConfig(const int pmid, DBRootConfigList& dbrootconfiglist);
|
||||
/**
|
||||
*@brief Get PM - DBRoot Config data
|
||||
*/
|
||||
EXPORT void getPmDbrootConfig(const int pmid, DBRootConfigList& dbrootconfiglist);
|
||||
|
||||
/**
|
||||
*@brief Get DBRoot - PM Config data
|
||||
*/
|
||||
EXPORT void getDbrootPmConfig(const int dbrootid, int& pmid);
|
||||
/**
|
||||
*@brief Get DBRoot - PM Config data
|
||||
*/
|
||||
EXPORT void getDbrootPmConfig(const int dbrootid, int& pmid);
|
||||
|
||||
/**
|
||||
*@brief Get System DBRoot Config data
|
||||
*/
|
||||
EXPORT void getSystemDbrootConfig(DBRootConfigList& dbrootconfiglist);
|
||||
/**
|
||||
*@brief Get System DBRoot Config data
|
||||
*/
|
||||
EXPORT void getSystemDbrootConfig(DBRootConfigList& dbrootconfiglist);
|
||||
|
||||
/** @brief validate Module name
|
||||
*/
|
||||
EXPORT int validateModule(const std::string name);
|
||||
/** @brief validate Module name
|
||||
*/
|
||||
EXPORT int validateModule(const std::string name);
|
||||
|
||||
/**
|
||||
* @brief changeMyCnf
|
||||
*
|
||||
* purpose: change my.cnf
|
||||
*
|
||||
**/
|
||||
EXPORT bool changeMyCnf( std::string paramater, std::string value );
|
||||
/**
|
||||
* @brief changeMyCnf
|
||||
*
|
||||
* purpose: change my.cnf
|
||||
*
|
||||
**/
|
||||
EXPORT bool changeMyCnf(std::string paramater, std::string value);
|
||||
|
||||
private:
|
||||
private:
|
||||
/** @brief validate Process name
|
||||
*/
|
||||
int validateProcess(const std::string moduleName, std::string processName);
|
||||
|
||||
/** @brief validate Process name
|
||||
*/
|
||||
int validateProcess(const std::string moduleName, std::string processName);
|
||||
/** @brief local exception control function
|
||||
* @param function Function throwing the exception
|
||||
* @param returnStatus
|
||||
* @param msg A message to be included
|
||||
*/
|
||||
EXPORT void exceptionControl(std::string function, int returnStatus, const char* extraMsg = NULL);
|
||||
|
||||
/** @brief local exception control function
|
||||
* @param function Function throwing the exception
|
||||
* @param returnStatus
|
||||
* @param msg A message to be included
|
||||
*/
|
||||
EXPORT void exceptionControl(std::string function, int returnStatus, const char* extraMsg = NULL);
|
||||
std::string tmpdir;
|
||||
std::string CalpontConfigFile;
|
||||
std::string userDir;
|
||||
|
||||
std::string tmpdir;
|
||||
std::string CalpontConfigFile;
|
||||
std::string userDir;
|
||||
}; // end of class
|
||||
|
||||
}; // end of class
|
||||
|
||||
} // end of namespace
|
||||
} // namespace oam
|
||||
|
||||
#undef EXPORT
|
||||
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
|
Reference in New Issue
Block a user