HBASE-16125 RegionMover uses hardcoded, Unix-style tmp folder - breaks Windows (Vladimir Rodionov)

This commit is contained in:
tedyu 2016-07-01 10:02:25 -07:00
parent 5a7c9939cb
commit d92a99da0e
1 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,8 @@ public class RegionMover extends AbstractHBaseTool {
private String hostname;
private String filename;
private String excludeFile = null;
private String defaultDir = "/tmp";
String defaultDir = System.getProperty("java.io.tmpdir");
private int port = HConstants.DEFAULT_REGIONSERVER_PORT;
/**
@ -134,7 +135,7 @@ public class RegionMover extends AbstractHBaseTool {
private void setDefaultfilename(String hostname) {
this.filename =
defaultDir + "/" + System.getProperty("user.name") + this.hostname + ":"
defaultDir + File.separator + System.getProperty("user.name") + this.hostname + ":"
+ Integer.toString(this.port);
}