You've already forked mariadb-columnstore-engine
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:
@ -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
|
||||
{
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -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 );
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user