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:
@ -172,17 +172,21 @@ tmpDir="/tmp"
|
||||
if [ $user != "root" ]; then
|
||||
tmpDir=$HOME"./tmp"
|
||||
mkdir $tmpDir >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
else
|
||||
#get columnstore temp file directory name
|
||||
TempFileDir=`$installdir/bin/getConfig SystemConfig TempFileDir`
|
||||
tmpDir=${tmpDir}${TempFileDir}
|
||||
fi
|
||||
|
||||
#set base columnstore temp file directory
|
||||
$installdir/bin/setConfig -d SystemConfig SystemTempFileDir $tmpDir
|
||||
|
||||
#create columnstore temp file directory
|
||||
mkdir -p $tmpDir >/dev/null 2>&1
|
||||
#get place file buffer temporary files
|
||||
hdfsRdwrScratch=`$installdir/bin/getConfig SystemConfig hdfsRdwrScratch`
|
||||
hdfsDir=${tmpDir}${hdfsRdwrScratch}
|
||||
|
||||
#create place file buffer temporary files
|
||||
mkdir -p $hdfsDir >/dev/null 2>&1
|
||||
|
||||
#create mount directories
|
||||
mkdir /mnt/tmp > /dev/null 2>&1
|
||||
|
@ -18,7 +18,7 @@ while getopts "vs:t:h:l" flag; do
|
||||
;;
|
||||
t) topt=$OPTARG
|
||||
;;
|
||||
t) lopt=$OPTARG
|
||||
l) lopt=$OPTARG
|
||||
;;
|
||||
h) echo $usage
|
||||
exit 0
|
||||
|
@ -164,7 +164,9 @@ if [ ! -z "$syslog_conf" ] ; then
|
||||
chown $user:$user /home/$user/mariadb/columnstore/etc/*
|
||||
fi
|
||||
|
||||
if [ "$syslog_conf" != /etc/rsyslog.d/columnstore.conf ]; then
|
||||
if [ "$syslog_conf" != /etc/rsyslog.d/columnstore.conf ] ||
|
||||
[ "$syslog_conf" != /etc/rsyslog.d/49-columnstore.conf ]; then
|
||||
|
||||
rm -f ${syslog_conf}.columnstoreSave
|
||||
cp ${syslog_conf} ${syslog_conf}.columnstoreSave >/dev/null 2>&1
|
||||
sed -i '/# MariaDB/,$d' ${syslog_conf}.columnstoreSave > /dev/null 2>&1
|
||||
|
@ -63,6 +63,7 @@ void IDBPolicy::init( bool bEnableLogging, bool bUseRdwrMemBuffer, const string&
|
||||
if ( hdfsRdwrScratch.length() > 0 )
|
||||
{
|
||||
// TODO-check to make sure this directory has sufficient space, whatever that means.
|
||||
|
||||
boost::filesystem::path tmpfilepath( hdfsRdwrScratch );
|
||||
|
||||
if (boost::filesystem::exists(tmpfilepath))
|
||||
@ -79,6 +80,8 @@ void IDBPolicy::init( bool bEnableLogging, bool bUseRdwrMemBuffer, const string&
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << tmpfilepath << endl;
|
||||
|
||||
if (!boost::filesystem::create_directory(tmpfilepath))
|
||||
{
|
||||
// We failed to create the scratch directory
|
||||
|
@ -35,6 +35,9 @@ using namespace boost;
|
||||
|
||||
using namespace config;
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace startup
|
||||
{
|
||||
@ -97,6 +100,12 @@ const string StartUp::tmpDir()
|
||||
|
||||
#else
|
||||
|
||||
//check for non-root user
|
||||
const char* p = getenv("HOME");
|
||||
string homedir = p;
|
||||
|
||||
if (homedir == "/root")
|
||||
{
|
||||
Config* sysConfig = Config::makeConfig();
|
||||
|
||||
string TempFileDir;
|
||||
@ -109,24 +118,15 @@ const string StartUp::tmpDir()
|
||||
{}
|
||||
|
||||
fTmpDirp = new string("/tmp");
|
||||
//See if we can figure out the tmp dir in Linux...
|
||||
//1. env var COLUMNSTORE_INSTALL_DIR
|
||||
const char* p = 0;
|
||||
p = getenv("COLUMNSTORE_INSTALL_DIR");
|
||||
|
||||
if (p && *p)
|
||||
*fTmpDirp = homedir + TempFileDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
string homedir = "/";
|
||||
char* p = getenv("HOME");
|
||||
|
||||
if (p && *p)
|
||||
homedir = p;
|
||||
|
||||
// non-root user
|
||||
*fTmpDirp = homedir + "/.tmp";
|
||||
}
|
||||
|
||||
*fTmpDirp = *fTmpDirp + TempFileDir;
|
||||
|
||||
#endif
|
||||
|
||||
return *fTmpDirp;
|
||||
|
Reference in New Issue
Block a user