1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-25 20:23:16 +03:00

MCOL-3520: Fix cpimport S3 multi-PM imports

Impl'd mode-1 imports from S3 & fixed a few other minor things I noticed.
This commit is contained in:
Patrick LeBlanc
2020-02-06 18:09:52 -05:00
parent 65de8b8e63
commit 53afb3c71e
7 changed files with 117 additions and 94 deletions

View File

@@ -501,14 +501,9 @@ void WESDHandler::setup()
//fLog.setLogFileName(aLogName.c_str(), aErrLogName.c_str(), false);
fLog.setLogFileName(aLogName.c_str(), aErrLogName.c_str(), getConsoleLog());
// In mode 0 and Mode 1, we need to check for local file availability
if ((0 == fRef.fCmdArgs.getMode()) || (1 == fRef.fCmdArgs.getMode()))
{
if (!check4InputFile(fRef.getLocFile()))
{
throw (runtime_error("Could not open Input file " + fRef.getLocFile()));
}
}
// In mode 0 and Mode 1, we need to construct the input file list and check availability
if (0 == fRef.fCmdArgs.getMode() || 1 == fRef.fCmdArgs.getMode())
setInputFileList(fRef.getLocFile());
fImportRslt.startTimer();
@@ -2726,28 +2721,9 @@ std::string WESDHandler::getTime2Str() const
//------------------------------------------------------------------------------
bool WESDHandler::check4InputFile(std::string InFileName)
void WESDHandler::setInputFileList(std::string InFileName)
{
bool aRet = false;
if ((0 == InFileName.compare("STDIN")) || (0 == InFileName.compare("stdin")))
{
fFileReadThread.add2InputDataFileList(InFileName);
return true;
}
else
{
//BUG 4342 - Need to support "list of infiles"
fFileReadThread.chkForListOfFiles(InFileName);
std::string aFileName = fFileReadThread.getNextInputDataFile();
std::ifstream aFile(aFileName.c_str());
aRet = (aFile.good()) ? true : false;
// add back to list, which we pop_front for checking the file.
if (aRet) fFileReadThread.add2InputDataFileList(aFileName);
}
return aRet;
fFileReadThread.chkForListOfFiles(InFileName);
}
//------------------------------------------------------------------------------