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