From f25082bc9a7d9829881f70fe7e004ce1d1a315cd Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 25 Sep 2018 17:20:46 -0500 Subject: [PATCH] MCOL-520 --- oam/install_scripts/run.sh | 5 +++-- oamapps/mcsadmin/mcsadmin.cpp | 4 ++-- tools/hdfsCheck/hdfsCheck.cpp | 12 +++++++++--- utils/idbdatafile/IDBPolicy.cpp | 4 ++-- writeengine/shared/we_config.cpp | 2 +- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/oam/install_scripts/run.sh b/oam/install_scripts/run.sh index 9cc72ba4b..2cb05ef32 100755 --- a/oam/install_scripts/run.sh +++ b/oam/install_scripts/run.sh @@ -31,7 +31,7 @@ done shift $((OPTIND - 1)) -exename="$1" +exename="$2" if [ -z "$exename" ]; then echo $usage 1>&2 @@ -49,7 +49,8 @@ if [ $vflg -gt 0 ]; then fi while [ $keep_going -ne 0 ]; do - $exename $args +# $exename $args + $exename if [ -e ${lopt}/StopColumnstore ]; then exit 0 fi diff --git a/oamapps/mcsadmin/mcsadmin.cpp b/oamapps/mcsadmin/mcsadmin.cpp index 0750b1abc..5a9b000e4 100644 --- a/oamapps/mcsadmin/mcsadmin.cpp +++ b/oamapps/mcsadmin/mcsadmin.cpp @@ -4926,10 +4926,10 @@ int processCommand(string* arguments) case 39: // getSystemDirectories { - cout << "System Installation and Temporary Logging Directories" << endl << endl; + cout << endl << "System Installation and Temporary Logging Directories" << endl << endl; cout << "System Installation Directory = " << startup::StartUp::installDir() << endl; - cout << "System Temporary Logging Directory = " << tmpDir << endl; + cout << "System Temporary Logging Directory = " << tmpDir << endl << endl; } break; diff --git a/tools/hdfsCheck/hdfsCheck.cpp b/tools/hdfsCheck/hdfsCheck.cpp index e3469668d..7790c9916 100644 --- a/tools/hdfsCheck/hdfsCheck.cpp +++ b/tools/hdfsCheck/hdfsCheck.cpp @@ -28,6 +28,10 @@ using namespace idbdatafile; using namespace std; +#include "installdir.h" + +string tmpDir; + size_t BLK_SIZE = 2048; const size_t MAX_BLK_SIZE = 1048576; size_t MAX_BLOCK = 1024; @@ -189,7 +193,7 @@ bool TestRunner::runTest( IDBDataFile::Types filetype, unsigned open_opts ) // build the file name we are going to use ostringstream oss; // embed pid so that this is a new directory path - oss << "/tmp/idbdf-dir-" << getpid() << "-" << m_id; + oss << tmpDir << "/idbdf-dir-" << getpid() << "-" << m_id; string dir = oss.str(); m_fname = dir + "/foobar"; @@ -541,7 +545,7 @@ bool TestRunner::hdfsRdwrExhaustTest() // choose a new filename that is specific to our thread ostringstream oss; // embed pid so that this is a new directory path - oss << "/tmp/hdfsrdwr-" << getpid() << "-" << m_id; + oss << tmpDir << "/hdfsrdwr-" << getpid() << "-" << m_id; string newpath = oss.str(); // open a file with arbitrarily small buffer @@ -755,13 +759,15 @@ int main(int argc, char** argv) logFailure("missing hdfs-plugin argument"); return 1; } + + tmpDir = startup::StartUp::tmpDir(); opts.pluginFile = argv[optind]; try { // init the library with logging enabled - std::string hdfsRdwrScratch = "/tmp/rdwr_scratch"; + std::string hdfsRdwrScratch = tmpDir + "/rdwr_scratch"; IDBPolicy::init( true, true, hdfsRdwrScratch, 2147483648 ); if ( !IDBPolicy::installPlugin(opts.pluginFile) ) diff --git a/utils/idbdatafile/IDBPolicy.cpp b/utils/idbdatafile/IDBPolicy.cpp index 4992a1d15..e640eeffe 100644 --- a/utils/idbdatafile/IDBPolicy.cpp +++ b/utils/idbdatafile/IDBPolicy.cpp @@ -218,8 +218,8 @@ void IDBPolicy::configIDBPolicy() // Directory in which to place file buffer temporary files. string tmpDir = startup::StartUp::tmpDir(); - string hdfsRdwrScratch = cf->getConfig("SystemConfig", "hdfsRdwrScratch"); - hdfsRdwrScratch = tmpDir + hdfsRdwrScratch; + string scratch = cf->getConfig("SystemConfig", "hdfsRdwrScratch"); + string hdfsRdwrScratch = tmpDir + scratch; IDBPolicy::init( idblog, bUseRdwrMemBuffer, hdfsRdwrScratch, hdfsRdwrBufferMaxSize ); diff --git a/writeengine/shared/we_config.cpp b/writeengine/shared/we_config.cpp index 070e5d918..8b9058057 100644 --- a/writeengine/shared/we_config.cpp +++ b/writeengine/shared/we_config.cpp @@ -266,7 +266,7 @@ void Config::checkReload( ) string TmpFileDir = startup::StartUp::tmpDir(); string hdfsRdwrScratch = cf->getConfig("SystemConfig", "hdfsRdwrScratch"); - hdfsRdwrScratch = TmpFileDir + hdfsRdwrScratch + hdfsRdwrScratch = TmpFileDir + hdfsRdwrScratch; if ( hdfsRdwrScratch.length() == 0 ) {