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:
@ -55,7 +55,7 @@ namespace execplan
|
||||
* default value is 1000.
|
||||
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
||||
* data in between invocations if DESTROYSHMSEG is defined below. The
|
||||
* default is /tmp/CalpontShm.
|
||||
* default is /tmp/ColumnstoreShm.
|
||||
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
||||
*/
|
||||
|
||||
|
@ -2720,16 +2720,16 @@ int ha_calpont_impl_rnd_init(TABLE* table)
|
||||
#ifdef DEBUG_SETENV
|
||||
string home(getenv("HOME"));
|
||||
|
||||
if (!getenv("CALPONT_HOME"))
|
||||
if (!getenv("COLUMNSTORE_HOME"))
|
||||
{
|
||||
string calpontHome(home + "/Calpont/etc/");
|
||||
setenv("CALPONT_HOME", calpontHome.c_str(), 1);
|
||||
setenv("COLUMNSTORE_HOME", calpontHome.c_str(), 1);
|
||||
}
|
||||
|
||||
if (!getenv("CALPONT_CONFIG_FILE"))
|
||||
if (!getenv("COLUMNSTORE_CONFIG_FILE"))
|
||||
{
|
||||
string calpontConfigFile(home + "/Calpont/etc/Columnstore.xml");
|
||||
setenv("CALPONT_CONFIG_FILE", calpontConfigFile.c_str(), 1);
|
||||
string calpontConfigFile(home + "/mariadb/columnstore/etc/Columnstore.xml");
|
||||
setenv("COLUMNSTORE_CONFIG_FILE", calpontConfigFile.c_str(), 1);
|
||||
}
|
||||
|
||||
if (!getenv("CALPONT_CSC_IDENT"))
|
||||
|
@ -249,9 +249,9 @@
|
||||
<ExternalCriticalThreshold>90</ExternalCriticalThreshold>
|
||||
<ExternalMajorThreshold>80</ExternalMajorThreshold>
|
||||
<ExternalMinorThreshold>70</ExternalMinorThreshold>
|
||||
<!-- <TempDiskPath>/tmp</TempDiskPath>
|
||||
<WorkingDir>/tmp</WorkingDir>
|
||||
<TempFileDir>/tmp/columnstore_tmp_files</TempFileDir>
|
||||
<!-- <TempDiskPath>${tmpDir}</TempDiskPath>
|
||||
<WorkingDir>${tmpDir}</WorkingDir>
|
||||
<TempFileDir>${tmpDir}/columnstore_tmp_files</TempFileDir>
|
||||
-->
|
||||
<TransactionArchivePeriod>10</TransactionArchivePeriod>
|
||||
<NMSIPAddress>0.0.0.0</NMSIPAddress>
|
||||
@ -269,7 +269,7 @@
|
||||
-->
|
||||
<hdfsRdwrScratch>/rdwrscratch</hdfsRdwrScratch> <!-- Do not set to an hdfs file path -->
|
||||
<TempFileDir>/columnstore_tmp_files</TempFileDir>
|
||||
<SystemTempFileDir>/tmp/columnstore_tmp_files</SystemTempFileDir>
|
||||
<SystemTempFileDir>${tmpDir}/columnstore_tmp_files</SystemTempFileDir>
|
||||
</SystemConfig>
|
||||
<SystemModuleConfig>
|
||||
<ModuleType1>dm</ModuleType1>
|
||||
@ -495,7 +495,7 @@
|
||||
<!-- Be careful modifying TempFilePath! On start, ExeMgr deletes
|
||||
the entire directory and recreates it to make sure no
|
||||
files are left behind. -->
|
||||
<TempFilePath>$INSTALLDIR/tmp</TempFilePath>
|
||||
<TempFilePath>$INSTALLDIR${tmpDir}</TempFilePath>
|
||||
<TempFileCompression>Y</TempFileCompression>
|
||||
</HashJoin>
|
||||
<JobList>
|
||||
|
@ -79,7 +79,7 @@ tmpDir=`$installdir/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
rm -rf $tmpDir
|
||||
rm -f $installdir/local/*.columnstore
|
||||
rm -rf $installdir/local/etc/
|
||||
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
|
||||
rm -f $installdir/data/bulk${tmpDir}job/* >/dev/null 2>&1
|
||||
rm -f $installdir/local/moveDbrootTransactionLog
|
||||
|
||||
lockdir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig Installation LockFileDirectory`
|
||||
|
@ -43,6 +43,9 @@ using namespace execplan;
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
string tmpDir;
|
||||
string logFile;
|
||||
|
||||
enum BUILD_OPTION
|
||||
{
|
||||
SYSCATALOG_ONLY = 7, //Create systables only
|
||||
@ -54,8 +57,10 @@ namespace
|
||||
int setUp()
|
||||
{
|
||||
#ifndef _MSC_VER
|
||||
(void)system("/bin/rm -f /tmp/dbbuilder.status >/dev/null 2>&1");
|
||||
(void)system("/bin/touch /tmp/dbbuilder.status >/dev/null 2>&1");
|
||||
string cmd = "/bin/rm -f " + logFile + " >/dev/null 2>&1";
|
||||
(void)system(cmd.c_str());
|
||||
cmd = "/bin/touch -f " + logFile + " >/dev/null 2>&1";
|
||||
(void)system(cmd.c_str());
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@ -69,7 +74,8 @@ int checkNotThere(WriteEngine::FID fid)
|
||||
|
||||
void tearDown()
|
||||
{
|
||||
unlink("/tmp/oidbitmap");
|
||||
string file = tmpDir + "/oidbitmap";
|
||||
unlink(file.c_str());
|
||||
}
|
||||
|
||||
void usage()
|
||||
@ -173,6 +179,10 @@ int main(int argc, char* argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
//get tmp log directory
|
||||
tmpDir = startup::StartUp::tmpDir();
|
||||
logFile = tmpDir + "/dbbuilder.status";
|
||||
|
||||
buildOption = atoi(argv[optind++]);
|
||||
|
||||
if (buildOption != 7 && !fFlg)
|
||||
@ -187,7 +197,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
bool canWrite = true;
|
||||
|
||||
if (access("/tmp/dbbuilder.status", W_OK) != 0)
|
||||
if (access(logFile.c_str(), W_OK) != 0)
|
||||
canWrite = false;
|
||||
|
||||
try
|
||||
@ -196,7 +206,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
string cmd = "echo 'FAILED: buildOption=" +
|
||||
oam.itoa(buildOption) +
|
||||
"' > /tmp/dbbuilder.status";
|
||||
"' > " + logFile;
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
@ -230,7 +240,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
catch (const exception& ex)
|
||||
{
|
||||
string cmd(string("echo 'FAILED: ") + ex.what() + "' > /tmp/dbbuilder.status");
|
||||
string cmd(string("echo 'FAILED: ") + ex.what() + "' > " + logFile);
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
@ -242,7 +252,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
string cmd = "echo 'FAILED: HDFS checking.' > /tmp/dbbuilder.status";
|
||||
string cmd = "echo 'FAILED: HDFS checking.' > " + logFile;
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
@ -261,7 +271,7 @@ int main(int argc, char* argv[])
|
||||
SystemCatalog sysCatalog;
|
||||
sysCatalog.build();
|
||||
|
||||
std::string cmd = "echo 'OK: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
||||
std::string cmd = "echo 'OK: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
@ -296,7 +306,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
catch (exception& ex)
|
||||
{
|
||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
@ -307,7 +317,7 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > /tmp/dbbuilder.status";
|
||||
string cmd = "echo 'FAILED: buildOption=" + oam.itoa(buildOption) + "' > " + logFile;
|
||||
|
||||
if (canWrite)
|
||||
(void)system(cmd.c_str());
|
||||
|
@ -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'
|
||||
|
@ -18,6 +18,9 @@ if [ -z "$COLUMNSTORE_INSTALL_DIR" ]; then
|
||||
COLUMNSTORE_INSTALL_DIR=/usr/local/mariadb/columnstore
|
||||
fi
|
||||
|
||||
#get temp directory
|
||||
tmpDir=`$COLUMNSTORE_INSTALL_DIR/bin/getConfig SystemConfig SystemTempFileDir`
|
||||
|
||||
checkContinue() {
|
||||
|
||||
if [ "$CHECK" = false ]; then
|
||||
@ -69,7 +72,6 @@ helpPrint () {
|
||||
echo " Firewall settings"
|
||||
echo " Date/time settings"
|
||||
echo " Dependent packages installed"
|
||||
echo " For non-root user install - test permissions on /tmp and /dev/shm"
|
||||
echo ""
|
||||
echo "Usage: $0 [options]"
|
||||
echo "OPTIONS:"
|
||||
@ -203,23 +205,23 @@ checkLocalOS()
|
||||
echo ""
|
||||
|
||||
#get local OS
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh > /tmp/os_detect 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh > ${tmpDir}/os_detect 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
localOS=`cat /tmp/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||
localOS=`cat ${tmpDir}/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||
echo "Local Node OS System Name : $localOS"
|
||||
|
||||
if [ "$OS" != "" ] ; then
|
||||
echo ""
|
||||
echo "Local Node OS Versions doesn't match the command line OS argument"
|
||||
echo "Contining using the Detected Local Node OS Version"
|
||||
OS=`cat /tmp/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||
OS=`cat ${tmpDir}/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||
|
||||
echo "Local Node OS Version : $OS"
|
||||
else
|
||||
OS=`cat /tmp/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||
OS=`cat ${tmpDir}/os_detect | grep "Operating System tag" | cut -f4 -d " "`
|
||||
fi
|
||||
else
|
||||
localOS=`cat /tmp/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||
localOS=`cat ${tmpDir}/os_detect | grep "Operating System name" | cut -f2 -d '"'`
|
||||
echo "Local Node OS System Name : $localOS"
|
||||
|
||||
if [ "$OS" == "" ] ; then
|
||||
@ -269,16 +271,16 @@ checkLocalDir()
|
||||
echo ""
|
||||
|
||||
#remove any check tmp files from previous runs
|
||||
`rm -f /tmp/*_check > /dev/null 2>&1`
|
||||
`rm -f ${tmpDir}/*_check > /dev/null 2>&1`
|
||||
|
||||
#check /tmp and /dev/shm
|
||||
#check ${tmpDir} and /dev/shm
|
||||
pass=true
|
||||
`touch /tmp/cs_check > /dev/null 2>&1`
|
||||
`touch ${tmpDir}/cs_check > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "Local Node permission test on /tmp : Passed"
|
||||
`rm -f /tmp/cs_check`
|
||||
echo "Local Node permission test on ${tmpDir} : Passed"
|
||||
`rm -f ${tmpDir}/cs_check`
|
||||
else
|
||||
echo "Local Node permission test on /tmp : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||
echo "Local Node permission test on ${tmpDir} : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -349,10 +351,10 @@ checkRemoteDir()
|
||||
#
|
||||
# remove old _check tmp files from remote servers
|
||||
|
||||
`rm -f /tmp/*_check > /dev/null 2>&1`
|
||||
`rm -f ${tmpDir}/*_check > /dev/null 2>&1`
|
||||
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f /tmp/*_check > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f ${tmpDir}/*_check > /dev/null 2>&1' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
done
|
||||
|
||||
if [ "$USER" != "root" ]; then
|
||||
@ -363,26 +365,26 @@ checkRemoteDir()
|
||||
echo ""
|
||||
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /tmp/cs_check' 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch ${tmpDir}/cs_check' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
|
||||
`grep "Permission denied" ${tmpDir}/remote_command_check > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "$ipadd Node permission test on /tmp : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||
echo "$ipadd Node permission test on ${tmpDir} : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||
exit 1
|
||||
else
|
||||
echo "$ipadd Node permission test on /tmp : Passed"
|
||||
echo "$ipadd Node permission test on ${tmpDir} : Passed"
|
||||
fi
|
||||
else
|
||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
||||
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
fi
|
||||
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'touch /dev/shm/cs_check' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||
`grep "Permission denied" /tmp/remote_command_check > /dev/null 2>&1`
|
||||
`grep "Permission denied" ${tmpDir}/remote_command_check > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "$ipadd Node permission test on /dev/shm : ${bold}Failed${normal}, change permissions to 777 and re-test"
|
||||
pass=false
|
||||
@ -391,7 +393,7 @@ checkRemoteDir()
|
||||
echo "$ipadd Node permission test on /dev/shm : Passed"
|
||||
fi
|
||||
else
|
||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
||||
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
fi
|
||||
@ -415,20 +417,20 @@ checkOS()
|
||||
echo ""
|
||||
|
||||
pass=true
|
||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh /tmp/.`
|
||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/os_detect.sh ${tmpDir}/.`
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD /tmp/os_detect.sh 1 > /tmp/remote_scp_put_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD ${tmpDir}/os_detect.sh 1 > ${tmpDir}/remote_scp_put_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check"
|
||||
echo "Error running remote_scp_put.sh to $ipadd Node, check ${tmpDir}/remote_scp_put_check"
|
||||
exit 1
|
||||
else
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD /tmp/os_detect.sh 1 > /tmp/remote_command_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD ${tmpDir}/os_detect.sh 1 > ${tmpDir}/remote_command_check`
|
||||
rc="$?"
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_command.sh /tmp/os_detect.sh on $ipadd Node, check /tmp/remote_command_check"
|
||||
echo "Error running remote_command.sh ${tmpDir}/os_detect.sh on $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||
exit 1
|
||||
else
|
||||
remoteOS=`cat /tmp/remote_command_check | grep "Operating System name" | cut -f2 -d '"'`
|
||||
remoteOS=`cat ${tmpDir}/remote_command_check | grep "Operating System name" | cut -f2 -d '"'`
|
||||
echo "$ipadd Node OS Version : $remoteOS"
|
||||
if [ $localOS != $remoteOS ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd has a different OS than local node"
|
||||
@ -453,25 +455,25 @@ checkLocale()
|
||||
echo ""
|
||||
|
||||
#get local Locale
|
||||
`locale | grep LANG= > /tmp/locale_check 2>&1`
|
||||
`locale | grep LANG= > ${tmpDir}/locale_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "Local Node Locale : `cat /tmp/locale_check`"
|
||||
echo "Local Node Locale : `cat ${tmpDir}/locale_check`"
|
||||
else
|
||||
echo "Error running 'locale' command on local node"
|
||||
fi
|
||||
|
||||
pass=true
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > /tmp/locale_check 2>&1' 1 > /tmp/remote_command_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'locale | grep LANG= > ${tmpDir}/locale_check 2>&1' 1 > ${tmpDir}/remote_command_check`
|
||||
rc="$?"
|
||||
if [ $rc -eq 0 ] || ( [ $rc -eq 2 ] && [ $OS == "suse12" ] ) ; then
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/locale_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/locale_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
exit 1
|
||||
else
|
||||
echo "$ipadd Node Locale : `cat locale_check`"
|
||||
`diff /tmp/locale_check locale_check > /dev/null 2>&1`
|
||||
`diff ${tmpDir}/locale_check locale_check > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd has a different Locale setting than local node"
|
||||
pass=false
|
||||
@ -480,7 +482,7 @@ checkLocale()
|
||||
`rm -f locale_check`
|
||||
fi
|
||||
else
|
||||
echo "Error running remote_command.sh to $ipadd Node, check /tmp/remote_command_check"
|
||||
echo "Error running remote_command.sh to $ipadd Node, check ${tmpDir}/remote_command_check"
|
||||
exit 1
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
@ -538,7 +540,7 @@ checkLocalSELINUX()
|
||||
pass=true
|
||||
#check local SELINUX
|
||||
if [ -f /etc/selinux/config ]; then
|
||||
`cat /etc/selinux/config | grep SELINUX | grep enforcing > /tmp/selinux_check 2>&1`
|
||||
`cat /etc/selinux/config | grep SELINUX | grep enforcing > ${tmpDir}/selinux_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, Local Node SELINUX setting is Enabled, check port test results"
|
||||
pass=false
|
||||
@ -565,9 +567,9 @@ checkUMASK()
|
||||
pass=true
|
||||
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f UMASKtest;touch UMASKtest;echo $(stat -c "%A" "UMASKtest") > test.log' > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'rm -f UMASKtest;touch UMASKtest;echo $(stat -c "%A" "UMASKtest") > test.log' > ${tmpDir}/remote_command_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd Calpont1 test.log >> /tmp/remote_scp_get 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd Calpont1 test.log >> ${tmpDir}/remote_scp_get 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
permission=`cat test.log`
|
||||
result=${permission:4:1}
|
||||
@ -584,11 +586,11 @@ checkUMASK()
|
||||
pass=false
|
||||
fi
|
||||
else
|
||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_scp_get.sh error, check /tmp/remote_scp_get"
|
||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_scp_get.sh error, check ${tmpDir}/remote_scp_get"
|
||||
pass=false
|
||||
fi
|
||||
else
|
||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_command.sh error, check /tmp/remote_command_check"
|
||||
echo "${bold}Warning${normal}, $ipadd UMASK test failed, remote_command.sh error, check ${tmpDir}/remote_command_check"
|
||||
pass=false
|
||||
fi
|
||||
`rm -f test.log`
|
||||
@ -611,11 +613,11 @@ checkSELINUX()
|
||||
|
||||
pass=true
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /etc/selinux/config > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "$ipadd Node SELINUX setting is Not Enabled"
|
||||
else
|
||||
`cat config | grep SELINUX | grep enforcing > /tmp/selinux_check 2>&1`
|
||||
`cat config | grep SELINUX | grep enforcing > ${tmpDir}/selinux_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, $ipadd SELINUX setting is Enabled, check port test results"
|
||||
pass=false
|
||||
@ -644,12 +646,12 @@ checkFirewalls()
|
||||
#check local FIREWALLS
|
||||
for firewall in "${FIREWALL_LIST[@]}"; do
|
||||
pass=true
|
||||
`service $firewall status > /tmp/firewall1_check 2>&1`
|
||||
`service $firewall status > ${tmpDir}/firewall1_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
||||
pass=false
|
||||
else
|
||||
`systemctl status $firewall > /tmp/firewall1_check 2>&1`
|
||||
`systemctl status $firewall > ${tmpDir}/firewall1_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, Local Node $firewall service is Active, check port test results"
|
||||
pass=false
|
||||
@ -667,12 +669,12 @@ checkFirewalls()
|
||||
# 'sysconfig not on remote node
|
||||
for firewall in "${FIREWALL_LIST[@]}"; do
|
||||
pass=true
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "service '$firewall' status > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "service '$firewall' status > ${tmpDir}/firewall_check 2>&1" 1 > ${tmpDir}/remote_command_check`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
||||
pass=false
|
||||
else
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > /tmp/firewall_check 2>&1" 1 > /tmp/remote_command_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "systemctl status '$firewall' > ${tmpDir}/firewall_check 2>&1" 1 > ${tmpDir}/remote_command_check`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Warning${normal}, $ipadd Node $firewall service is Active, check port test results"
|
||||
pass=false
|
||||
@ -696,7 +698,7 @@ checkFirewalls()
|
||||
|
||||
pass=true
|
||||
#check local IPTABLES
|
||||
`/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1`
|
||||
`/sbin/rcSuSEfirewall2 status > ${tmpDir}/rcSuSEfirewall2_check 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node rcSuSEfirewall2 service is Enabled, check port test results"
|
||||
pass=false
|
||||
@ -705,7 +707,7 @@ checkFirewalls()
|
||||
fi
|
||||
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > /tmp/rcSuSEfirewall2_check 2>&1' 1 > /tmp/remote_command_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD '/sbin/rcSuSEfirewall2 status > ${tmpDir}/rcSuSEfirewall2_check 2>&1' 1 > ${tmpDir}/remote_command_check`
|
||||
rc="$?"
|
||||
if [ $rc -eq 0 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node rcSuSEfirewall2 service is Enabled, check port test results"
|
||||
@ -728,12 +730,12 @@ checkPorts()
|
||||
pass=true
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
|
||||
`nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > /tmp/port_test`
|
||||
`nmap $ipadd -p 8600-8630,8700,8800,3306 | grep 'filtered' > ${tmpDir}/port_test`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo $ipadd " Node Passed port test"
|
||||
else
|
||||
echo $ipadd " Node ${bold}Failed${normal} port test, check and disable any firewalls or open ports in firewall"
|
||||
cat /tmp/port_test
|
||||
cat ${tmpDir}/port_test
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
fi
|
||||
@ -756,16 +758,16 @@ checkTime()
|
||||
#get local epoch time
|
||||
localTime=`date +%s`
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'date +%s > /tmp/time_check' > /tmp/time_check`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'date +%s > ${tmpDir}/time_check' > ${tmpDir}/time_check`
|
||||
rc="$?"
|
||||
if [ $rc -ne 0 ] ; then
|
||||
echo $ipadd " Node ${bold}Failed${normal} date/time check failed, check /tmp/time_check"
|
||||
echo $ipadd " Node ${bold}Failed${normal} date/time check failed, check ${tmpDir}/time_check"
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
else
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/time_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/time_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
remoteTime=`cat time_check`
|
||||
timeDiff=`echo "$(($remoteTime-$localTime))"`
|
||||
@ -803,17 +805,17 @@ checkMysqlPassword()
|
||||
fi
|
||||
|
||||
if [ "$IPADDRESSES" != "" ]; then
|
||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/mariadb-command-line.sh /tmp/.`
|
||||
`/bin/cp -f $COLUMNSTORE_INSTALL_DIR/bin/mariadb-command-line.sh ${tmpDir}/.`
|
||||
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD $COLUMNSTORE_INSTALL_DIR/mysql/mysql-Columnstore start > /dev/null 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD /tmp/mariadb-command-line.sh 1 > /tmp/remote_scp_put_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_put.sh $ipadd $PASSWORD ${tmpDir}/mariadb-command-line.sh 1 > ${tmpDir}/remote_scp_put_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_put.sh to $ipadd Node, check /tmp/remote_scp_put_check"
|
||||
echo "Error running remote_scp_put.sh to $ipadd Node, check ${tmpDir}/remote_scp_put_check"
|
||||
exit 1
|
||||
else
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD /tmp/mariadb-command-line.sh 1 > /tmp/remote_command_check`
|
||||
`cat /tmp/remote_command_check | grep "ERROR - PASSWORD" > /dev/null 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD ${tmpDir}/mariadb-command-line.sh 1 > ${tmpDir}/remote_command_check`
|
||||
`cat ${tmpDir}/remote_command_check | grep "ERROR - PASSWORD" > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node MariaDB login failed with missing password file, /root/.my.cnf"
|
||||
pass=false
|
||||
@ -860,8 +862,8 @@ checkPackages()
|
||||
REPORTPASS=false
|
||||
fi
|
||||
else
|
||||
`yum list installed "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep Installed > /dev/null 2>&1`
|
||||
`yum list installed "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep Installed > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
pass=false
|
||||
@ -880,8 +882,8 @@ checkPackages()
|
||||
#check for package that shouldnt be installed
|
||||
pass=true
|
||||
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
||||
`yum list installed "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep Installed > /dev/null 2>&1`
|
||||
`yum list installed "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep Installed > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
pass=false
|
||||
@ -901,14 +903,14 @@ checkPackages()
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
for PKG in "${CENTOS_PKG[@]}"; do
|
||||
if [ $OS == "centos6" ] && [ $PKG == "boost" ]; then
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD 'ls /usr/lib/libboost_regex.so > /dev/null 2>&1' 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}boost libraries${normal} not installed"
|
||||
pass=false
|
||||
REPORTPASS=false
|
||||
fi
|
||||
else
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -eq 2 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
||||
@ -933,7 +935,7 @@ checkPackages()
|
||||
|
||||
#check for package that shouldnt be installed
|
||||
for PKG in "${CENTOS_PKG_NOT[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "yum list installed '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -eq 2 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node, 'yum' not installed"
|
||||
@ -972,8 +974,8 @@ checkPackages()
|
||||
pass=true
|
||||
#check centos packages on local node
|
||||
for PKG in "${SUSE_PKG[@]}"; do
|
||||
`rpm -qi "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||
`rpm -qi "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
pass=false
|
||||
@ -990,8 +992,8 @@ checkPackages()
|
||||
#check for package that shouldnt be installed
|
||||
pass=true
|
||||
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
||||
`rpm -qi "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||
`rpm -qi "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep "not installed" > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
pass=false
|
||||
@ -1011,7 +1013,7 @@ checkPackages()
|
||||
if [ "$IPADDRESSES" != "" ]; then
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
for PKG in "${SUSE_PKG[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -ne 0 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
@ -1030,7 +1032,7 @@ checkPackages()
|
||||
|
||||
#check for package that shouldnt be installed
|
||||
for PKG in "${SUSE_PKG_NOT[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "rpm -qi '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
rc="$?"
|
||||
if [ $rc -eq 0 ] ; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
@ -1063,8 +1065,8 @@ checkPackages()
|
||||
pass=true
|
||||
#check centos packages on local node
|
||||
for PKG in "${UBUNTU_PKG[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
pass=false
|
||||
@ -1081,8 +1083,8 @@ checkPackages()
|
||||
#check for package that shouldnt be installed
|
||||
pass=true
|
||||
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
pass=false
|
||||
@ -1102,12 +1104,12 @@ checkPackages()
|
||||
if [ "$IPADDRESSES" != "" ]; then
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
for PKG in "${UBUNTU_PKG[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
@ -1134,12 +1136,12 @@ checkPackages()
|
||||
|
||||
#check for package that shouldnt be installed
|
||||
for PKG in "${UBUNTU_PKG_NOT[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
@ -1181,8 +1183,8 @@ checkPackages()
|
||||
pass=true
|
||||
#check centos packages on local node
|
||||
for PKG in "${DEBIAN_PKG[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
pass=false
|
||||
@ -1199,8 +1201,8 @@ checkPackages()
|
||||
#check for package that shouldnt be installed
|
||||
pass=true
|
||||
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
pass=false
|
||||
@ -1220,12 +1222,12 @@ checkPackages()
|
||||
if [ "$IPADDRESSES" != "" ]; then
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
for PKG in "${DEBIAN_PKG[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
@ -1252,12 +1254,12 @@ checkPackages()
|
||||
|
||||
#check for package that shouldnt be installed
|
||||
for PKG in "${DEBIAN_PKG_NOT[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
@ -1299,8 +1301,8 @@ checkPackages()
|
||||
pass=true
|
||||
#check centos packages on local node
|
||||
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is not installed, please install"
|
||||
pass=false
|
||||
@ -1317,8 +1319,8 @@ checkPackages()
|
||||
#check for package that shouldnt be installed
|
||||
pass=true
|
||||
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
||||
`dpkg -s "$PKG" > /tmp/pkg_check 2>&1`
|
||||
`cat /tmp/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
`dpkg -s "$PKG" > ${tmpDir}/pkg_check 2>&1`
|
||||
`cat ${tmpDir}/pkg_check | grep 'install ok installed' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, Local Node package ${bold}${PKG}${normal} is installed, please un-install"
|
||||
pass=false
|
||||
@ -1339,12 +1341,12 @@ checkPackages()
|
||||
if [ "$IPADDRESSES" != "" ]; then
|
||||
for ipadd in "${NODE_IPADDRESS[@]}"; do
|
||||
for PKG in "${DEBIAN9_PKG[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
@ -1371,12 +1373,12 @@ checkPackages()
|
||||
|
||||
#check for package that shouldnt be installed
|
||||
for PKG in "${DEBIAN9_PKG_NOT[@]}"; do
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > /tmp/pkg_check 2>&1" 1 > /tmp/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD /tmp/pkg_check > /tmp/remote_scp_get_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_command.sh $ipadd $PASSWORD "dpkg -s '$PKG' > ${tmpDir}/pkg_check 2>&1" 1 > ${tmpDir}/remote_command_check 2>&1`
|
||||
`$COLUMNSTORE_INSTALL_DIR/bin/remote_scp_get.sh $ipadd $PASSWORD ${tmpDir}/pkg_check > ${tmpDir}/remote_scp_get_check 2>&1`
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check /tmp/remote_scp_get_check"
|
||||
echo "Error running remote_scp_get.sh to $ipadd Node, check ${tmpDir}/remote_scp_get_check"
|
||||
else
|
||||
`cat /tmp/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
`cat ${tmpDir}/remote_command_check | grep 'command not found' > /dev/null 2>&1`
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "${bold}Failed${normal}, $ipadd Node ${bold}dpkg${normal} package not installed"
|
||||
pass=false
|
||||
|
@ -97,7 +97,7 @@ Config* Config::makeConfig(const char* cf)
|
||||
cf = cfStr.c_str();
|
||||
|
||||
#else
|
||||
cf = getenv("CALPONT_CONFIG_FILE");
|
||||
cf = getenv("COLUMNSTORE_CONFIG_FILE");
|
||||
#endif
|
||||
|
||||
if (cf == 0 || *cf == 0)
|
||||
@ -419,7 +419,7 @@ void Config::writeConfig(const string& configFile) const
|
||||
value = c1->getConfig("SystemConfig", "SystemName");
|
||||
|
||||
//good read, save copy, copy temp file tp tmp then to Columnstore.xml
|
||||
//move to /tmp to get around a 'same file error' in mv command
|
||||
//move to get around a 'same file error' in mv command
|
||||
try
|
||||
{
|
||||
if (exists(scft)) fs::remove(scft);
|
||||
|
@ -50,12 +50,16 @@ namespace config
|
||||
|
||||
void WriteOnceConfig::initializeDefaults()
|
||||
{
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
fLBID_Shift = make_pair("13", false);
|
||||
fDBRootCount = make_pair("1", false);
|
||||
fDBRMRoot = make_pair("/mnt/OAM/dbrm/BRM_saves", false);
|
||||
fSharedMemoryTmpFile1 = make_pair("/tmp/CalpontShm,", false);
|
||||
string file = tmpDir + "/ColumnstoreShm";
|
||||
fSharedMemoryTmpFile1 = make_pair(file, false);
|
||||
fTxnIDFile = make_pair("/mnt/OAM/dbrm/SMTxnID", false);
|
||||
fSharedMemoryTmpFile2 = make_pair("/tmp/CalpontSessionMonitorShm", false);
|
||||
file = tmpDir + "/CalpontSessionMonitorShm";
|
||||
fSharedMemoryTmpFile2 = make_pair(file, false);
|
||||
}
|
||||
|
||||
void WriteOnceConfig::setup()
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
Copyright (C) 2018 MariaDB Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
@ -28,6 +29,8 @@
|
||||
|
||||
#include "IDBLogger.h"
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <time.h>
|
||||
@ -55,7 +58,10 @@ void IDBLogger::writeLog( const std::string& logmsg )
|
||||
pthread_t threadid = pthread_self();
|
||||
#endif
|
||||
ostringstream fname;
|
||||
fname << "/tmp/idbdf-log-" << pid << "-" << threadid << ".csv";
|
||||
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
fname << tmpDir + "/idbdf-log-" << pid << "-" << threadid << ".csv";
|
||||
|
||||
ofstream output;
|
||||
output.open( fname.str().c_str(), ios::out | ios::app );
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
Copyright (C) 2018 MariaDB Corporation
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
@ -22,6 +23,7 @@
|
||||
#include "joinpartition.h"
|
||||
#include "tuplejoiner.h"
|
||||
#include "atomicops.h"
|
||||
#include "installdir.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace utils;
|
||||
@ -128,12 +130,9 @@ JoinPartition::JoinPartition(const JoinPartition& jp, bool splitMode) :
|
||||
// Instead, each will double in size, giving a capacity of 8GB -> 16 -> 32, and so on.
|
||||
// bucketCount = jp.bucketCount;
|
||||
bucketCount = 2;
|
||||
filenamePrefix = config->getConfig("HashJoin", "TempFilePath");
|
||||
filenamePrefix = startup::StartUp::tmpDir();
|
||||
|
||||
if (filenamePrefix.empty())
|
||||
filenamePrefix = "/tmp/infinidb";
|
||||
|
||||
filenamePrefix += "/Infinidb-join-data-";
|
||||
filenamePrefix += "/Columnstore-join-data-";
|
||||
|
||||
uniqueID = atomicops::atomicInc(&uniqueNums);
|
||||
uint32_t tmp = uniqueID;
|
||||
|
@ -73,7 +73,7 @@ namespace BRM
|
||||
* default value is 1000.
|
||||
* SessionManager/SharedMemoryTmpFile: the file to store the shared memory segment
|
||||
* data in between invocations if DESTROYSHMSEG is defined below. The
|
||||
* default is /tmp/CalpontShm.
|
||||
* default is /tmp/ColumnstoreShm.
|
||||
* SessionManager/TxnIDFile: the file to store the last transaction ID issued
|
||||
*/
|
||||
|
||||
|
@ -43,6 +43,8 @@
|
||||
#include "slavecomm.h"
|
||||
#undef SLAVECOMM_DLLEXPORT
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace messageqcpp;
|
||||
using namespace idbdatafile;
|
||||
@ -99,6 +101,8 @@ SlaveComm::SlaveComm(string hostname, SlaveDBRMNode* s) :
|
||||
}
|
||||
}
|
||||
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
/* NOTE: this string has to match whatever is designated as the first slave */
|
||||
if (hostname == "DBRM_Worker1")
|
||||
{
|
||||
@ -108,11 +112,11 @@ SlaveComm::SlaveComm(string hostname, SlaveDBRMNode* s) :
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
savefile = "/tmp/BRM_SaveFiles";
|
||||
savefile = tmpDir + "/BRM_SaveFiles";
|
||||
}
|
||||
|
||||
if (savefile == "")
|
||||
savefile = "/tmp/BRM_SaveFiles";
|
||||
savefile = tmpDir + "/BRM_SaveFiles";
|
||||
|
||||
tmp = "";
|
||||
|
||||
@ -181,17 +185,19 @@ SlaveComm::SlaveComm()
|
||||
{
|
||||
config::Config* config = config::Config::makeConfig();
|
||||
|
||||
string tmpDir = startup::StartUp::tmpDir();
|
||||
|
||||
try
|
||||
{
|
||||
savefile = config->getConfig("SystemConfig", "DBRMRoot");
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
savefile = "/tmp/BRM_SaveFiles";
|
||||
savefile = tmpDir + "/BRM_SaveFiles";
|
||||
}
|
||||
|
||||
if (savefile == "")
|
||||
savefile = "/tmp/BRM_SaveFiles";
|
||||
savefile = tmpDir + "/BRM_SaveFiles";
|
||||
|
||||
journalName = savefile + "_journal";
|
||||
|
||||
|
@ -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:
|
||||
@ -186,10 +186,6 @@ def main():
|
||||
"""
|
||||
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')
|
||||
else:
|
||||
|
@ -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'
|
||||
@ -72,10 +72,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:
|
||||
@ -183,10 +183,6 @@ def main():
|
||||
"""
|
||||
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')
|
||||
else:
|
||||
|
@ -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());
|
||||
|
@ -270,7 +270,7 @@ void Config::checkReload( )
|
||||
|
||||
if ( hdfsRdwrScratch.length() == 0 )
|
||||
{
|
||||
hdfsRdwrScratch = "/tmp/hdfsscratch";
|
||||
hdfsRdwrScratch = TmpFileDir + "/hdfsscratch";
|
||||
}
|
||||
|
||||
IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize );
|
||||
|
@ -72,6 +72,8 @@ using namespace batchloader;
|
||||
#include "we_tablelockgrabber.h"
|
||||
#include "we_simplesyslog.h"
|
||||
|
||||
#include "installdir.h"
|
||||
|
||||
namespace WriteEngine
|
||||
{
|
||||
//------------------------------------------------------------------------------
|
||||
@ -1402,7 +1404,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())
|
||||
@ -1883,10 +1885,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