You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
@ -52,10 +52,10 @@ def find_paths():
|
||||
|
||||
"""Find DBRoot and BulkRoot."""
|
||||
try:
|
||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
||||
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||
except KeyError:
|
||||
try:
|
||||
logger.info("Environment variable CALPONT_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||
logger.info("Environment variable COLUMNSTORE_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||
os.lstat(config_file)
|
||||
except:
|
||||
@ -185,10 +185,6 @@ def main():
|
||||
clean up old files, sort the index inserts and generally rock and roll
|
||||
"""
|
||||
start_dir = curdir=os.getcwd() # remember where we started
|
||||
|
||||
if not os.access('.', os.W_OK):
|
||||
os.chdir('/tmp')
|
||||
logger.warn('Changing to /tmp to have permission to write files')
|
||||
|
||||
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
||||
logger.info('No environment variable LD_LIBRARY_PATH')
|
||||
|
@ -6,7 +6,7 @@ def find_paths():
|
||||
|
||||
"""Find DBRoot and BulkRoot."""
|
||||
try:
|
||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
||||
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||
except KeyError:
|
||||
try:
|
||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||
@ -71,10 +71,6 @@ def main():
|
||||
"""
|
||||
Validate indexes..
|
||||
"""
|
||||
|
||||
if not os.access('.', os.W_OK):
|
||||
os.chdir('/tmp')
|
||||
print 'Changing to /tmp to have permission to write files'
|
||||
|
||||
if len(os.getenv('LD_LIBRARY_PATH'))<5:
|
||||
print 'Suspicous LD_LIBRARY_PATH: %s'%os.getenv('LD_LIBRARY_PATH')
|
||||
|
@ -49,10 +49,10 @@ def find_paths():
|
||||
|
||||
"""Find DBRoot and BulkRoot."""
|
||||
try:
|
||||
config_file = os.environ['CALPONT_CONFIG_FILE']
|
||||
config_file = os.environ['COLUMNSTORE_CONFIG_FILE']
|
||||
except KeyError:
|
||||
try:
|
||||
logger.info("Environment variable CALPONT_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||
logger.info("Environment variable COLUMNSTORE_CONFIG_FILE not set, looking for system Columnstore.xml")
|
||||
config_file = '/usr/local/mariadb/columnstore/etc/Columnstore.xml'
|
||||
os.lstat(config_file)
|
||||
except:
|
||||
@ -182,10 +182,6 @@ def main():
|
||||
clean up old files, sort the index inserts and generally rock and roll
|
||||
"""
|
||||
start_dir = curdir=os.getcwd() # remember where we started
|
||||
|
||||
if not os.access('.', os.W_OK):
|
||||
os.chdir('/tmp')
|
||||
logger.warn('Changing to /tmp to have permission to write files')
|
||||
|
||||
if not os.environ.has_key('LD_LIBRARY_PATH'):
|
||||
logger.info('No environment variable LD_LIBRARY_PATH')
|
||||
|
@ -1331,15 +1331,6 @@ void WEDataLoader::onReceiveBrmRptFileName(ByteStream& Ibs)
|
||||
cout << "Creating directory : " << dirname << endl;
|
||||
boost::filesystem::create_directories(dirname.c_str());
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef _MSC_VER
|
||||
mkdir(dirname.c_str());
|
||||
#else
|
||||
mkdir(dirname.c_str(), 0777);
|
||||
boost::filesystem::create_directories("/tmp/boby/test");
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
if (fpSysLog)
|
||||
@ -1568,15 +1559,6 @@ void WEDataLoader::onReceiveJobId(ByteStream& Ibs)
|
||||
cout << "Creating directory : " << dirname << endl;
|
||||
boost::filesystem::create_directories(dirname.c_str());
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef _MSC_VER
|
||||
mkdir(dirname.c_str());
|
||||
#else
|
||||
mkdir(dirname.c_str(), 0777);
|
||||
boost::filesystem::create_directories("/tmp/boby/test");
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
fJobFile.open(aJobFileName.c_str());
|
||||
|
@ -263,11 +263,14 @@ void Config::checkReload( )
|
||||
}
|
||||
|
||||
// Directory in which to place file buffer temporary files.
|
||||
string TmpFileDir = startup::StartUp::tmpDir();
|
||||
|
||||
string hdfsRdwrScratch = cf->getConfig("SystemConfig", "hdfsRdwrScratch");
|
||||
hdfsRdwrScratch = TmpFileDir + hdfsRdwrScratch;
|
||||
|
||||
if ( hdfsRdwrScratch.length() == 0 )
|
||||
{
|
||||
hdfsRdwrScratch = "/tmp/hdfsscratch";
|
||||
hdfsRdwrScratch = TmpFileDir + "/hdfsscratch";
|
||||
}
|
||||
|
||||
IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize );
|
||||
|
@ -1418,8 +1418,7 @@ std::string WECmdArgs::getTmpFileDir()
|
||||
{
|
||||
if (!fTmpFileDir.empty()) return fTmpFileDir;
|
||||
|
||||
fTmpFileDir = config::Config::makeConfig()->getConfig("SystemConfig",
|
||||
"TempFileDir");
|
||||
fTmpFileDir = startup::StartUp::tmpDir();
|
||||
|
||||
if (fTmpFileDir.empty())
|
||||
throw( runtime_error("Config ERROR: TmpFileDir not found!!"));
|
||||
|
@ -73,6 +73,8 @@ using namespace batchloader;
|
||||
#include "we_tablelockgrabber.h"
|
||||
#include "we_simplesyslog.h"
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
//------------------------------------------------------------------------------
|
||||
@ -1403,7 +1405,7 @@ void WESDHandler::onBrmReport(int PmId, messageqcpp::SBS& Sbs)
|
||||
if (!fRef.fCmdArgs.getConsoleOutput())
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << "/tmp/" << fTableOId << ".txt";
|
||||
oss << startup::StartUp::tmpDir() << fTableOId << ".txt";
|
||||
ofstream dmlFile(oss.str().c_str(), std::ofstream::app);
|
||||
|
||||
if (dmlFile.is_open())
|
||||
@ -1884,10 +1886,10 @@ void WESDHandler::onCleanupResult(int PmId, messageqcpp::SBS& Sbs)
|
||||
WEColOorVec::iterator aIt = fImportRslt.fColOorVec.begin();
|
||||
ofstream dmlFile;
|
||||
|
||||
if (!fRef.fCmdArgs.getConsoleOutput()) //for DML to use file /tmp/
|
||||
if (!fRef.fCmdArgs.getConsoleOutput()) //for DML to use file
|
||||
{
|
||||
ostringstream oss;
|
||||
oss << "/tmp/" << fTableOId << ".txt";
|
||||
oss << startup::StartUp::tmpDir() << fTableOId << ".txt";
|
||||
dmlFile.open(oss.str().c_str());
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ WESplitterApp::WESplitterApp(WECmdArgs& CmdArgs) :
|
||||
{
|
||||
ofstream dmlFile;
|
||||
ostringstream oss;
|
||||
oss << "/tmp/" << fDh.getTableOID() << ".txt";
|
||||
oss << startup::StartUp::tmpDir() << fDh.getTableOID() << ".txt";
|
||||
dmlFile.open(oss.str().c_str());
|
||||
|
||||
if (dmlFile.is_open())
|
||||
|
Reference in New Issue
Block a user