WenFeiYi commented on a change in pull request #1916:
URL: https://github.com/apache/hbase/pull/1916#discussion_r441931716



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/CloneSnapshotProcedure.java
##########
@@ -457,6 +457,10 @@ private void postCloneSnapshot(final MasterProcedureEnv 
env)
     // 1. Create Table Descriptor
     // using a copy of descriptor, table will be created enabling first
     final Path tempTableDir = FSUtils.getTableDir(tempdir, 
tableDescriptor.getTableName());
+    if (FSUtils.isExists(mfs.getFileSystem(), tempTableDir)) {
+      LOG.warn("temp table dir already exists on disk: {}, will be deleted.", 
tempTableDir);
+      FSUtils.deleteDirectory(mfs.getFileSystem(), tempTableDir);
+    }

Review comment:
       yes, RestoreSnapshotHelper.restoreHdfsRegions will remove the region 
dirs, but CloneSnapshotProcedure.createFilesystemLayout not allow exist remove. 
retrying will have the same effect




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to