diff --git a/bin/region_mover.rb b/bin/region_mover.rb index 73cc1bbf5f7..3231cabb65d 100644 --- a/bin/region_mover.rb +++ b/bin/region_mover.rb @@ -428,7 +428,7 @@ end def getFilename(options, targetServer, port) filename = options[:file] if not filename - filename = "/tmp/" + ENV['USER'] + targetServer + ":" + port + filename = File.join(Dir.tmpdir(), ENV['USER'] + targetServer + "_" + port.to_s) end return filename end @@ -441,7 +441,7 @@ optparse = OptionParser.new do |opts| opts.separator 'Load or unload regions by moving one at a time' options[:file] = nil options[:maxthreads] = 1 - opts.on('-f', '--filename=FILE', 'File to save regions list into unloading, or read from loading; default /tmp/') do |file| + opts.on('-f', '--filename=FILE', 'File to save regions list into unloading, or read from loading; default /USER_TMP_DIR/') do |file| options[:file] = file end opts.on('-h', '--help', 'Display usage information') do