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

MCOL-4483: Fix and consolidate log files and cpimport logging.

This commit is contained in:
benthompson15
2021-01-20 12:04:52 -06:00
parent ceae2118a2
commit afa88866bb
32 changed files with 172 additions and 287 deletions

View File

@ -52,6 +52,7 @@
#include "IDBPolicy.h"
#include "MonitorProcMem.h"
#include "dataconvert.h"
#include "mcsconfig.h"
using namespace std;
using namespace WriteEngine;
@ -1149,7 +1150,8 @@ int main(int argc, char** argv)
int rc = NO_ERROR;
std::string exceptionMsg;
TASK task; // track tasks being performed
// set this upfront
curJob.setErrorDir(string(MCSLOGDIR) + "/cpimport/");
try
{
//--------------------------------------------------------------------------

View File

@ -53,6 +53,7 @@
#include "idbcompress.h"
#include "calpontsystemcatalog.h"
#include "we_ddlcommandclient.h"
#include "mcsconfig.h"
using namespace std;
@ -76,7 +77,6 @@ namespace WriteEngine
/* static */ const std::string BulkLoad::DIR_BULK_JOB("job");
/* static */ const std::string BulkLoad::DIR_BULK_TEMP_JOB("tmpjob");
/* static */ const std::string BulkLoad::DIR_BULK_IMPORT("/data/import/");
/* static */ const std::string BulkLoad::DIR_BULK_LOG("/log/");
/* static */ bool BulkLoad::fNoConsoleOutput = false;
//------------------------------------------------------------------------------
@ -275,9 +275,9 @@ int BulkLoad::loadJobInfo(
const Job& curJob = fJobInfo.getJob();
string logFile, errlogFile;
logFile = fRootDir + DIR_BULK_LOG + "Job_" +
logFile = std::string(MCSLOGDIR) + "/cpimport/" + "Job_" +
Convertor::int2Str( curJob.id ) + LOG_SUFFIX;
errlogFile = fRootDir + DIR_BULK_LOG + "Job_" +
errlogFile = std::string(MCSLOGDIR) + "/cpimport/" + "Job_" +
Convertor::int2Str( curJob.id ) + ERR_LOG_SUFFIX;
if (disableConsoleOutput())
@ -1055,7 +1055,7 @@ int BulkLoad::processJob( )
(fBulkMode == BULK_MODE_REMOTE_MULTIPLE_SRC))
tableInfo->setBulkLoadMode( fBulkMode, fBRMRptFileName );
tableInfo->setErrorDir(getErrorDir());
tableInfo->setErrorDir(string(getErrorDir()));
tableInfo->setTruncationAsError(getTruncationAsError());
rc = manageImportDataFileList( curJob, i, tableInfo );

View File

@ -1577,9 +1577,9 @@ void TableInfo::writeBadRows( const std::vector<std::string>* errorDatRows,
rejectFileNameToLog = fRejectDataFileName;
}
oss << "Number of rows with errors = " << fRejectDataCnt <<
". Exact error rows are listed in file " <<
rejectFileNameToLog;
oss << "Number of rows with bad data = " << fRejectDataCnt <<
". Exact rows are listed in file located here: " <<
fErrorDir;
fLog->logMsg(oss.str(), MSGLVL_INFO1);
fRejectDataCnt = 0;
@ -1691,9 +1691,9 @@ void TableInfo::writeErrReason( const std::vector< std::pair<RID,
errFileNameToLog = fRejectErrFileName;
}
oss << "Number of rows with errors = " << fRejectErrCnt <<
". Row numbers with error reasons are listed in file " <<
errFileNameToLog;
oss << "Number of rows with errors = " << fRejectDataCnt <<
". Exact rows are listed in file located here: " <<
fErrorDir;
fLog->logMsg(oss.str(), MSGLVL_INFO1);
fRejectErrCnt = 0;