Path versionFile = new Path(rootdir, HConstants.VERSION_FILE_NAME);
Path tmpFile = new Path(new Path(rootdir, HConstants.HBASE_TEMP_DIRECTORY), HConstants.VERSION_FILE_NAME);
while (true) {
try {
FSDataOutputStream s = fs.create(tmpFile);
s.writeUTF(version);
s.close();
if (!fs.rename(tmpFile, versionFile)) {
throw new IOException("Unable to move temp version file to " + versionFile);
}
LOG.debug("Created version file at " + rootdir.toString() +