Skip to content

Commit

Permalink
HBASE-27754 generateMissingTableDescriptorFile should throw write per…
Browse files Browse the repository at this point in the history
…mission error and fail
  • Loading branch information
NihalJain committed Mar 27, 2023
1 parent b9b605b commit 093efd3
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -36,6 +36,7 @@
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.exceptions.DeserializationException;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.security.AccessControlException;
import org.apache.yetus.audience.InterfaceAudience;

import org.slf4j.Logger;
Expand Down Expand Up @@ -369,6 +370,11 @@ private static Path writeTableDescriptor(final FileSystem fs,
}
LOG.debug("Wrote into " + tableInfoDirPath);
} catch (IOException ioe) {
// fail-fast and get out of retry loop as user does not have privilege to write to hdfs
// hence, no point in retrying
if(ioe instanceof AccessControlException){
throw ioe;
}
// Presume clash of names or something; go around again.
LOG.debug("Failed write and/or rename; retrying", ioe);
if (!HBCKFsUtils.deleteDirectory(fs, tempPath)) {
Expand Down

0 comments on commit 093efd3

Please sign in to comment.