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

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -16,9 +16,9 @@
MA 02110-1301, USA. */
/*******************************************************************************
* $Id: we_xmljob.h 4450 2013-01-21 14:13:24Z rdempsey $
*
*******************************************************************************/
* $Id: we_xmljob.h 4450 2013-01-21 14:13:24Z rdempsey $
*
*******************************************************************************/
/** @file */
#pragma once
@ -49,122 +49,104 @@ struct JobColumn;
*/
class XMLJob : public XMLOp
{
public:
/**
* @brief Constructor
*/
EXPORT XMLJob();
public:
/**
* @brief Constructor
*/
EXPORT XMLJob();
/**
* @brief Default Destructor
*/
EXPORT ~XMLJob();
/**
* @brief Default Destructor
*/
EXPORT ~XMLJob();
/**
* @brief Utility to generate a full path name for a Job XML file name
* @param sXMLJobDir Command line override for complete Job directory path
* @param jobDIr Job subdirectory under default <BulkRoot> path
* @param jobId Job ID
* @param bTempFile Are we creating a temporary Job XML File name
* @param schmaName If temp file, this is schema name to use
* @param tableName If temp file, this is the table name to use
* @param xmlDirPath The complete Job XML file path that is constructed
* @param errMsg Error message if return value is not NO_ERROR
*/
EXPORT static int genJobXMLFileName(const std::string& sXMLJobDir, const std::string& jobDir,
const std::string& jobId, bool bTempFile, const std::string& schemaName,
const std::string& tableName, boost::filesystem::path& xmlDirPath,
std::string& errMsg, std::string& tableOIDStr);
/**
* @brief Utility to generate a full path name for a Job XML file name
* @param sXMLJobDir Command line override for complete Job directory path
* @param jobDIr Job subdirectory under default <BulkRoot> path
* @param jobId Job ID
* @param bTempFile Are we creating a temporary Job XML File name
* @param schmaName If temp file, this is schema name to use
* @param tableName If temp file, this is the table name to use
* @param xmlDirPath The complete Job XML file path that is constructed
* @param errMsg Error message if return value is not NO_ERROR
*/
EXPORT static int genJobXMLFileName(
const std::string& sXMLJobDir,
const std::string& jobDir,
const std::string& jobId,
bool bTempFile,
const std::string& schemaName,
const std::string& tableName,
boost::filesystem::path& xmlDirPath,
std::string& errMsg,
std::string& tableOIDStr );
/**
* @brief Get job structure
*/
const Job& getJob() const
{
return fJob;
}
/**
* @brief Get job structure
*/
const Job& getJob() const
{
return fJob;
}
/**
* @brief Load job information
* @param fileName Name of Job XML file to be read
* @param bTempFile Are we creating a temporary Job XML File that will be
* deleted by the destructor
* @param bValidateColumnList Validate that all columns have an XML tag
* @param errMsg Error message if return value is not NO_ERROR
*/
EXPORT int loadJobXmlFile(const std::string& fileName, bool bTempFile, bool bValidateColumnList,
std::string& errMsg);
/**
* @brief Load job information
* @param fileName Name of Job XML file to be read
* @param bTempFile Are we creating a temporary Job XML File that will be
* deleted by the destructor
* @param bValidateColumnList Validate that all columns have an XML tag
* @param errMsg Error message if return value is not NO_ERROR
*/
EXPORT int loadJobXmlFile( const std::string& fileName,
bool bTempFile,
bool bValidateColumnList,
std::string& errMsg );
/**
* @brief Print job related information
* @param logger Log object that is to receive the print output
*/
EXPORT void printJobInfo(Log& logger) const;
/**
* @brief Print job related information
* @param logger Log object that is to receive the print output
*/
EXPORT void printJobInfo(Log& logger) const;
/**
* @brief Print abbreviated job related information
* @param logger Log object that is to receive the print output
*/
EXPORT void printJobInfoBrief(Log& logger) const;
/**
* @brief Print abbreviated job related information
* @param logger Log object that is to receive the print output
*/
EXPORT void printJobInfoBrief(Log& logger) const;
/**
* @brief Process node
* @param pParentNode Node to be parsed from XML
*/
EXPORT bool processNode(xmlNode* pParentNode);
/**
* @brief Process node
* @param pParentNode Node to be parsed from XML
*/
EXPORT bool processNode( xmlNode* pParentNode );
/**
* @brief Set timezone
*/
void setTimeZone(const std::string& timeZone)
{
fTimeZone = timeZone;
}
/**
* @brief Set timezone
*/
void setTimeZone(const std::string& timeZone)
{
fTimeZone = timeZone;
}
private:
void setJobData(xmlNode* pNode, const xmlTag tag, bool bExpectContent, XML_DTYPE tagType);
void setJobDataColumn(xmlNode* pNode, bool bDefaultCol);
void setJobDataIgnoreField();
void setJobDataTable(xmlNode* pNode);
void setReadBuffers(xmlNode* pNode);
void setSchema(xmlNode* pNode);
void initSatLimits(JobColumn& column) const;
void fillInXMLDataAsLoaded(execplan::CalpontSystemCatalog::RIDList& colRidList);
void fillInXMLDataNotNullDefault(const std::string& fullTblName,
execplan::CalpontSystemCatalog::ColType& colType, JobColumn& col);
void validateAllColumnsHaveTags(const execplan::CalpontSystemCatalog::RIDList& colRidList) const;
void postProcessTableNode();
static int createTempJobDir(const std::string& xmlFilePath, std::string& errMsg);
private:
void setJobData( xmlNode* pNode,
const xmlTag tag,
bool bExpectContent,
XML_DTYPE tagType );
void setJobDataColumn( xmlNode* pNode, bool bDefaultCol );
void setJobDataIgnoreField ( );
void setJobDataTable ( xmlNode* pNode );
void setReadBuffers ( xmlNode* pNode );
void setSchema ( xmlNode* pNode );
void initSatLimits( JobColumn& column ) const;
void fillInXMLDataAsLoaded(
execplan::CalpontSystemCatalog::RIDList& colRidList);
void fillInXMLDataNotNullDefault(
const std::string& fullTblName,
execplan::CalpontSystemCatalog::ColType& colType,
JobColumn& col );
void validateAllColumnsHaveTags( const
execplan::CalpontSystemCatalog::RIDList& colRidList) const;
void postProcessTableNode( );
static int createTempJobDir( const std::string& xmlFilePath,
std::string& errMsg );
Job fJob; // current job xml
Job fJob; // current job xml
DebugLevel fDebugLevel; // internal use debug level
bool fDeleteTempFile; // delete tmp jobfile in destructor
std::string fJobFileName; // job file name
JobColList fDefaultColumns; // temporary list of default cols
// for table node being processed
bool fValidateColList; // Validate all cols have XML tag
std::string fTimeZone; // Timezone used for TIMESTAMP datatype
DebugLevel fDebugLevel; // internal use debug level
bool fDeleteTempFile; // delete tmp jobfile in destructor
std::string fJobFileName; // job file name
JobColList fDefaultColumns; // temporary list of default cols
// for table node being processed
bool fValidateColList; // Validate all cols have XML tag
std::string fTimeZone; // Timezone used for TIMESTAMP datatype
};
} //end of namespace
} // namespace WriteEngine
#undef EXPORT