diff --git a/bin/region_mover.rb b/bin/region_mover.rb index 255992a..038d01a 100644 --- a/bin/region_mover.rb +++ b/bin/region_mover.rb @@ -323,13 +323,13 @@ end def unloadRegions(options, hostname, port) # Get configuration config = getConfiguration() + port = config.getInt(HConstants::REGIONSERVER_PORT, HConstants::DEFAULT_REGIONSERVER_PORT) \ + unless port # Clean up any old files. filename = getFilename(options, hostname, port) deleteFile(filename) # Get an admin instance admin = HBaseAdmin.new(config) - port = config.getInt(HConstants::REGIONSERVER_PORT, HConstants::DEFAULT_REGIONSERVER_PORT) \ - unless port servers = getServers(admin) # Remove the server we are unloading from from list of servers. # Side-effect is the servername that matches this hostname