File tree Expand file tree Collapse file tree
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -458,6 +458,11 @@ private List<RegionInfo> createFsLayout(
458458 // 1. Create Table Descriptor
459459 // using a copy of descriptor, table will be created enabling first
460460 final Path tempTableDir = CommonFSUtils .getTableDir (tempdir , tableDescriptor .getTableName ());
461+ if (CommonFSUtils .isExists (mfs .getFileSystem (), tempTableDir )) {
462+ // if the region dirs exist, will cause exception and unlimited retry (see HBASE-24546)
463+ LOG .warn ("temp table dir already exists on disk: {}, will be deleted." , tempTableDir );
464+ CommonFSUtils .deleteDirectory (mfs .getFileSystem (), tempTableDir );
465+ }
461466 ((FSTableDescriptors ) (env .getMasterServices ().getTableDescriptors ()))
462467 .createTableDescriptorForTableDirectory (tempTableDir ,
463468 TableDescriptorBuilder .newBuilder (tableDescriptor ).build (), false );
You can’t perform that action at this time.
0 commit comments