You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-520
This commit is contained in:
@ -204,7 +204,6 @@ template<typename container_t, typename element_t>
|
||||
LargeDataList<container_t, element_t>::LargeDataList(uint32_t nc, uint32_t elementSaveSize1st, uint32_t elementSaveSize2nd, const ResourceManager* rm):
|
||||
base(nc), path(rm.getScTempDiskPath()), fTraceOn(false), fReUse(false), fSaveForReuse(false), fRestoreInfo(NULL)
|
||||
{
|
||||
// config::Config *config = config::Config::makeConfig();
|
||||
|
||||
loadedSet = 0;
|
||||
setCount = 1;
|
||||
@ -214,14 +213,6 @@ LargeDataList<container_t, element_t>::LargeDataList(uint32_t nc, uint32_t eleme
|
||||
multipleProducers = false;
|
||||
fLoadedSetCount = 0;
|
||||
setDiskElemSize ( elementSaveSize1st, elementSaveSize2nd );
|
||||
// try {
|
||||
// path = config->getConfig("SystemConfig", "TempDiskPath");
|
||||
// }
|
||||
// catch (...) {
|
||||
// }
|
||||
// if (path.length() == 0)
|
||||
// path = defaultTempDiskPath;
|
||||
//pthread_cond_init(&consumePhase, NULL);
|
||||
}
|
||||
|
||||
template<typename container_t, typename element_t>
|
||||
|
@ -249,13 +249,14 @@
|
||||
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
||||
<ExternalMajorThreshold>80</ExternalMajorThreshold>
|
||||
<ExternalMinorThreshold>70</ExternalMinorThreshold>
|
||||
<TempDiskPath>/tmp</TempDiskPath>
|
||||
<!-- <TempDiskPath>/tmp</TempDiskPath>
|
||||
<WorkingDir>/tmp</WorkingDir>
|
||||
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||
-->
|
||||
<TransactionArchivePeriod>10</TransactionArchivePeriod>
|
||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||
<TempSaveSize>128M</TempSaveSize> <!-- default SWSDL max element save size -->
|
||||
<WaitPeriod>10</WaitPeriod> <!-- in seconds -->
|
||||
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||
<CalpontHome>$INSTALLDIR</CalpontHome>
|
||||
<ProcessRestartCount>10</ProcessRestartCount>
|
||||
<ProcessRestartPeriod>120</ProcessRestartPeriod>
|
||||
@ -266,7 +267,8 @@
|
||||
<!-- enable if you want to limit how much memory may be used for hdfs read/write memory buffers.
|
||||
<hdfsRdwrBufferMaxSize>8G</hdfsRdwrBufferMaxSize>
|
||||
-->
|
||||
<hdfsRdwrScratch>/tmp/rdwrscratch</hdfsRdwrScratch> <!-- Do not set to an hdfs file path -->
|
||||
<hdfsRdwrScratch>rdwrscratch</hdfsRdwrScratch> <!-- Do not set to an hdfs file path -->
|
||||
<TempFileDir>/columnstore_tmp_files</TempFileDir>
|
||||
</SystemConfig>
|
||||
<SystemModuleConfig>
|
||||
<ModuleType1>dm</ModuleType1>
|
||||
|
@ -174,8 +174,11 @@ if [ $user != "root" ]; then
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
TempFileDir=`$installdir/bin/getConfig SystemConfig TempFileDir`
|
||||
tmpDir=$tmpDir+$TempFileDir
|
||||
|
||||
#create columnstore temp file directory
|
||||
mkdir -p $tmpDir/columnstore_tmp_files >/dev/null 2>&1
|
||||
mkdir -p $tmpDir >/dev/null 2>&1
|
||||
|
||||
#create mount directories
|
||||
mkdir /mnt/tmp > /dev/null 2>&1
|
||||
|
@ -69,6 +69,9 @@ if [ $user == "root" ]; then
|
||||
fi
|
||||
rm -rf $installdir/mysql/db/columnstore_log_archive > /dev/null 2>&1\
|
||||
|
||||
# delete Mariab Columnstore shared memory segments
|
||||
$installdir/bin/clearShm > /dev/null 2>&1
|
||||
|
||||
#get temp directory
|
||||
tmpDir="/tmp"
|
||||
if [ $user != "root" ]; then
|
||||
@ -76,21 +79,14 @@ if [ $user != "root" ]; then
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
# delete Mariab Columnstore shared memory segments
|
||||
$installdir/bin/clearShm > /dev/null 2>&1
|
||||
TempFileDir=`$installdir/bin/getConfig SystemConfig TempFileDir`
|
||||
tmpDir=$tmpDir+$TempFileDir
|
||||
|
||||
# delete tmp files
|
||||
rm -rf $tmpDir
|
||||
rm -f $installdir/local/*.columnstore
|
||||
rm -rf $installdir/local/etc/
|
||||
rm -rf $tmpDir/bucketreuse
|
||||
rm -f $tmpDir/columnstore.txt
|
||||
rm -f $tmpDir/dbbuilder.*
|
||||
rm -f $tmpDir/dbrmfiles
|
||||
rm -f $tmpDir/pkgcheck
|
||||
rm -f $tmpDir/upgrade-status.log.*
|
||||
rm -f $tmpDir/mount.log
|
||||
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
|
||||
rm -rf $tmpDir/columnstore_tmp_files
|
||||
rm -f $installdir/local/moveDbrootTransactionLog
|
||||
|
||||
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||
|
@ -42,11 +42,8 @@ int main (int argc, char** argv)
|
||||
{
|
||||
ServerMonitor serverMonitor;
|
||||
Oam oam;
|
||||
|
||||
string TempFileDir;
|
||||
oam.getSystemConfig("TempFileDir", TempFileDir);
|
||||
|
||||
tmpDir = startup::StartUp::tmpDir() + TempFileDir;
|
||||
tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
struct sigaction ign;
|
||||
|
||||
|
@ -217,7 +217,9 @@ void IDBPolicy::configIDBPolicy()
|
||||
|
||||
// Directory in which to place file buffer temporary files.
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
string hdfsRdwrScratch = tmpDir + "/rdwrscratch";
|
||||
|
||||
string hdfsRdwrScratch = cf->getConfig("SystemConfig", "hdfsRdwrScratch");
|
||||
hdfsRdwrScratch = tmpDir + hdfsRdwrScratch;
|
||||
|
||||
IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize );
|
||||
|
||||
|
@ -31,6 +31,10 @@ using namespace boost;
|
||||
#include "idbregistry.h"
|
||||
#endif
|
||||
#include "installdir.h"
|
||||
#include "configcpp.h"
|
||||
|
||||
using namespace config;
|
||||
|
||||
|
||||
namespace startup
|
||||
{
|
||||
@ -92,6 +96,18 @@ const string StartUp::tmpDir()
|
||||
*fTmpDirp = cfStr;
|
||||
|
||||
#else
|
||||
|
||||
Config* sysConfig = Config::makeConfig();
|
||||
|
||||
string TempFileDir;
|
||||
|
||||
try
|
||||
{
|
||||
TempFileDir = sysConfig->getConfig("SystemConfig", "TempFileDir");
|
||||
}
|
||||
catch (...)
|
||||
{}
|
||||
|
||||
fTmpDirp = new string("/tmp");
|
||||
//See if we can figure out the tmp dir in Linux...
|
||||
//1. env var COLUMNSTORE_INSTALL_DIR
|
||||
@ -108,6 +124,8 @@ const string StartUp::tmpDir()
|
||||
|
||||
*fTmpDirp = homedir + "/.tmp";
|
||||
}
|
||||
|
||||
*fTmpDirp = *fTmpDirp + TempFileDir;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -263,7 +263,10 @@ 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 )
|
||||
{
|
||||
|
@ -1418,7 +1418,7 @@ std::string WECmdArgs::getTmpFileDir()
|
||||
{
|
||||
if (!fTmpFileDir.empty()) return fTmpFileDir;
|
||||
|
||||
fTmpFileDir = startup::StartUp::tmpDir() + "columnstore_tmp_files";
|
||||
fTmpFileDir = startup::StartUp::tmpDir();
|
||||
|
||||
if (fTmpFileDir.empty())
|
||||
throw( runtime_error("Config ERROR: TmpFileDir not found!!"));
|
||||
|
Reference in New Issue
Block a user